Re: [PATCH] lpfc: use %zd format string for size_t

From: Martin K. Petersen
Date: Mon Oct 17 2016 - 13:59:55 EST


>>>>> "Arnd" == Arnd Bergmann <arnd@xxxxxxxx> writes:

Arnd> A recent bugfix introduced a harmless warning in the lpfc driver:
Arnd> drivers/scsi/lpfc/lpfc_init.c: In function 'lpfc_write_firmware':
Arnd> drivers/scsi/lpfc/lpfc_logmsg.h:56:45: error: format '%ld' expects
Arnd> argument of type 'long int', but argument 9 has type 'size_t {aka
Arnd> const unsigned int}' [-Werror=format=]

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

Applied to 4.10/scsi-queue.

--
Martin K. Petersen Oracle Linux Engineering