Date: Wed, 26 Jun 2013 23:52:11 +0000 (UTC) From: Jung-uk Kim <jkim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r252276 - in head: sys/dev/acpi_support sys/dev/acpica usr.sbin/acpi/acpidb usr.sbin/acpi/acpidump Message-ID: <201306262352.r5QNqB4i012207@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jkim Date: Wed Jun 26 23:52:10 2013 New Revision: 252276 URL: http://svnweb.freebsd.org/changeset/base/252276 Log: Consistently cast ACPICA 64-bit integer types when we print them. Modified: head/sys/dev/acpi_support/atk0110.c head/sys/dev/acpica/acpi_pcib_acpi.c head/usr.sbin/acpi/acpidb/acpidb.c head/usr.sbin/acpi/acpidump/acpi.c Modified: head/sys/dev/acpi_support/atk0110.c ============================================================================== --- head/sys/dev/acpi_support/atk0110.c Wed Jun 26 23:46:31 2013 (r252275) +++ head/sys/dev/acpi_support/atk0110.c Wed Jun 26 23:52:10 2013 (r252276) @@ -253,8 +253,8 @@ aibs_attach_sif(struct aibs_softc *sc, e "0x%08"PRIx64" %20s %5"PRIi64" / %5"PRIi64" " "0x%"PRIx64"\n", name[0], i, - as[i].i, desc, (int64_t)as[i].l, (int64_t)as[i].h, - oi[4].Integer.Value); + (uint64_t)as[i].i, desc, (int64_t)as[i].l, + (int64_t)as[i].h, (uint64_t)oi[4].Integer.Value); #endif snprintf(si, sizeof(si), "%i", i); SYSCTL_ADD_PROC(device_get_sysctl_ctx(sc->sc_dev), Modified: head/sys/dev/acpica/acpi_pcib_acpi.c ============================================================================== --- head/sys/dev/acpica/acpi_pcib_acpi.c Wed Jun 26 23:46:31 2013 (r252275) +++ head/sys/dev/acpica/acpi_pcib_acpi.c Wed Jun 26 23:52:10 2013 (r252276) @@ -243,7 +243,7 @@ acpi_pcib_producer_handler(ACPI_RESOURCE if (min + length - 1 != max) device_printf(sc->ap_dev, "Length mismatch for %d range: %jx vs %jx\n", type, - (uintmax_t)max - min + 1, (uintmax_t)length); + (uintmax_t)(max - min + 1), (uintmax_t)length); #ifdef __i386__ if (min > ULONG_MAX) { device_printf(sc->ap_dev, Modified: head/usr.sbin/acpi/acpidb/acpidb.c ============================================================================== --- head/usr.sbin/acpi/acpidb/acpidb.c Wed Jun 26 23:46:31 2013 (r252275) +++ head/usr.sbin/acpi/acpidb/acpidb.c Wed Jun 26 23:52:10 2013 (r252276) @@ -176,8 +176,8 @@ aml_simulate_prompt(char *msg, UINT64 de if (msg != NULL) { printf("%s", msg); } - printf("(default: 0x%jx ", val); - printf(" / %ju) >>", val); + printf("(default: 0x%jx ", (uintmax_t)val); + printf(" / %ju) >>", (uintmax_t)val); fflush(stdout); bzero(buf, sizeof buf); Modified: head/usr.sbin/acpi/acpidump/acpi.c ============================================================================== --- head/usr.sbin/acpi/acpidump/acpi.c Wed Jun 26 23:46:31 2013 (r252275) +++ head/usr.sbin/acpi/acpidump/acpi.c Wed Jun 26 23:52:10 2013 (r252276) @@ -537,7 +537,7 @@ acpi_handle_mcfg(ACPI_TABLE_HEADER *sdp) alloc = (ACPI_MCFG_ALLOCATION *)(mcfg + 1); for (i = 0; i < entries; i++, alloc++) { printf("\n"); - printf("\tBase Address=0x%016jx\n", alloc->Address); + printf("\tBase Address=0x%016jx\n", (uintmax_t)alloc->Address); printf("\tSegment Group=0x%04x\n", alloc->PciSegment); printf("\tStart Bus=%d\n", alloc->StartBusNumber); printf("\tEnd Bus=%d\n", alloc->EndBusNumber); @@ -554,16 +554,16 @@ acpi_handle_slit(ACPI_TABLE_HEADER *sdp) printf(BEGIN_COMMENT); acpi_print_sdt(sdp); slit = (ACPI_TABLE_SLIT *)sdp; - printf("\tLocality Count=%jd\n", slit->LocalityCount); + printf("\tLocality Count=%ju\n", (uintmax_t)slit->LocalityCount); printf("\n\t "); for (i = 0; i < slit->LocalityCount; i++) - printf(" %3jd", i); + printf(" %3ju", (uintmax_t)i); printf("\n\t +"); for (i = 0; i < slit->LocalityCount; i++) printf("----"); printf("\n"); for (i = 0; i < slit->LocalityCount; i++) { - printf("\t %3jd |", i); + printf("\t %3ju |", (uintmax_t)i); for (j = 0; j < slit->LocalityCount; j++) printf(" %3d", slit->Entry[i * slit->LocalityCount + j]); @@ -830,7 +830,7 @@ acpi_handle_dmar_drhd(ACPI_DMAR_HARDWARE #undef PRINTFLAG printf("\tSegment=%d\n", drhd->Segment); - printf("\tAddress=0x%0jx\n", drhd->Address); + printf("\tAddress=0x%0jx\n", (uintmax_t)drhd->Address); remaining = drhd->Header.Length - sizeof(ACPI_DMAR_HARDWARE_UNIT); if (remaining > 0) @@ -855,8 +855,8 @@ acpi_handle_dmar_rmrr(ACPI_DMAR_RESERVED printf("\tType=RMRR\n"); printf("\tLength=%d\n", rmrr->Header.Length); printf("\tSegment=%d\n", rmrr->Segment); - printf("\tBaseAddress=0x%0jx\n", rmrr->BaseAddress); - printf("\tLimitAddress=0x%0jx\n", rmrr->EndAddress); + printf("\tBaseAddress=0x%0jx\n", (uintmax_t)rmrr->BaseAddress); + printf("\tLimitAddress=0x%0jx\n", (uintmax_t)rmrr->EndAddress); remaining = rmrr->Header.Length - sizeof(ACPI_DMAR_RESERVED_MEMORY); if (remaining > 0) @@ -911,7 +911,7 @@ acpi_handle_dmar_rhsa(ACPI_DMAR_RHSA *rh printf("\n"); printf("\tType=RHSA\n"); printf("\tLength=%d\n", rhsa->Header.Length); - printf("\tBaseAddress=0x%0jx\n", rhsa->BaseAddress); + printf("\tBaseAddress=0x%0jx\n", (uintmax_t)rhsa->BaseAddress); printf("\tProximityDomain=0x%08x\n", rhsa->ProximityDomain); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306262352.r5QNqB4i012207>