1. 28 Feb, 2017 3 commits
    • Colin Ian King's avatar
      scsi: aacraid: remove redundant zero check on ret · fbdab3e7
      Colin Ian King authored
      The check for ret being zero is redundant as a few statements earlier we
      break out of the while loop if ret is non-zero.  Thus we can remove the
      zero check and also the dead-code non-zero case too.
      
      Detected by CoverityScan, CID#1411632 ("Logically Dead Code")
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Acked-by: default avatarDave Carroll <david.carroll@microsemi.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      fbdab3e7
    • 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 18 commits