Print Maximum Data Transfer Size as a long rather than int

PowerPC has PAGE_SIZE as a long, not an int.  This causes the compiler to throw
a format mismatch warning on this print.  To work around the difference, print
it as a long instead of an int, and force the argument to a long.

Reviewed By: imp
Differential Revision: https://reviews.freebsd.org/D15653
This commit is contained in:
Justin Hibbits 2018-06-07 04:02:09 +00:00
parent a72a9036d3
commit 2bac48c266
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=334754

View File

@ -119,7 +119,7 @@ print_controller(struct nvme_controller_data *cdata)
if (cdata->mdts == 0)
printf("Unlimited\n");
else
printf("%d\n", PAGE_SIZE * (1 << cdata->mdts));
printf("%ld\n", PAGE_SIZE * (1L << cdata->mdts));
printf("Controller ID: 0x%02x\n", cdata->ctrlr_id);
printf("Version: %d.%d.%d\n",
(cdata->ver >> 16) & 0xffff, (cdata->ver >> 8) & 0xff,