1. 28 2月, 2017 3 次提交
    • C
      scsi: aacraid: remove redundant zero check on ret · fbdab3e7
      Colin Ian King 提交于
      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: NColin Ian King <colin.king@canonical.com>
      Acked-by: NDave Carroll <david.carroll@microsemi.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      fbdab3e7
    • A
      scsi: lpfc: use proper format string for dma_addr_t · 825c6abb
      Arnd Bergmann 提交于
      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: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      825c6abb
    • A
      scsi: lpfc: use div_u64 for 64-bit division · 90ec7c9d
      Arnd Bergmann 提交于
      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: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      90ec7c9d
  2. 24 2月, 2017 8 次提交
  3. 23 2月, 2017 29 次提交