1. 28 Feb, 2017 2 commits
    • Arnd Bergmann's avatar
      scsi: lpfc: use proper format string for dma_addr_t · 825c6abb
      Arnd Bergmann authored
      dma_addr_t may be either u32 or u64, depending on the kernel configuration,
      and we get a warning for the 32-bit case:
      
      drivers/scsi/lpfc/lpfc_nvme.c: In function 'lpfc_nvme_ls_req':
      drivers/scsi/lpfc/lpfc_logmsg.h:52:52: error: format '%llu' expects argument of type 'long long unsigned int', but argument 11 has type 'dma_addr_t {aka unsigned int}' [-Werror=format=]
      drivers/scsi/lpfc/lpfc_logmsg.h:52:52: error: format '%llu' expects argument of type 'long long unsigned int', but argument 12 has type 'dma_addr_t {aka unsigned int}' [-Werror=format=]
      drivers/scsi/lpfc/lpfc_nvme.c: In function 'lpfc_nvme_ls_abort':
      drivers/scsi/lpfc/lpfc_logmsg.h:52:52: error: format '%llu' expects argument of type 'long long unsigned int', but argument 11 has type 'dma_addr_t {aka unsigned int}' [-Werror=format=]
      drivers/scsi/lpfc/lpfc_logmsg.h:52:52: error: format '%llu' expects argument of type 'long long unsigned int', but argument 12 has type 'dma_addr_t {aka unsigned int}' [-Werror=format=]
      
      printk has a special "%pad" format string that passes the dma address by
      reference to solve this problem.
      
      Fixes: 01649561 ("scsi: lpfc: NVME Initiator: bind to nvme_fc api")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      825c6abb
    • Arnd Bergmann's avatar
      scsi: lpfc: use div_u64 for 64-bit division · 90ec7c9d
      Arnd Bergmann authored
      The new debugfs output causes a link error on 32-bit architectures:
      
      ERROR: "__aeabi_uldivmod" [drivers/scsi/lpfc/lpfc.ko] undefined!
      
      This code is not performance critical, so we can simply use div_u64().
      
      [mkp: fixed up whitespace]
      
      Fixes: bd2cdd5e ("scsi: lpfc: NVME Initiator: Add debugfs support")
      Fixes: 2b65e182 ("scsi: lpfc: NVME Target: Add debugfs support")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      90ec7c9d
  2. 23 Feb, 2017 19 commits
  3. 22 Feb, 2017 19 commits