]> www.infradead.org Git - users/jedix/linux-maple.git/commit
scsi: lpfc: Use %zd format string for size_t
authorArnd Bergmann <arnd@arndb.de>
Mon, 17 Oct 2016 12:35:46 +0000 (14:35 +0200)
committerChuck Anderson <chuck.anderson@oracle.com>
Mon, 27 Feb 2017 06:13:18 +0000 (22:13 -0800)
commit91a4d54c3c0495fea306cce5b12aed19fa6e5f28
tree883ecff9e19656d016e247318f4a05c57e52066e
parent64a2e5e56f6d8a7e50f7a9fa18afea63e6163d46
scsi: lpfc: Use %zd format string for size_t

Orabug: 25486030

A recent bugfix introduced a harmless warning in the lpfc driver:

drivers/scsi/lpfc/lpfc_init.c: In function 'lpfc_write_firmware':
drivers/scsi/lpfc/lpfc_logmsg.h:56:45: error: format '%ld' expects argument of type 'long int', but argument 9 has type 'size_t {aka const unsigned int}' [-Werror=format=]

'size_t' is always the same width as 'long' in the kernel, but the
compiler doesn't know that. The %z modifier is what the standard expects
to be used here, and this shuts up the warning.

Fixes: 679053c651fb ("scsi: lpfc: Fix fw download on SLI-4 FC adapters")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Acked-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit efe583c6d3cdafbeb0c039cd5d0f88fd26637065)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/scsi/lpfc/lpfc_init.c