Use %p with (void *) casts to print pointers with printf.

This commit is contained in:
Justin T. Gibbs 1998-09-17 00:08:29 +00:00
parent dd9b6dde89
commit c2921d36a9
5 changed files with 25 additions and 25 deletions

View File

@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: aha.c,v 1.1 1998/09/15 07:39:52 gibbs Exp $
* $Id: aha.c,v 1.2 1998/09/16 03:27:12 gibbs Exp $
*/
#include <sys/param.h>
@ -1139,8 +1139,8 @@ ahadone(struct aha_softc *aha, struct aha_ccb *bccb, aha_mbi_comp_code_t comp_co
csio = &bccb->ccb->csio;
if ((bccb->flags & BCCB_ACTIVE) == 0) {
printf("%s: ahadone - Attempt to free non-active BCCB 0x%x\n",
aha_name(aha), (intptr_t)bccb);
printf("%s: ahadone - Attempt to free non-active BCCB %p\n",
aha_name(aha), (void *)bccb);
return;
}
@ -1679,14 +1679,14 @@ ahatimeout(void *arg)
ccb = bccb->ccb;
aha = (struct aha_softc *)ccb->ccb_h.ccb_aha_ptr;
xpt_print_path(ccb->ccb_h.path);
printf("CCB 0x%x - timed out\n", (intptr_t)bccb);
printf("CCB %p - timed out\n", (void *)bccb);
s = splcam();
if ((bccb->flags & BCCB_ACTIVE) == 0) {
xpt_print_path(ccb->ccb_h.path);
printf("CCB 0x%x - timed out CCB already completed\n",
(intptr_t)bccb);
printf("CCB %p - timed out CCB already completed\n",
(void *)bccb);
splx(s);
return;
}

View File

@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: ahb.c,v 1.1 1998/09/15 07:10:00 gibbs Exp $
* $Id: ahb.c,v 1.2 1998/09/16 03:27:07 gibbs Exp $
*/
#include "eisa.h"
@ -1259,14 +1259,14 @@ ahbtimeout(void *arg)
ccb = ecb->ccb;
ahb = (struct ahb_softc *)ccb->ccb_h.ccb_ahb_ptr;
xpt_print_path(ccb->ccb_h.path);
printf("ECB 0x%x - timed out\n", (intptr_t)ecb);
printf("ECB %p - timed out\n", (void *)ecb);
s = splcam();
if ((ecb->state & ECB_ACTIVE) == 0) {
xpt_print_path(ccb->ccb_h.path);
printf("ECB 0x%x - timed out ECB already completed\n",
(intptr_t)ecb);
printf("ECB %p - timed out ECB already completed\n",
(void *)ecb);
splx(s);
return;
}

View File

@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: bt.c,v 1.1 1998/09/15 07:32:48 gibbs Exp $
* $Id: bt.c,v 1.2 1998/09/16 03:27:11 gibbs Exp $
*/
/*
@ -1392,8 +1392,8 @@ btdone(struct bt_softc *bt, struct bt_ccb *bccb, bt_mbi_comp_code_t comp_code)
csio = &bccb->ccb->csio;
if ((bccb->flags & BCCB_ACTIVE) == 0) {
printf("%s: btdone - Attempt to free non-active BCCB 0x%x\n",
bt_name(bt), (intptr_t)bccb);
printf("%s: btdone - Attempt to free non-active BCCB %p\n",
bt_name(bt), (void *)bccb);
return;
}
@ -2060,14 +2060,14 @@ bttimeout(void *arg)
ccb = bccb->ccb;
bt = (struct bt_softc *)ccb->ccb_h.ccb_bt_ptr;
xpt_print_path(ccb->ccb_h.path);
printf("CCB 0x%x - timed out\n", (intptr_t)bccb);
printf("CCB %p - timed out\n", (void *)bccb);
s = splcam();
if ((bccb->flags & BCCB_ACTIVE) == 0) {
xpt_print_path(ccb->ccb_h.path);
printf("CCB 0x%x - timed out CCB already completed\n",
(intptr_t)bccb);
printf("CCB %p - timed out CCB already completed\n",
(void *)bccb);
splx(s);
return;
}

View File

@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: ahb.c,v 1.1 1998/09/15 07:10:00 gibbs Exp $
* $Id: ahb.c,v 1.2 1998/09/16 03:27:07 gibbs Exp $
*/
#include "eisa.h"
@ -1259,14 +1259,14 @@ ahbtimeout(void *arg)
ccb = ecb->ccb;
ahb = (struct ahb_softc *)ccb->ccb_h.ccb_ahb_ptr;
xpt_print_path(ccb->ccb_h.path);
printf("ECB 0x%x - timed out\n", (intptr_t)ecb);
printf("ECB %p - timed out\n", (void *)ecb);
s = splcam();
if ((ecb->state & ECB_ACTIVE) == 0) {
xpt_print_path(ccb->ccb_h.path);
printf("ECB 0x%x - timed out ECB already completed\n",
(intptr_t)ecb);
printf("ECB %p - timed out ECB already completed\n",
(void *)ecb);
splx(s);
return;
}

View File

@ -1,6 +1,6 @@
/**************************************************************************
**
** $Id: ncr.c,v 1.126 1998/09/16 17:11:59 gibbs Exp $
** $Id: ncr.c,v 1.127 1998/09/16 22:46:04 gibbs Exp $
**
** Device driver for the NCR 53C8XX PCI-SCSI-Controller Family.
**
@ -1288,7 +1288,7 @@ static void ncr_attach (pcici_t tag, int unit);
static char ident[] =
"\n$Id: ncr.c,v 1.126 1998/09/16 17:11:59 gibbs Exp $\n";
"\n$Id: ncr.c,v 1.127 1998/09/16 22:46:04 gibbs Exp $\n";
static const u_long ncr_version = NCR_VERSION * 11
+ (u_long) sizeof (struct ncb) * 7
@ -5643,9 +5643,9 @@ static void ncr_int_ma (ncb_p np, u_char dstat)
}
if (cp != np->header.cp) {
printf ("%s: SCSI phase error fixup: CCB address mismatch "
"(0x%08x != 0x%08x) np->nccb = 0x%08x\n",
ncr_name (np), (intptr_t)cp, (intptr_t)np->header.cp,
(intptr_t)np->link_nccb);
"(%p != %p) np->nccb = %p\n",
ncr_name (np), (void *)cp, (void *)np->header.cp,
(void *)np->link_nccb);
/* return;*/
}