From: YONETANI Tomokazu Date: Mon, 5 Oct 2009 01:04:20 +0000 (+0900) Subject: amd64 - mpt(4) should use {,u}int32_t for S32/U32 X-Git-Url: https://gitweb.dragonflybsd.org/~polachok/dragonfly.git/commitdiff_plain/aaa82ca4882e0123077984e0c230d31d14f960cd amd64 - mpt(4) should use {,u}int32_t for S32/U32 or else it uses {,un}signed long type which is of 64bits on 64-bit platforms. --- diff --git a/sys/dev/disk/mpt/mpilib/mpi_type.h b/sys/dev/disk/mpt/mpilib/mpi_type.h index 25c3a6a1ed..69271d6427 100644 --- a/sys/dev/disk/mpt/mpilib/mpi_type.h +++ b/sys/dev/disk/mpt/mpilib/mpi_type.h @@ -77,7 +77,7 @@ typedef unsigned char U8; typedef signed short S16; typedef unsigned short U16; -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(__DragonFly__) typedef int32_t S32; typedef uint32_t U32; diff --git a/sys/dev/disk/mpt/mpt.c b/sys/dev/disk/mpt/mpt.c index adf171bfc2..c9faea7077 100644 --- a/sys/dev/disk/mpt/mpt.c +++ b/sys/dev/disk/mpt/mpt.c @@ -336,7 +336,7 @@ mpt_stdready(struct mpt_softc *mpt) int mpt_stdevent(struct mpt_softc *mpt, request_t *req, MSG_EVENT_NOTIFY_REPLY *msg) { - mpt_lprt(mpt, MPT_PRT_DEBUG, "mpt_stdevent: 0x%lx\n", + mpt_lprt(mpt, MPT_PRT_DEBUG, "mpt_stdevent: 0x%x\n", msg->Event & 0xFF); /* Event was not for us. */ return (0); diff --git a/sys/dev/disk/mpt/mpt_debug.c b/sys/dev/disk/mpt/mpt_debug.c index cead147dfc..e585e3c340 100644 --- a/sys/dev/disk/mpt/mpt_debug.c +++ b/sys/dev/disk/mpt/mpt_debug.c @@ -448,31 +448,31 @@ mpt_print_event_notice(MSG_EVENT_NOTIFY_REPLY *msg) case MPI_EVENT_IOC_BUS_RESET: case MPI_EVENT_EXT_BUS_RESET: case MPI_EVENT_RESCAN: - kprintf("\tPort: %lu\n", + kprintf("\tPort: %u\n", (msg->Data[0] >> 8) & 0xff); break; case MPI_EVENT_LINK_STATUS_CHANGE: - kprintf("\tLinkState: %lu\n", + kprintf("\tLinkState: %u\n", msg->Data[0] & 0xff); - kprintf("\tPort: %lu\n", + kprintf("\tPort: %u\n", (msg->Data[1] >> 8) & 0xff); break; case MPI_EVENT_LOOP_STATE_CHANGE: - kprintf("\tType: %lu\n", + kprintf("\tType: %u\n", (msg->Data[0] >> 16) & 0xff); - kprintf("\tChar3: 0x%02lx\n", + kprintf("\tChar3: 0x%02x\n", (msg->Data[0] >> 8) & 0xff); - kprintf("\tChar4: 0x%02lx\n", + kprintf("\tChar4: 0x%02x\n", (msg->Data[0] ) & 0xff); - kprintf("\tPort: %lu\n", + kprintf("\tPort: %u\n", (msg->Data[1] >> 8) & 0xff); break; case MPI_EVENT_LOGOUT: - kprintf("\tN_PortId: 0x%04lx\n", msg->Data[0]); - kprintf("\tPort: %lu\n", + kprintf("\tN_PortId: 0x%04x\n", msg->Data[0]); + kprintf("\tPort: %u\n", (msg->Data[1] >> 8) & 0xff); break; }