1. 21 Dec, 2017 3 commits
  2. 15 Dec, 2017 16 commits
  3. 12 Dec, 2017 7 commits
    • Pravin Shedge's avatar
      scsi: qla2xxx: remove duplicate includes · ed123b6e
      Pravin Shedge authored
      These duplicate includes have been found with scripts/checkincludes.pl
      but they have been removed manually to avoid removing false positives.
      Signed-off-by: default avatarPravin Shedge <pravin.shedge4linux@gmail.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      ed123b6e
    • Bart Van Assche's avatar
      scsi: qla2xxx: Suppress gcc 7 fall-through warnings · 81881861
      Bart Van Assche authored
      Avoid that building with gcc 7 and W=1 triggers warnings similar to the
      following:
      
      drivers/scsi/qla2xxx/qla_isr.c:1189:27: warning: this statement may fall through [-Wimplicit-fallthrough=]
      Signed-off-by: default avatarBart Van Assche <bart.vanassche@wdc.com>
      Cc: Himanshu Madhani <himanshu.madhani@cavium.com>
      Cc: Quinn Tran <quinn.tran@cavium.com>
      Cc: Hannes Reinecke <hare@suse.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      81881861
    • Nicolas Iooss's avatar
      scsi: fnic: add a space after %p in printf format · f280c77d
      Nicolas Iooss authored
      fnic_fcpio_icmnd_cmpl_handler() displays the value of sc with:
      
          FNIC_SCSI_DBG(KERN_INFO...
              "... sc = 0x%p"
              "scsi_status ..."
              ...
      
      As the literal strings get merged, the function uses %ps instead of the
      intended raw %p format. Fix this by inserting a space.
      Signed-off-by: default avatarNicolas Iooss <nicolas.iooss_linux@m4x.org>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      f280c77d
    • Randy Dunlap's avatar
      scsi: documentation: add scsi_common.c to SCSI driver-api · e8fd31c5
      Randy Dunlap authored
      Add exported functions from scsi_common.c to the SCSI driver API
      documentation.
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Cc: Nicholas Bellinger <nab@linux-iscsi.org>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      e8fd31c5
    • Randy Dunlap's avatar
      scsi: core: doc. fixes to scsi_common.c · 749a1122
      Randy Dunlap authored
      Clean up some comment typos and fix some errors in documentation.
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Cc: Nicholas Bellinger <nab@linux-iscsi.org>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Bart Van Assche <bart.vanassche@wdc.com>
      Reviewed-by: default avatarBart Van Assche <bart.vanassche@wdc.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      749a1122
    • Colin Ian King's avatar
      scsi: arcmsr: remove redundant check for secs < 0 · 3c62ecda
      Colin Ian King authored
      The check for secs being less than zero is redundant for two reasons.
      Firstly, secs is unsigned so the check is always going to be false.
      Secondly, if secs was signed the proceeding calculation of secs is never
      going to be negative.  Hence we can remove this redundant check and day
      and secs re-adjustment.
      
      Detected by static analysis with smatch:
      arcmsr_set_iop_datetime() warn: unsigned 'secs' is never less than zero.
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Acked-by: default avatarChing Huang <ching2048@areca.com.tw>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      3c62ecda
    • Arnd Bergmann's avatar
      scsi: bfa: convert to strlcpy/strlcat · 8c5a50e8
      Arnd Bergmann authored
      The bfa driver has a number of real issues with string termination
      that gcc-8 now points out:
      
      drivers/scsi/bfa/bfad_bsg.c: In function 'bfad_iocmd_port_get_attr':
      drivers/scsi/bfa/bfad_bsg.c:320:9: error: argument to 'sizeof' in 'strncpy' call is the same expression as the source; did you mean to use the size of the destination? [-Werror=sizeof-pointer-memaccess]
      drivers/scsi/bfa/bfa_fcs.c: In function 'bfa_fcs_fabric_psymb_init':
      drivers/scsi/bfa/bfa_fcs.c:775:9: error: argument to 'sizeof' in 'strncat' call is the same expression as the source; did you mean to use the size of the destination? [-Werror=sizeof-pointer-memaccess]
      drivers/scsi/bfa/bfa_fcs.c:781:9: error: argument to 'sizeof' in 'strncat' call is the same expression as the source; did you mean to use the size of the destination? [-Werror=sizeof-pointer-memaccess]
      drivers/scsi/bfa/bfa_fcs.c:788:9: error: argument to 'sizeof' in 'strncat' call is the same expression as the source; did you mean to use the size of the destination? [-Werror=sizeof-pointer-memaccess]
      drivers/scsi/bfa/bfa_fcs.c:801:10: error: argument to 'sizeof' in 'strncat' call is the same expression as the source; did you mean to use the size of the destination? [-Werror=sizeof-pointer-memaccess]
      drivers/scsi/bfa/bfa_fcs.c:808:10: error: argument to 'sizeof' in 'strncat' call is the same expression as the source; did you mean to use the size of the destination? [-Werror=sizeof-pointer-memaccess]
      drivers/scsi/bfa/bfa_fcs.c: In function 'bfa_fcs_fabric_nsymb_init':
      drivers/scsi/bfa/bfa_fcs.c:837:10: error: argument to 'sizeof' in 'strncat' call is the same expression as the source; did you mean to use the size of the destination? [-Werror=sizeof-pointer-memaccess]
      drivers/scsi/bfa/bfa_fcs.c:844:10: error: argument to 'sizeof' in 'strncat' call is the same expression as the source; did you mean to use the size of the destination? [-Werror=sizeof-pointer-memaccess]
      drivers/scsi/bfa/bfa_fcs.c:852:10: error: argument to 'sizeof' in 'strncat' call is the same expression as the source; did you mean to use the size of the destination? [-Werror=sizeof-pointer-memaccess]
      drivers/scsi/bfa/bfa_fcs.c: In function 'bfa_fcs_fabric_psymb_init':
      drivers/scsi/bfa/bfa_fcs.c:778:2: error: 'strncat' output may be truncated copying 10 bytes from a string of length 63 [-Werror=stringop-truncation]
      drivers/scsi/bfa/bfa_fcs.c:784:2: error: 'strncat' output may be truncated copying 30 bytes from a string of length 63 [-Werror=stringop-truncation]
      drivers/scsi/bfa/bfa_fcs.c:803:3: error: 'strncat' output may be truncated copying 44 bytes from a string of length 63 [-Werror=stringop-truncation]
      drivers/scsi/bfa/bfa_fcs.c:811:3: error: 'strncat' output may be truncated copying 16 bytes from a string of length 63 [-Werror=stringop-truncation]
      drivers/scsi/bfa/bfa_fcs.c: In function 'bfa_fcs_fabric_nsymb_init':
      drivers/scsi/bfa/bfa_fcs.c:840:2: error: 'strncat' output may be truncated copying 10 bytes from a string of length 63 [-Werror=stringop-truncation]
      drivers/scsi/bfa/bfa_fcs.c:847:2: error: 'strncat' output may be truncated copying 30 bytes from a string of length 63 [-Werror=stringop-truncation]
      drivers/scsi/bfa/bfa_fcs_lport.c: In function 'bfa_fcs_fdmi_get_hbaattr':
      drivers/scsi/bfa/bfa_fcs_lport.c:2657:10: error: argument to 'sizeof' in 'strncat' call is the same expression as the source; did you mean to use the size of the destination? [-Werror=sizeof-pointer-memaccess]
      drivers/scsi/bfa/bfa_fcs_lport.c:2659:11: error: argument to 'sizeof' in 'strncat' call is the same expression as the source; did you mean to use the size of the destination? [-Werror=sizeof-pointer-memaccess]
      drivers/scsi/bfa/bfa_fcs_lport.c: In function 'bfa_fcs_lport_ms_gmal_response':
      drivers/scsi/bfa/bfa_fcs_lport.c:3232:5: error: 'strncpy' output may be truncated copying 16 bytes from a string of length 247 [-Werror=stringop-truncation]
      drivers/scsi/bfa/bfa_fcs_lport.c: In function 'bfa_fcs_lport_ns_send_rspn_id':
      drivers/scsi/bfa/bfa_fcs_lport.c:4670:3: error: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
      drivers/scsi/bfa/bfa_fcs_lport.c:4682:3: error: 'strncat' output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
      drivers/scsi/bfa/bfa_fcs_lport.c: In function 'bfa_fcs_lport_ns_util_send_rspn_id':
      drivers/scsi/bfa/bfa_fcs_lport.c:5206:3: error: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
      drivers/scsi/bfa/bfa_fcs_lport.c:5215:3: error: 'strncat' output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
      drivers/scsi/bfa/bfa_fcs_lport.c: In function 'bfa_fcs_fdmi_get_portattr':
      drivers/scsi/bfa/bfa_fcs_lport.c:2751:2: error: 'strncpy' specified bound 128 equals destination size [-Werror=stringop-truncation]
      drivers/scsi/bfa/bfa_fcbuild.c: In function 'fc_rspnid_build':
      drivers/scsi/bfa/bfa_fcbuild.c:1254:2: error: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
      drivers/scsi/bfa/bfa_fcbuild.c:1253:25: note: length computed here
      drivers/scsi/bfa/bfa_fcbuild.c: In function 'fc_rsnn_nn_build':
      drivers/scsi/bfa/bfa_fcbuild.c:1275:2: error: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
      
      In most cases, this can be addressed by correctly calling strlcpy and
      strlcat instead of strncpy/strncat, with the size of the destination
      buffer as the last argument.
      
      For consistency, I'm changing the other callers of strncpy() in this
      driver the same way.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Reviewed-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
      Acked-by: default avatarSudarsana Kalluru <Sudarsana.Kalluru@cavium.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      8c5a50e8
  4. 08 Dec, 2017 14 commits