[PATCH 1/5] fsi-occ: Fix size_t printf

Joel Stanley joel at jms.id.au
Mon Jun 18 13:43:31 AEST 2018


   drivers/fsi/fsi-occ.c:414:16: warning: format '%d' expects argument
   of type 'int', but argument 4 has type 'size_t {aka long unsigned
   int}' [-Wformat=]
      dev_dbg(dev, "Bad resplen %d\n", *resp_len);
                   ^                   ~~

Signed-off-by: Joel Stanley <joel at jms.id.au>
---
 drivers/fsi/fsi-occ.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/fsi/fsi-occ.c b/drivers/fsi/fsi-occ.c
index e4ebda646453..f02f72d379d0 100644
--- a/drivers/fsi/fsi-occ.c
+++ b/drivers/fsi/fsi-occ.c
@@ -411,7 +411,7 @@ int fsi_occ_submit(struct device *dev, const void *request, size_t req_len,
 	if (!occ)
 		return -ENODEV;
 	if (*resp_len < 7) {
-		dev_dbg(dev, "Bad resplen %d\n", *resp_len);
+		dev_dbg(dev, "Bad resplen %zd\n", *resp_len);
 		return -EINVAL;
 	}
 
-- 
2.17.1



More information about the openbmc mailing list