• Arnd Bergmann's avatar
    scsi: mpi3mr: Fix printk() format strings · fc1fbd13
    Arnd Bergmann authored
    The newly introduced error messages get multiple format strings wrong:
    size_t must be printed using the %z modifier rather than %l and dma_addr_t
    must be printed by reference using the special %pad pointer type:
    
    drivers/scsi/mpi3mr/mpi3mr_app.c: In function 'mpi3mr_build_nvme_prp':
    include/linux/kern_levels.h:5:25: error: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'dma_addr_t' {aka 'unsigned int'} [-Werror=format=]
    drivers/scsi/mpi3mr/mpi3mr_app.c:949:25: note: in expansion of macro 'dprint_bsg_err'
      949 |                         dprint_bsg_err(mrioc,
          |                         ^~~~~~~~~~~~~~
    include/linux/kern_levels.h:5:25: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Werror=format=]
    drivers/scsi/mpi3mr/mpi3mr_app.c:1112:41: note: in expansion of macro 'dprint_bsg_err'
     1112 |                                         dprint_bsg_err(mrioc,
          |                                         ^~~~~~~~~~~~~~
    
    Fixes: 9536af61 ("scsi: mpi3mr: Support for preallocation of SGL BSG data buffers part-3")
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Link: https://lore.kernel.org/r/20231207142813.935717-1-arnd@kernel.orgAcked-by: default avatarRandy Dunlap <rdunlap@infradead.org>
    Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
    Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
    fc1fbd13
mpi3mr_app.c 61.5 KB