aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bfa (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-01-22scsi: bfa: Drop driver-defined SCSI status codesHannes Reinecke3-17/+2
Drop the driver-defined SCSI status codes and use the generic ones instead. Link: https://lore.kernel.org/r/20210113090500.129644-10-hare@suse.de Reviewed-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-12-02scsi: bfa: Fix fall-through warnings for ClangGustavo A. R. Silva2-3/+5
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding a couple break statements and replacing /* fall through */ comments with the new pseudo-keyword macro fallthrough; instead of just letting the code fall through to the next case. Notice that Clang doesn't recognize /* fall through */ comments as implicit fall-through markings. Link: https://github.com/KSPP/linux/issues/115 Link: https://lore.kernel.org/r/2ae1cafd858238b85fc5e7fe5cc183843e21ec9f.1605896059.git.gustavoars@kernel.org Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-10-23Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsiLinus Torvalds1-0/+1
Pull more SCSI updates from James Bottomley: "The set of core changes here is Christoph's submission path cleanups. These introduced a couple of regressions when first proposed so they got held over from the initial merge window pull request to give more testing time, which they've now had and Syzbot has confirmed the regression it detected is fixed. The other main changes are two driver updates (arcmsr, pm80xx) and assorted minor clean ups" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (38 commits) scsi: qla2xxx: Fix return of uninitialized value in rval scsi: core: Set sc_data_direction to DMA_NONE for no-transfer commands scsi: sr: Initialize ->cmd_len scsi: arcmsr: Update driver version to v1.50.00.02-20200819 scsi: arcmsr: Add support for ARC-1886 series RAID controllers scsi: arcmsr: Fix device hot-plug monitoring timer stop scsi: arcmsr: Remove unnecessary syntax scsi: pm80xx: Driver version update scsi: pm80xx: Increase the number of outstanding I/O supported to 1024 scsi: pm80xx: Remove DMA memory allocation for ccb and device structures scsi: pm80xx: Increase number of supported queues scsi: sym53c8xx_2: Fix sizeof() mismatch scsi: isci: Fix a typo in a comment scsi: qla4xxx: Fix inconsistent format argument type scsi: myrb: Fix inconsistent format argument types scsi: myrb: Remove redundant assignment to variable timeout scsi: bfa: Fix error return in bfad_pci_init() scsi: fcoe: Simplify the return expression of fcoe_sysfs_setup() scsi: snic: Simplify the return expression of svnic_cq_alloc() scsi: fnic: Simplify the return expression of vnic_wq_copy_alloc() ...
2020-10-07scsi: bfa: Fix error return in bfad_pci_init()Jing Xiangfeng1-0/+1
Fix to return error code -ENODEV from the error handling case instead of 0. Link: https://lore.kernel.org/r/20200925062423.161504-1-jingxiangfeng@huawei.com Fixes: 11ea3824140c ("scsi: bfa: fix calls to dma_set_mask_and_coherent()") Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-08-23treewide: Use fallthrough pseudo-keywordGustavo A. R. Silva5-16/+16
Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
2020-07-24scsi: bfa: Ensure a blank line precedes next function/headerLee Jones1-0/+1
Fixes the following checkpatch warning: CHECK: Please use a blank line after function/struct/union/enum declarations #129: FILE: drivers/scsi/bfa/bfa_ioc.c:6913: } +/* Link: https://lore.kernel.org/r/20200723122446.1329773-39-lee.jones@linaro.org Cc: Anil Gurumurthy <anil.gurumurthy@qlogic.com> Cc: Sudarsana Kalluru <sudarsana.kalluru@qlogic.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-07-24scsi: bfa: Demote seemingly unintentional kerneldoc headerLee Jones1-2/+2
This is the only use of kerneldoc in the source file and no descriptions are provided. Also demote standard comment. Fixes the following W=1 kernel build warning(s): drivers/scsi/bfa/bfa_svc.c:3847: warning: Function parameter or member 'bfa' not described in 'bfa_fcport_get_cfg_topology' Link: https://lore.kernel.org/r/20200723122446.1329773-36-lee.jones@linaro.org Cc: Anil Gurumurthy <anil.gurumurthy@qlogic.com> Cc: Sudarsana Kalluru <sudarsana.kalluru@qlogic.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-07-24scsi: bfa: Demote seemingly unintentional kerneldoc headerLee Jones1-1/+1
This is the only use of kerneldoc in the source file and no descriptions are provided. Fixes the following W=1 kernel build warning(s): drivers/scsi/bfa/bfa_core.c:1245: warning: Function parameter or member 'bfa' not described in 'bfa_iocfc_qreg' drivers/scsi/bfa/bfa_core.c:1245: warning: Function parameter or member 'qreg' not described in 'bfa_iocfc_qreg' Link: https://lore.kernel.org/r/20200723122446.1329773-35-lee.jones@linaro.org Cc: Anil Gurumurthy <anil.gurumurthy@qlogic.com> Cc: Sudarsana Kalluru <sudarsana.kalluru@qlogic.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-07-24scsi: bfa: Demote non-kerneldoc headers down to standard comment blocksLee Jones1-15/+15
This is probably historical (Doxygen?). Fixes the following W=1 kernel build warning(s): drivers/scsi/bfa/bfa_ioc.c:6646: warning: Cannot understand * @brief hardware error definition drivers/scsi/bfa/bfa_ioc.c:6661: warning: Cannot understand * @brief flash command register data structure drivers/scsi/bfa/bfa_ioc.c:6685: warning: Cannot understand * @brief flash device status register data structure drivers/scsi/bfa/bfa_ioc.c:6711: warning: Cannot understand * @brief flash address register data structure drivers/scsi/bfa/bfa_ioc.c:6732: warning: Function parameter or member 'pci_bar' not described in 'bfa_flash_set_cmd' drivers/scsi/bfa/bfa_ioc.c:6732: warning: Function parameter or member 'wr_cnt' not described in 'bfa_flash_set_cmd' drivers/scsi/bfa/bfa_ioc.c:6732: warning: Function parameter or member 'rd_cnt' not described in 'bfa_flash_set_cmd' drivers/scsi/bfa/bfa_ioc.c:6732: warning: Function parameter or member 'ad_cnt' not described in 'bfa_flash_set_cmd' drivers/scsi/bfa/bfa_ioc.c:6732: warning: Function parameter or member 'op' not described in 'bfa_flash_set_cmd' drivers/scsi/bfa/bfa_ioc.c:6768: warning: Cannot understand * @brief drivers/scsi/bfa/bfa_ioc.c:6807: warning: Cannot understand * @brief drivers/scsi/bfa/bfa_ioc.c:6852: warning: Cannot understand * @brief drivers/scsi/bfa/bfa_ioc.c:6898: warning: Cannot understand * @brief drivers/scsi/bfa/bfa_ioc.c:6914: warning: Cannot understand * @brief drivers/scsi/bfa/bfa_ioc.c:6940: warning: Cannot understand * @brief Link: https://lore.kernel.org/r/20200723122446.1329773-34-lee.jones@linaro.org Cc: Anil Gurumurthy <anil.gurumurthy@qlogic.com> Cc: Sudarsana Kalluru <sudarsana.kalluru@qlogic.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-07-24scsi: bfa: Remove unused variable 'adisc'Lee Jones1-3/+0
Fixes the following W=1 kernel build warning(s): drivers/scsi/bfa/bfa_fcs_rport.c: In function ‘bfa_fcs_rport_process_adisc’: drivers/scsi/bfa/bfa_fcs_rport.c:2243:21: warning: variable ‘adisc’ set but not used [-Wunused-but-set-variable] Link: https://lore.kernel.org/r/20200723122446.1329773-28-lee.jones@linaro.org Cc: Anil Gurumurthy <anil.gurumurthy@qlogic.com> Cc: Sudarsana Kalluru <sudarsana.kalluru@qlogic.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-07-24scsi: bfa: Demote non-compliant kerneldoc headers to standard commentsLee Jones1-3/+3
Fixes the following W=1 kernel build warning(s): drivers/scsi/bfa/bfa_ioc_ct.c:504: warning: Function parameter or member 'ioc' not described in 'bfa_ioc_set_ctx_hwif' drivers/scsi/bfa/bfa_ioc_ct.c:504: warning: Function parameter or member 'hwif' not described in 'bfa_ioc_set_ctx_hwif' drivers/scsi/bfa/bfa_ioc_ct.c:525: warning: Function parameter or member 'ioc' not described in 'bfa_ioc_set_ct_hwif' drivers/scsi/bfa/bfa_ioc_ct.c:540: warning: Function parameter or member 'ioc' not described in 'bfa_ioc_set_ct2_hwif' Link: https://lore.kernel.org/r/20200723122446.1329773-26-lee.jones@linaro.org Cc: Anil Gurumurthy <anil.gurumurthy@qlogic.com> Cc: Sudarsana Kalluru <sudarsana.kalluru@qlogic.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-07-24scsi: bfa: Staticify non-external functionsLee Jones1-3/+3
Fixes the following W=1 kernel build warning(s): drivers/scsi/bfa/bfa_ioc.c:5023:1: warning: no previous prototype for ‘bfa_diag_intr’ [-Wmissing-prototypes] 5023 | bfa_diag_intr(void *diagarg, struct bfi_mbmsg_s *msg) | ^~~~~~~~~~~~~ drivers/scsi/bfa/bfa_ioc.c:6966:1: warning: no previous prototype for ‘bfa_flash_sem_get’ [-Wmissing-prototypes] 6966 | bfa_flash_sem_get(void __iomem *bar) | ^~~~~~~~~~~~~~~~~ drivers/scsi/bfa/bfa_ioc.c:6979:1: warning: no previous prototype for ‘bfa_flash_sem_put’ [-Wmissing-prototypes] 6979 | bfa_flash_sem_put(void __iomem *bar) | ^~~~~~~~~~~~~~~~~ Link: https://lore.kernel.org/r/20200723122446.1329773-24-lee.jones@linaro.org Cc: Anil Gurumurthy <anil.gurumurthy@qlogic.com> Cc: Sudarsana Kalluru <sudarsana.kalluru@qlogic.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-07-24scsi: bfa: Remove a few unused variables 'pgoff' and 't'Lee Jones1-14/+6
Fixes the following W=1 kernel build warning(s): drivers/scsi/bfa/bfa_ioc.c: In function ‘bfa_iocpf_sm_fwcheck_entry’: drivers/scsi/bfa/bfa_ioc.c:704:27: warning: variable ‘pgoff’ set but not used [-Wunused-but-set-variable] drivers/scsi/bfa/bfa_ioc.c: In function ‘bfa_ioc_fwver_get’: drivers/scsi/bfa/bfa_ioc.c:1443:13: warning: variable ‘pgoff’ set but not used [-Wunused-but-set-variable] drivers/scsi/bfa/bfa_ioc.c: In function ‘bfa_ioc_fwsig_invalidate’: drivers/scsi/bfa/bfa_ioc.c:1665:13: warning: variable ‘pgoff’ set but not used [-Wunused-but-set-variable] drivers/scsi/bfa/bfa_ioc.c: In function ‘bfa_ioc_download_fw’: drivers/scsi/bfa/bfa_ioc.c:1866:13: warning: variable ‘pgoff’ set but not used [-Wunused-but-set-variable] drivers/scsi/bfa/bfa_ioc.c: In function ‘bfa_diag_memtest_done’: drivers/scsi/bfa/bfa_ioc.c:4766:13: warning: variable ‘pgoff’ set but not used [-Wunused-but-set-variable] drivers/scsi/bfa/bfa_ioc.c: In function ‘bfa_flash_fifo_flush’: drivers/scsi/bfa/bfa_ioc.c:6787:6: warning: variable ‘t’ set but not used [-Wunused-but-set-variable] Link: https://lore.kernel.org/r/20200723122446.1329773-21-lee.jones@linaro.org Cc: Anil Gurumurthy <anil.gurumurthy@qlogic.com> Cc: Sudarsana Kalluru <sudarsana.kalluru@qlogic.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-07-24scsi: bfa: Demote seemingly unintentional kerneldoc headerLee Jones1-1/+1
This is the only use of kerneldoc in the source file and no descriptions are provided. Fixes the following W=1 kernel build warning(s): drivers/scsi/bfa/bfa_fcpim.c:3829: warning: Function parameter or member 'bfa' not described in 'bfa_fcpim_get_throttle_cfg' drivers/scsi/bfa/bfa_fcpim.c:3829: warning: Function parameter or member 'drv_cfg_param' not described in 'bfa_fcpim_get_throttle_cfg' Link: https://lore.kernel.org/r/20200723122446.1329773-11-lee.jones@linaro.org Cc: Anil Gurumurthy <anil.gurumurthy@qlogic.com> Cc: Sudarsana Kalluru <sudarsana.kalluru@qlogic.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-07-24scsi: bfa: Remove set but unused variable 'rp'Lee Jones1-7/+1
This change subsequently makes 'rp_fcs' unused also. Remove that too. Fixes the following W=1 kernel build warning(s): drivers/scsi/bfa/bfa_fcpim.c: In function ‘bfa_fcpim_lunmask_delete’: drivers/scsi/bfa/bfa_fcpim.c:2338:22: warning: variable ‘rp’ set but not used [-Wunused-but-set-variable] 2338 | struct bfa_rport_s *rp = NULL; | ^~ Link: https://lore.kernel.org/r/20200723122446.1329773-10-lee.jones@linaro.org Cc: Anil Gurumurthy <anil.gurumurthy@qlogic.com> Cc: Sudarsana Kalluru <sudarsana.kalluru@qlogic.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-07-24scsi: bfa: Staticify local functionsLee Jones1-2/+2
These calls are not invoked externally. Fixes the following W=1 kernel build warning(s): drivers/scsi/bfa/bfa_port.c:760:1: warning: no previous prototype for ‘bfa_cee_isr’ [-Wmissing-prototypes] 760 | bfa_cee_isr(void *cbarg, struct bfi_mbmsg_s *m) | ^~~~~~~~~~~ drivers/scsi/bfa/bfa_port.c:796:1: warning: no previous prototype for ‘bfa_cee_notify’ [-Wmissing-prototypes] 796 | bfa_cee_notify(void *arg, enum bfa_ioc_event_e event) | ^~~~~~~~~~~~~~ Link: https://lore.kernel.org/r/20200723122446.1329773-8-lee.jones@linaro.org Cc: Anil Gurumurthy <anil.gurumurthy@qlogic.com> Cc: Sudarsana Kalluru <sudarsana.kalluru@qlogic.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-07-24scsi: bfa: Staticify all local functionsLee Jones1-111/+111
Fixes the following W=1 kernel build warning(s): drivers/scsi/bfa/bfad_bsg.c:19:1: warning: no previous prototype for ‘bfad_iocmd_ioc_enable’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:42:1: warning: no previous prototype for ‘bfad_iocmd_ioc_disable’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:150:1: warning: no previous prototype for ‘bfad_iocmd_ioc_get_fwstats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:180:1: warning: no previous prototype for ‘bfad_iocmd_ioc_reset_stats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:198:1: warning: no previous prototype for ‘bfad_iocmd_ioc_set_name’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:212:1: warning: no previous prototype for ‘bfad_iocmd_iocfc_get_attr’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:223:1: warning: no previous prototype for ‘bfad_iocmd_ioc_fw_sig_inv’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:235:1: warning: no previous prototype for ‘bfad_iocmd_iocfc_set_intr’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:248:1: warning: no previous prototype for ‘bfad_iocmd_port_enable’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:269:1: warning: no previous prototype for ‘bfad_iocmd_port_disable’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:319:1: warning: no previous prototype for ‘bfad_iocmd_port_get_stats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:353:1: warning: no previous prototype for ‘bfad_iocmd_port_reset_stats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:374:1: warning: no previous prototype for ‘bfad_iocmd_set_port_cfg’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:394:1: warning: no previous prototype for ‘bfad_iocmd_port_cfg_maxfrsize’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:408:1: warning: no previous prototype for ‘bfad_iocmd_port_cfg_bbcr’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:431:1: warning: no previous prototype for ‘bfad_iocmd_port_get_bbcr_attr’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:469:1: warning: no previous prototype for ‘bfad_iocmd_lport_get_stats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:493:1: warning: no previous prototype for ‘bfad_iocmd_lport_reset_stats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:527:1: warning: no previous prototype for ‘bfad_iocmd_lport_get_iostats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:552:1: warning: no previous prototype for ‘bfad_iocmd_lport_get_rports’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:594:1: warning: no previous prototype for ‘bfad_iocmd_rport_get_attr’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:680:1: warning: no previous prototype for ‘bfad_iocmd_rport_get_stats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:721:1: warning: no previous prototype for ‘bfad_iocmd_rport_clr_stats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:757:1: warning: no previous prototype for ‘bfad_iocmd_rport_set_speed’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:793:1: warning: no previous prototype for ‘bfad_iocmd_vport_get_attr’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:816:1: warning: no previous prototype for ‘bfad_iocmd_vport_get_stats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:844:1: warning: no previous prototype for ‘bfad_iocmd_vport_clr_stats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:911:1: warning: no previous prototype for ‘bfad_iocmd_qos_set_bw’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:924:1: warning: no previous prototype for ‘bfad_iocmd_ratelim’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:953:1: warning: no previous prototype for ‘bfad_iocmd_ratelim_speed’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:982:1: warning: no previous prototype for ‘bfad_iocmd_cfg_fcpim’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:995:1: warning: no previous prototype for ‘bfad_iocmd_fcpim_get_modstats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1017:1: warning: no previous prototype for ‘bfad_iocmd_fcpim_clr_modstats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1039:1: warning: no previous prototype for ‘bfad_iocmd_fcpim_get_del_itn_stats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1164:1: warning: no previous prototype for ‘bfad_iocmd_fcport_enable’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1177:1: warning: no previous prototype for ‘bfad_iocmd_fcport_disable’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1190:1: warning: no previous prototype for ‘bfad_iocmd_ioc_get_pcifn_cfg’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1212:1: warning: no previous prototype for ‘bfad_iocmd_pcifn_create’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1235:1: warning: no previous prototype for ‘bfad_iocmd_pcifn_delete’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1257:1: warning: no previous prototype for ‘bfad_iocmd_pcifn_bw’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1281:1: warning: no previous prototype for ‘bfad_iocmd_adapter_cfg_mode’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1304:1: warning: no previous prototype for ‘bfad_iocmd_port_cfg_mode’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1328:1: warning: no previous prototype for ‘bfad_iocmd_ablk_optrom’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1354:1: warning: no previous prototype for ‘bfad_iocmd_faa_query’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1377:1: warning: no previous prototype for ‘bfad_iocmd_cee_attr’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1413:1: warning: no previous prototype for ‘bfad_iocmd_cee_get_stats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1450:1: warning: no previous prototype for ‘bfad_iocmd_cee_reset_stats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1464:1: warning: no previous prototype for ‘bfad_iocmd_sfp_media’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1486:1: warning: no previous prototype for ‘bfad_iocmd_sfp_speed’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1507:1: warning: no previous prototype for ‘bfad_iocmd_flash_get_attr’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1528:1: warning: no previous prototype for ‘bfad_iocmd_flash_erase_part’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1548:1: warning: no previous prototype for ‘bfad_iocmd_flash_update_part’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1580:1: warning: no previous prototype for ‘bfad_iocmd_flash_read_part’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1612:1: warning: no previous prototype for ‘bfad_iocmd_diag_temp’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1634:1: warning: no previous prototype for ‘bfad_iocmd_diag_memtest’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1657:1: warning: no previous prototype for ‘bfad_iocmd_diag_loopback’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1680:1: warning: no previous prototype for ‘bfad_iocmd_diag_fwping’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1704:1: warning: no previous prototype for ‘bfad_iocmd_diag_queuetest’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1725:1: warning: no previous prototype for ‘bfad_iocmd_diag_sfp’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1748:1: warning: no previous prototype for ‘bfad_iocmd_diag_led’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1761:1: warning: no previous prototype for ‘bfad_iocmd_diag_beacon_lport’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1776:1: warning: no previous prototype for ‘bfad_iocmd_diag_lb_stat’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1791:1: warning: no previous prototype for ‘bfad_iocmd_diag_dport_enable’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1813:1: warning: no previous prototype for ‘bfad_iocmd_diag_dport_disable’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1833:1: warning: no previous prototype for ‘bfad_iocmd_diag_dport_start’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1858:1: warning: no previous prototype for ‘bfad_iocmd_diag_dport_show’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1873:1: warning: no previous prototype for ‘bfad_iocmd_phy_get_attr’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1894:1: warning: no previous prototype for ‘bfad_iocmd_phy_get_stats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1915:1: warning: no previous prototype for ‘bfad_iocmd_phy_read’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1947:1: warning: no previous prototype for ‘bfad_iocmd_vhba_query’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1966:1: warning: no previous prototype for ‘bfad_iocmd_phy_update’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1996:1: warning: no previous prototype for ‘bfad_iocmd_porglog_get’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2016:1: warning: no previous prototype for ‘bfad_iocmd_debug_fw_core’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2050:1: warning: no previous prototype for ‘bfad_iocmd_debug_ctl’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2071:1: warning: no previous prototype for ‘bfad_iocmd_porglog_ctl’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2085:1: warning: no previous prototype for ‘bfad_iocmd_fcpim_cfg_profile’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2129:1: warning: no previous prototype for ‘bfad_iocmd_fcport_get_stats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2154:1: warning: no previous prototype for ‘bfad_iocmd_fcport_reset_stats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2178:1: warning: no previous prototype for ‘bfad_iocmd_boot_cfg’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2200:1: warning: no previous prototype for ‘bfad_iocmd_boot_query’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2222:1: warning: no previous prototype for ‘bfad_iocmd_preboot_query’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2241:1: warning: no previous prototype for ‘bfad_iocmd_ethboot_cfg’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2264:1: warning: no previous prototype for ‘bfad_iocmd_ethboot_query’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2287:1: warning: no previous prototype for ‘bfad_iocmd_cfg_trunk’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2327:1: warning: no previous prototype for ‘bfad_iocmd_trunk_get_attr’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2350:1: warning: no previous prototype for ‘bfad_iocmd_qos’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2378:1: warning: no previous prototype for ‘bfad_iocmd_qos_get_attr’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2404:1: warning: no previous prototype for ‘bfad_iocmd_qos_get_vc_attr’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2436:1: warning: no previous prototype for ‘bfad_iocmd_qos_get_stats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2468:1: warning: no previous prototype for ‘bfad_iocmd_qos_reset_stats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2499:1: warning: no previous prototype for ‘bfad_iocmd_vf_get_stats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2522:1: warning: no previous prototype for ‘bfad_iocmd_vf_clr_stats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2559:1: warning: no previous prototype for ‘bfad_iocmd_lunmask’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2582:1: warning: no previous prototype for ‘bfad_iocmd_fcpim_lunmask_query’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2596:1: warning: no previous prototype for ‘bfad_iocmd_fcpim_cfg_lunmask’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2615:1: warning: no previous prototype for ‘bfad_iocmd_fcpim_throttle_query’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2630:1: warning: no previous prototype for ‘bfad_iocmd_fcpim_throttle_set’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2645:1: warning: no previous prototype for ‘bfad_iocmd_tfru_read’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2667:1: warning: no previous prototype for ‘bfad_iocmd_tfru_write’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2689:1: warning: no previous prototype for ‘bfad_iocmd_fruvpd_read’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2711:1: warning: no previous prototype for ‘bfad_iocmd_fruvpd_update’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2733:1: warning: no previous prototype for ‘bfad_iocmd_fruvpd_get_max_size’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:3181:1: warning: no previous prototype for ‘bfad_fcxp_get_req_sgaddr_cb’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:3193:1: warning: no previous prototype for ‘bfad_fcxp_get_req_sglen_cb’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:3203:1: warning: no previous prototype for ‘bfad_fcxp_get_rsp_sgaddr_cb’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:3215:1: warning: no previous prototype for ‘bfad_fcxp_get_rsp_sglen_cb’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:3225:1: warning: no previous prototype for ‘bfad_send_fcpt_cb’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:3240:1: warning: no previous prototype for ‘bfad_fcxp_map_sg’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:3284:1: warning: no previous prototype for ‘bfad_fcxp_free_mem’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:3302:1: warning: no previous prototype for ‘bfad_fcxp_bsg_send’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:3342:1: warning: no previous prototype for ‘bfad_im_bsg_els_ct_request’ [-Wmissing-prototypes] Link: https://lore.kernel.org/r/20200721164148.2617584-36-lee.jones@linaro.org Cc: Anil Gurumurthy <anil.gurumurthy@qlogic.com> Cc: Sudarsana Kalluru <sudarsana.kalluru@qlogic.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-05-11scsi: bfa: Make bfad_iocmd_ioc_get_stats() staticJason Yan1-1/+1
Fix the following sparse warning: drivers/scsi/bfa/bfad_bsg.c:140:1: warning: symbol 'bfad_iocmd_ioc_get_stats' was not declared. Should it be static? Link: https://lore.kernel.org/r/20200505073807.40332-1-yanaijie@huawei.com Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Jason Yan <yanaijie@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-04-24scsi: bfa: Remove unneeded semicolon in bfa_fcs_rport.cJason Yan1-2/+2
Fix the following coccicheck warning: drivers/scsi/bfa/bfa_fcs_rport.c:2452:2-3: Unneeded semicolon drivers/scsi/bfa/bfa_fcs_rport.c:1578:3-4: Unneeded semicolon Link: https://lore.kernel.org/r/20200421033957.27783-1-yanaijie@huawei.com Signed-off-by: Jason Yan <yanaijie@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-04-24scsi: bfa: Remove set but not used variable 'fchs'YueHaibing1-3/+0
Fixes gcc '-Wunused-but-set-variable' warning: drivers/scsi/bfa/bfa_svc.c: In function 'uf_recv': drivers/scsi/bfa/bfa_svc.c:5520:17: warning: variable 'fchs' set but not used [-Wunused-but-set-variable] struct fchs_s *fchs; ^ Link: https://lore.kernel.org/r/20200418071057.96699-1-yuehaibing@huawei.com Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-04-24scsi: bfa: Remove unneeded semicolon in bfa_fcs_lport_ns_sm_online()Jason Yan1-1/+1
Fix the following coccicheck warning: drivers/scsi/bfa/bfa_fcs_lport.c:4361:3-4: Unneeded semicolon Link: https://lore.kernel.org/r/20200418070553.11262-1-yanaijie@huawei.com Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Jason Yan <yanaijie@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-04-14scsi: bfa: bfad.c: make max_rport_logins staticJason Yan1-1/+1
Fix the following sparse warning: drivers/scsi/bfa/bfad.c:53:17: warning: symbol 'max_rport_logins' was not declared. Should it be static? Link: https://lore.kernel.org/r/20200407032202.36789-8-yanaijie@huawei.com Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Jason Yan <yanaijie@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-04-14scsi: bfa: bfad_attr.c: make two funcitons staticJason Yan1-2/+2
Fix the following sparse warning: drivers/scsi/bfa/bfad_attr.c:441:1: warning: symbol 'bfad_im_issue_fc_host_lip' was not declared. Should it be static? drivers/scsi/bfa/bfad_attr.c:566:1: warning: symbol 'bfad_im_vport_set_symbolic_name' was not declared. Should it be static? Link: https://lore.kernel.org/r/20200407032202.36789-7-yanaijie@huawei.com Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Jason Yan <yanaijie@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-04-14scsi: bfa: bfa_ioc_ct.c: make two funcitons staticJason Yan1-2/+2
Fix the following sparse warning: drivers/scsi/bfa/bfa_ioc_ct.c:368:1: warning: symbol 'bfa_ioc_ct2_lpu_read_stat' was not declared. Should it be static? drivers/scsi/bfa/bfa_ioc_ct.c:748:1: warning: symbol 'bfa_ioc_ct2_mac_reset' was not declared. Should it be static? Link: https://lore.kernel.org/r/20200407032202.36789-6-yanaijie@huawei.com Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Jason Yan <yanaijie@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-04-14scsi: bfa: bfa_fcs_lport.c: make bfa_fcport_get_loop_attr() staticJason Yan1-1/+1
Fix the following sparse warning: drivers/scsi/bfa/bfa_fcs_lport.c:1287:1: warning: symbol 'bfa_fcport_get_loop_attr' was not declared. Should it be static? Link: https://lore.kernel.org/r/20200407032202.36789-5-yanaijie@huawei.com Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Jason Yan <yanaijie@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-04-14scsi: bfa: bfa_fcpim.c: make two functions staticJason Yan1-2/+2
Fix the following sparse warning: drivers/scsi/bfa/bfa_fcpim.c:440:1: warning: symbol 'bfa_ioim_profile_comp' was not declared. Should it be static? drivers/scsi/bfa/bfa_fcpim.c:457:1: warning: symbol 'bfa_ioim_profile_start' was not declared. Should it be static? Link: https://lore.kernel.org/r/20200407032202.36789-4-yanaijie@huawei.com Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Jason Yan <yanaijie@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-04-14scsi: bfa: bfa_core.c: make bfa_isr_rspq() staticJason Yan1-1/+1
Fix the following sparse warning: drivers/scsi/bfa/bfa_core.c:712:1: warning: symbol 'bfa_isr_rspq' was not declared. Should it be static? Link: https://lore.kernel.org/r/20200407032202.36789-3-yanaijie@huawei.com Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Jason Yan <yanaijie@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-04-14scsi: bfa: bfa_svc.c: make two functions staticJason Yan1-2/+2
Fix the following sparse warning: drivers/scsi/bfa/bfa_svc.c:4288:1: warning: symbol 'bfa_fcport_ddportenable' was not declared. Should it be static? drivers/scsi/bfa/bfa_svc.c:4297:1: warning: symbol 'bfa_fcport_ddportdisable' was not declared. Should it be static? Link: https://lore.kernel.org/r/20200407032202.36789-2-yanaijie@huawei.com Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Jason Yan <yanaijie@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-09-30scsi: bfa: Make restart_bfa staticYueHaibing1-2/+1
Fix sparse warning: drivers/scsi/bfa/bfad.c:1491:1: warning: symbol 'restart_bfa' was not declared. Should it be static? Link: https://lore.kernel.org/r/20190930094327.46836-1-yuehaibing@huawei.com Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-09-30scsi: bfa: release allocated memory in case of errorNavid Emamdoost1-1/+3
In bfad_im_get_stats if bfa_port_get_stats fails, allocated memory needs to be released. Link: https://lore.kernel.org/r/20190910234417.22151-1-navid.emamdoost@gmail.com Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-08-29scsi: bfa: remove redundant assignment to variable errorColin Ian King1-1/+1
Variable error is being initialized with a value that is never read and error is being re-assigned a little later on. The assignment is redundant and hence can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-06-05treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 292Thomas Gleixner39-351/+39
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license gpl version 2 as published by the free software foundation this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 66 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Alexios Zavras <alexios.zavras@intel.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190529141901.606369721@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-07Merge tag 'Wimplicit-fallthrough-5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linuxLinus Torvalds1-3/+3
Pull Wimplicit-fallthrough updates from Gustavo A. R. Silva: "Mark switch cases where we are expecting to fall through. This is part of the ongoing efforts to enable -Wimplicit-fallthrough. Most of them have been baking in linux-next for a whole development cycle. And with Stephen Rothwell's help, we've had linux-next nag-emails going out for newly introduced code that triggers -Wimplicit-fallthrough to avoid gaining more of these cases while we work to remove the ones that are already present. We are getting close to completing this work. Currently, there are only 32 of 2311 of these cases left to be addressed in linux-next. I'm auditing every case; I take a look into the code and analyze it in order to determine if I'm dealing with an actual bug or a false positive, as explained here: https://lore.kernel.org/lkml/c2fad584-1705-a5f2-d63c-824e9b96cf50@embeddedor.com/ While working on this, I've found and fixed the several missing break/return bugs, some of them introduced more than 5 years ago. Once this work is finished, we'll be able to universally enable "-Wimplicit-fallthrough" to avoid any of these kinds of bugs from entering the kernel again" * tag 'Wimplicit-fallthrough-5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux: (27 commits) memstick: mark expected switch fall-throughs drm/nouveau/nvkm: mark expected switch fall-throughs NFC: st21nfca: Fix fall-through warnings NFC: pn533: mark expected switch fall-throughs block: Mark expected switch fall-throughs ASN.1: mark expected switch fall-through lib/cmdline.c: mark expected switch fall-throughs lib: zstd: Mark expected switch fall-throughs scsi: sym53c8xx_2: sym_nvram: Mark expected switch fall-through scsi: sym53c8xx_2: sym_hipd: mark expected switch fall-throughs scsi: ppa: mark expected switch fall-through scsi: osst: mark expected switch fall-throughs scsi: lpfc: lpfc_scsi: Mark expected switch fall-throughs scsi: lpfc: lpfc_nvme: Mark expected switch fall-through scsi: lpfc: lpfc_nportdisc: Mark expected switch fall-through scsi: lpfc: lpfc_hbadisc: Mark expected switch fall-throughs scsi: lpfc: lpfc_els: Mark expected switch fall-throughs scsi: lpfc: lpfc_ct: Mark expected switch fall-throughs scsi: imm: mark expected switch fall-throughs scsi: csiostor: csio_wr: mark expected switch fall-through ...
2019-04-08scsi: bfa: bfa_fcpim: Mark expected switch fall-throughsGustavo A. R. Silva1-3/+3
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that I replaced "Fall through !!!" with a "fall through" annotation, which is what GCC is expecting to find. Addresses-Coverity-ID: 114971 ("Missing break in switch") Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
2019-04-08drivers: Remove explicit invocations of mmiowb()Will Deacon3-6/+1
mmiowb() is now implied by spin_unlock() on architectures that require it, so there is no reason to call it from driver code. This patch was generated using coccinelle: @mmiowb@ @@ - mmiowb(); and invoked as: $ for d in drivers include/linux/qed sound; do \ spatch --include-headers --sp-file mmiowb.cocci --dir $d --in-place; done NOTE: mmiowb() has only ever guaranteed ordering in conjunction with spin_unlock(). However, pairing each mmiowb() removal in this patch with the corresponding call to spin_unlock() is not at all trivial, so there is a small chance that this change may regress any drivers incorrectly relying on mmiowb() to order MMIO writes between CPUs using lock-free synchronisation. If you've ended up bisecting to this commit, you can reintroduce the mmiowb() calls using wmb() instead, which should restore the old behaviour on all architectures other than some esoteric ia64 systems. Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Will Deacon <will.deacon@arm.com>
2019-03-09Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsiLinus Torvalds4-42/+12
Pull SCSI updates from James Bottomley: "This is mostly update of the usual drivers: arcmsr, qla2xxx, lpfc, hisi_sas, target/iscsi and target/core. Additionally Christoph refactored gdth as part of the dma changes. The major mid-layer change this time is the removal of bidi commands and with them the whole of the osd/exofs driver and filesystem. This is a major simplification for block and mq in particular" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (240 commits) scsi: cxgb4i: validate tcp sequence number only if chip version <= T5 scsi: cxgb4i: get pf number from lldi->pf scsi: core: replace GFP_ATOMIC with GFP_KERNEL in scsi_scan.c scsi: mpt3sas: Add missing breaks in switch statements scsi: aacraid: Fix missing break in switch statement scsi: kill command serial number scsi: csiostor: drop serial_number usage scsi: mvumi: use request tag instead of serial_number scsi: dpt_i2o: remove serial number usage scsi: st: osst: Remove negative constant left-shifts scsi: ufs-bsg: Allow reading descriptors scsi: ufs: Allow reading descriptor via raw upiu scsi: ufs-bsg: Change the calling convention for write descriptor scsi: ufs: Remove unused device quirks Revert "scsi: ufs: disable vccq if it's not needed by UFS device" scsi: megaraid_sas: Remove a bunch of set but not used variables scsi: clean obsolete return values of eh_timed_out scsi: sd: Optimal I/O size should be a multiple of physical block size scsi: MAINTAINERS: SCSI initiator and target tweaks scsi: fcoe: make use of fip_mode enum complete ...
2019-03-02Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsiLinus Torvalds1-5/+13
Pull SCSI fixes from James Bottomley: "Nine small fixes. The resume fix is a cosmetic removal of a warning with an incorrect condition causing it to alarm people wrongly. The other eight patches correct a thinko in Christoph Hellwig's DMA conversion series. Without it all these drivers end up with 32 bit DMA masks meaning they bounce any page over 4GB before sending it to the controller. Nowadays, even laptops mostly have memory above 4GB, so this can lead to significant performance degradation with all the bouncing" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: core: Avoid that system resume triggers a kernel warning scsi: hptiop: fix calls to dma_set_mask() scsi: hisi_sas: fix calls to dma_set_mask_and_coherent() scsi: csiostor: fix calls to dma_set_mask_and_coherent() scsi: bfa: fix calls to dma_set_mask_and_coherent() scsi: aic94xx: fix calls to dma_set_mask_and_coherent() scsi: 3w-sas: fix calls to dma_set_mask_and_coherent() scsi: 3w-9xxx: fix calls to dma_set_mask_and_coherent() scsi: lpfc: fix calls to dma_set_mask_and_coherent()
2019-02-25scsi: bfa: fix calls to dma_set_mask_and_coherent()Hannes Reinecke1-5/+13
The change to use dma_set_mask_and_coherent() incorrectly made a second call with the 32 bit DMA mask value when the call with the 64 bit DMA mask value succeeded. [mkp: fixed commit message] Fixes: a69b080025ea ("scsi: bfa: use dma_set_mask_and_coherent") Cc: <stable@vger.kernel.org> Suggested-by: Ewan D. Milne <emilne@redhat.com> Signed-off-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Ewan D. Milne <emilne@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-01-29scsi: bfa: no need to check return value of debugfs_create functionsGreg Kroah-Hartman1-18/+0
When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. [mkp: removed unused label] Cc: Anil Gurumurthy <anil.gurumurthy@qlogic.com> Cc: Sudarsana Kalluru <sudarsana.kalluru@qlogic.com> Cc: "James E.J. Bottomley" <jejb@linux.ibm.com> Cc: "Martin K. Petersen" <martin.petersen@oracle.com> Cc: linux-scsi@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-01-11scsi: bfa: bfa_ioc: Mark expected switch fall-throughsGustavo A. R. Silva1-6/+3
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that, in this particular case, I replaced "!!! fall through !!!" comment with "fall through" annotations, which is what GCC is expecting to find. Addresses-Coverity-ID: 146155 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Acked-by: Sudarsana Kalluru <Sudarsana.Kalluru@qlogic.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-01-11scsi: bfa: bfa_fcs_rport: Mark expected switch fall-throughsGustavo A. R. Silva1-12/+7
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that I replaced "!! fall through !!" and "!!! fall through !!!" comments with "fall through" annotations, which is what GCC is expecting to find. Addresses-Coverity-ID: 744899 ("Missing break in switch") Addresses-Coverity-ID: 744900 ("Missing break in switch") Addresses-Coverity-ID: 744901 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Acked-by: Sudarsana Kalluru <Sudarsana.Kalluru@qlogic.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-01-11scsi: bfa: bfa_fcs_lport: Mark expected switch fall-throughsGustavo A. R. Silva1-6/+2
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that, in this particular case, I replaced "!!! fall through !!!" with a "fall through" annotation, which is what GCC is expecting to find. Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Acked-by: Sudarsana Kalluru <Sudarsana.Kalluru@qlogic.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-01-08cross-tree: phase out dma_zalloc_coherent()Luis Chamberlain1-3/+3
We already need to zero out memory for dma_alloc_coherent(), as such using dma_zalloc_coherent() is superflous. Phase it out. This change was generated with the following Coccinelle SmPL patch: @ replace_dma_zalloc_coherent @ expression dev, size, data, handle, flags; @@ -dma_zalloc_coherent(dev, size, handle, flags) +dma_alloc_coherent(dev, size, handle, flags) Suggested-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org> [hch: re-ran the script on the latest tree] Signed-off-by: Christoph Hellwig <hch@lst.de>
2018-12-19scsi: bfa: clean up a couple of indentation issuesColin Ian King1-2/+2
There is a break statement with an extra space that needs removed and a call to bfa_trc that is indented one level too much. Fix these. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-12-18scsi: flip the default on use_clusteringChristoph Hellwig1-2/+0
Most SCSI drivers want to enable "clustering", that is merging of segments so that they might span more than a single page. Remove the ENABLE_CLUSTERING define, and require drivers to explicitly set DISABLE_CLUSTERING to disable this feature. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-11-15scsi: bfa: use dma_set_mask_and_coherentChristoph Hellwig1-11/+7
The driver currently uses pci_set_dma_mask despite otherwise using the generic DMA API. Switch it over to the better generic DMA API helper and also ensure we set the coherent mask as well in the resume path. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-10-25Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsiLinus Torvalds4-119/+2
Pull SCSI updates from James Bottomley: "This is mostly updates of the usual drivers: UFS, esp_scsi, NCR5380, qla2xxx, lpfc, libsas, hisi_sas. In addition there's a set of mostly small updates to the target subsystem a set of conversions to the generic DMA API, which do have some potential for issues in the older drivers but we'll handle those as case by case fixes. A new myrs driver for the DAC960/mylex raid controllers to replace the block based DAC960 which is also being removed by Jens in this merge window. Plus the usual slew of trivial changes" [ "myrs" stands for "MYlex Raid Scsi". Obviously. Silly of me to even wonder. There's also a "myrb" driver, where the 'b' stands for 'block'. Truly, somebody has got mad naming skillz. - Linus ] * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (237 commits) scsi: myrs: Fix the processor absent message in processor_show() scsi: myrs: Fix a logical vs bitwise bug scsi: hisi_sas: Fix NULL pointer dereference scsi: myrs: fix build failure on 32 bit scsi: fnic: replace gross legacy tag hack with blk-mq hack scsi: mesh: switch to generic DMA API scsi: ips: switch to generic DMA API scsi: smartpqi: fully convert to the generic DMA API scsi: vmw_pscsi: switch to generic DMA API scsi: snic: switch to generic DMA API scsi: qla4xxx: fully convert to the generic DMA API scsi: qla2xxx: fully convert to the generic DMA API scsi: qla1280: switch to generic DMA API scsi: qedi: fully convert to the generic DMA API scsi: qedf: fully convert to the generic DMA API scsi: pm8001: switch to generic DMA API scsi: nsp32: switch to generic DMA API scsi: mvsas: fully convert to the generic DMA API scsi: mvumi: switch to generic DMA API scsi: mpt3sas: switch to generic DMA API ...
2018-10-16scsi: bfa: Avoid implicit enum conversion in bfad_im_post_vendor_eventNathan Chancellor2-2/+2
Clang warns when one enumerated type is implicitly converted to another. drivers/scsi/bfa/bfa_fcs_lport.c:379:26: warning: implicit conversion from enumeration type 'enum bfa_lport_aen_event' to different enumeration type 'enum bfa_ioc_aen_event' [-Wenum-conversion] BFA_AEN_CAT_LPORT, event); ^~~~~ The root cause of these warnings is the bfad_im_post_vendor_event function, which expects a value from enum bfa_ioc_aen_event but there are multiple instances of values from enums bfa_port_aen_event, bfa_audit_aen_event, and bfa_lport_aen_event being used in this function. Given that this doesn't appear to be a problem since cat helps with differentiating the events, just change evt's type to int so that no conversion needs to happen and Clang won't warn. Update aen_type's type in bfa_aen_entry_s as members that hold enumerated types should be int. Link: https://github.com/ClangBuiltLinux/linux/issues/147 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-10-16scsi: bfa: Remove unused functionsNathan Chancellor2-117/+0
Clang warns when a variable is assigned to itself. drivers/scsi/bfa/bfa_fcbuild.c:199:6: warning: explicitly assigning value of variable of type 'int' to itself [-Wself-assign] len = len; ~~~ ^ ~~~ drivers/scsi/bfa/bfa_fcbuild.c:838:6: warning: explicitly assigning value of variable of type 'int' to itself [-Wself-assign] len = len; ~~~ ^ ~~~ drivers/scsi/bfa/bfa_fcbuild.c:917:6: warning: explicitly assigning value of variable of type 'int' to itself [-Wself-assign] len = len; ~~~ ^ ~~~ drivers/scsi/bfa/bfa_fcbuild.c:981:6: warning: explicitly assigning value of variable of type 'int' to itself [-Wself-assign] len = len; ~~~ ^ ~~~ drivers/scsi/bfa/bfa_fcbuild.c:1008:6: warning: explicitly assigning value of variable of type 'int' to itself [-Wself-assign] len = len; ~~~ ^ ~~~ 5 warnings generated. This construct is usually used to avoid unused variable warnings, which I assume is the case here. -Wunused-parameter is hidden behind -Wextra with GCC 4.6, which is the minimum version to compile the kernel as of commit cafa0010cd51 ("Raise the minimum required gcc version to 4.6"). However, upon further inspection, these functions aren't actually used anywhere; they're just defined. Rather than just removing the self assignments, remove all of this dead code. Link: https://github.com/ClangBuiltLinux/linux/issues/148 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-10-02PCI/AER: Remove pci_cleanup_aer_uncorrect_error_status() callsOza Pawandeep1-2/+0
After bfcb79fca19d ("PCI/ERR: Run error recovery callbacks for all affected devices"), AER errors are always cleared by the PCI core and drivers don't need to do it themselves. Remove calls to pci_cleanup_aer_uncorrect_error_status() from device driver error recovery functions. Signed-off-by: Oza Pawandeep <poza@codeaurora.org> [bhelgaas: changelog, remove PCI core changes, remove unused variables] Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>