[PATCH 2/5] hwmon (occ): Fix printf warning
Joel Stanley
joel at jms.id.au
Mon Jun 18 13:43:32 AEST 2018
drivers/hwmon/occ/common.c:1351:24: warning: format '%d' expects
argument of type 'int', but argument 5 has type 'long unsigned int'
[-Wformat=]
dev_dbg(occ->bus_dev, "Max resp size: %d+%d=%d\n",
drivers/hwmon/occ/common.c:1351:24: warning: format ‘%d’ expects
argument of type ‘int’, but argument 6 has type ‘long unsigned int’
[-Wformat=]
dev_dbg(occ->bus_dev, "Max resp size: %u+%zd=%d\n",
Signed-off-by: Joel Stanley <joel at jms.id.au>
---
drivers/hwmon/occ/common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hwmon/occ/common.c b/drivers/hwmon/occ/common.c
index c1bccf53b425..c5115a049032 100644
--- a/drivers/hwmon/occ/common.c
+++ b/drivers/hwmon/occ/common.c
@@ -1348,7 +1348,7 @@ static void occ_parse_poll_response(struct occ *occ)
sensor->version = block->header.sensor_format;
sensor->data = &block->data;
}
- dev_dbg(occ->bus_dev, "Max resp size: %d+%d=%d\n",
+ dev_dbg(occ->bus_dev, "Max resp size: %u+%zd=%zd\n",
size, sizeof(*header), size + sizeof(*header));
}
--
2.17.1
More information about the openbmc
mailing list