Commit graph

406 commits

Author SHA1 Message Date
Gustavo A. R. Silva
56a4d69a26 scsi: bfa: Replace one-element array with flexible-array member in struct fc_rscn_pl_s
One-element and zero-length arrays are deprecated. So, replace one-element
array in struct fc_rscn_pl_s with flexible-array member.

This results in no differences in binary output.

Link: https://github.com/KSPP/linux/issues/339
Signed-off-by: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/ZN0VTpDBOSVHGayb@work
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2023-08-21 17:13:56 -04:00
Azeem Shaikh
973464fded scsi: bfa: Replace all non-returning strlcpy() with strscpy()
strlcpy() reads the entire source buffer first.  This read may exceed the
destination size limit.  This is both inefficient and can lead to linear
read overflows if a source string is not NUL-terminated [1].  In an effort
to remove strlcpy() completely [2], replace strlcpy() here with strscpy().
No return values were used, so direct replacement is safe.

[1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy
[2] https://github.com/KSPP/linux/issues/89

Signed-off-by: Azeem Shaikh <azeemshaikh38@gmail.com>
Link: https://lore.kernel.org/r/20230516013345.723623-1-azeemshaikh38@gmail.com
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2023-05-16 21:38:36 -04:00
Bjorn Helgaas
b54e1e47b5 scsi: bfa: Drop redundant pci_enable_pcie_error_reporting()
pci_enable_pcie_error_reporting() enables the device to send ERR_*
Messages.  Since commit f26e58bf6f ("PCI/AER: Enable error reporting when
AER is native"), the PCI core does this for all devices during enumeration,
so the driver doesn't need to do it itself.

Remove the redundant pci_enable_pcie_error_reporting() call from the
driver.  Also remove the corresponding pci_disable_pcie_error_reporting()
from the driver .remove() path.

Note that this only controls ERR_* Messages from the device.  An ERR_*
Message may cause the Root Port to generate an interrupt, depending on the
AER Root Error Command register managed by the AER service driver.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://lore.kernel.org/r/20230307182842.870378-5-helgaas@kernel.org
Cc: Anil Gurumurthy <anil.gurumurthy@qlogic.com>
Cc: Sudarsana Kalluru <sudarsana.kalluru@qlogic.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2023-03-09 22:00:38 -05:00
Gustavo A. R. Silva
c4c5fa3556 scsi: bfa: Replace one-element array with flexible-array member
One-element arrays are deprecated, and we are replacing them with flexible
array members instead. So, replace one-element array with flexible-array
member in struct fdmi_attr_s.

Important to mention is that doing a build before/after this patch results
in no binary output differences.

This helps with the ongoing efforts to tighten the FORTIFY_SOURCE routines
on memcpy() and help us make progress towards globally enabling
-fstrict-flex-arrays=3 [1].

Link: https://github.com/KSPP/linux/issues/209
Link: https://github.com/KSPP/linux/issues/79
Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [1]
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/Y3P1rEEBq7HzJygq@work
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2022-11-17 18:15:45 +00:00
Bart Van Assche
2e79cf37b1 scsi: bfa: Rework bfad_reset_sdev_bflags()
Since commit f93ed747e2 ("scsi: core: Release SCSI devices
synchronously") it is no longer allowed to call scsi_device_put() from
atomic context.

Rework bfad_reset_sdev_bflags() such that scsi_device_put() is no longer
called. This fixes the following smatch warning:

drivers/scsi/bfa/bfad_bsg.c:2551 bfad_iocmd_lunmask_reset_lunscan_mode() warn: sleeping in atomic context

bfad_iocmd_lunmask() <- disables preempt
-> bfad_iocmd_lunmask_reset_lunscan_mode()
   -> scsi_device_put()

Cc: Anil Gurumurthy <anil.gurumurthy@qlogic.com>
Cc: Sudarsana Kalluru <sudarsana.kalluru@qlogic.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20221031224728.2607760-5-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2022-11-08 03:34:39 +00:00
Bart Van Assche
2e5a6c3bac scsi: bfa: Convert bfad_reset_sdev_bflags() from a macro into a function
Before modifying bfad_reset_sdev_bflags(), convert it from a macro into a
function.

Cc: Anil Gurumurthy <anil.gurumurthy@qlogic.com>
Cc: Sudarsana Kalluru <sudarsana.kalluru@qlogic.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20221031224728.2607760-4-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2022-11-08 03:34:39 +00:00
ran jianping
4c0df601e1 scsi: bfa: Remove unneeded flush_workqueue()
All work currently pending will be done first by calling
destroy_workqueue(). There is no need to flush it explicitly.

Link: https://lore.kernel.org/r/20220424061845.3218774-1-ran.jianping@zte.com.cn
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ran jianping <ran.jianping@zte.com.cn>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2022-04-25 23:38:38 -04:00
Haowen Bai
8e897c8466 scsi: bfa: Remove redundant NULL check
Fix the following warning reported by coccicheck:

drivers/scsi/bfa/bfad_debugfs.c:375:2-7: WARNING: NULL check before some freeing functions is not needed.

Link: https://lore.kernel.org/r/1647309434-13936-1-git-send-email-baihaowen@meizu.com
Signed-off-by: Haowen Bai <baihaowen@meizu.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2022-04-25 23:23:05 -04:00
Bart Van Assche
34f5b537a9 scsi: bfa: Stop using the SCSI pointer
Set .cmd_size in the SCSI host template instead of using the SCSI pointer
from struct scsi_cmnd. This patch prepares for removal of the SCSI pointer
from struct scsi_cmnd.

Link: https://lore.kernel.org/r/20220218195117.25689-17-bvanassche@acm.org
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2022-02-22 21:11:04 -05:00
Martin K. Petersen
ac2beb4e3b Merge branch '5.17/scsi-fixes' into 5.18/scsi-staging
Pull 5.17 fixes branch into 5.18 tree to resolve a few pm8001 driver
merge conflicts.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2022-02-14 21:51:29 -05:00
Yang Guang
2245ea91fd scsi: bfa: Replace snprintf() with sysfs_emit()
coccinelle report:
./drivers/scsi/bfa/bfad_attr.c:908:8-16:
WARNING: use scnprintf or sprintf
./drivers/scsi/bfa/bfad_attr.c:860:8-16:
WARNING: use scnprintf or sprintf
./drivers/scsi/bfa/bfad_attr.c:888:8-16:
WARNING: use scnprintf or sprintf
./drivers/scsi/bfa/bfad_attr.c:853:8-16:
WARNING: use scnprintf or sprintf
./drivers/scsi/bfa/bfad_attr.c:808:8-16:
WARNING: use scnprintf or sprintf
./drivers/scsi/bfa/bfad_attr.c:728:8-16:
WARNING: use scnprintf or sprintf
./drivers/scsi/bfa/bfad_attr.c:822:8-16:
WARNING: use scnprintf or sprintf
./drivers/scsi/bfa/bfad_attr.c:927:9-17:
WARNING: use scnprintf or sprintf
./drivers/scsi/bfa/bfad_attr.c:900:8-16:
WARNING: use scnprintf or sprintf
./drivers/scsi/bfa/bfad_attr.c:874:8-16:
WARNING: use scnprintf or sprintf
./drivers/scsi/bfa/bfad_attr.c:714:8-16:
WARNING: use scnprintf or sprintf
./drivers/scsi/bfa/bfad_attr.c:839:8-16:
WARNING: use scnprintf or sprintf

Use sysfs_emit() instead of scnprintf() or sprintf().

Link: https://lore.kernel.org/r/def83ff75faec64ba592b867a8499b1367bae303.1643181468.git.yang.guang5@zte.com.cn
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Yang Guang <yang.guang5@zte.com.cn>
Signed-off-by: David Yang <davidcomponentone@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2022-01-31 16:59:59 -05:00
Christophe JAILLET
012d98dae4 scsi: bfa: Remove useless DMA-32 fallback configuration
As stated in [1], dma_set_mask() with a 64-bit mask never fails if
dev->dma_mask is non-NULL. So, if it fails, the 32-bit case will also fail
for the same reason.

Simplify code and remove some dead code accordingly.

[1]: https://lore.kernel.org/linux-kernel/YL3vSPK5DXTNvgdx@infradead.org/#t

Link: https://lore.kernel.org/r/5663cef9b54004fa56cca7ce65f51eadfc3ecddb.1642238127.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2022-01-24 23:30:29 -05:00
Bart Van Assche
69e623791e scsi: bfa: Declare 'bfad_im_vport_attrs' static
Fix the following kernel-doc warning:

'bfad_im_vport_attrs' is only used in one source file. Hence declare this
array static.

Link: https://lore.kernel.org/r/20211129194609.3466071-7-bvanassche@acm.org
Fixes: e73af234a1 ("scsi: bfa: Switch to attribute groups")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-11-29 23:02:14 -05:00
Bart Van Assche
e73af234a1 scsi: bfa: Switch to attribute groups
struct device supports attribute groups directly but does not support
struct device_attribute directly. Hence switch to attribute groups.

Link: https://lore.kernel.org/r/20211012233558.4066756-15-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-10-16 21:45:54 -04:00
Bart Van Assche
af049dfd0b scsi: core: Remove the 'done' argument from SCSI queuecommand_lck functions
The DEF_SCSI_QCMD() macro passes the addresses of the SCSI host lock and
also that of the scsi_done function to the queuecommand_lck() function
implementations. Remove the 'scsi_done' argument since its address is
now a constant and instead call 'scsi_done' directly from inside the
queuecommand_lck() functions.

Link: https://lore.kernel.org/r/20211007204618.2196847-14-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-10-16 21:32:16 -04:00
Bart Van Assche
4316b5b8b2 scsi: bfa: Call scsi_done() directly
Conditional statements are faster than indirect calls. Hence call
scsi_done() directly.

Link: https://lore.kernel.org/r/20211007202923.2174984-25-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-10-16 21:28:45 -04:00
Jiapeng Chong
8f942f9d4b scsi: bfa: Fix inconsistent indenting
Eliminate the follow smatch warning:

drivers/scsi/bfa/bfa_svc.c:3176 bfa_fcport_send_enable() warn:
inconsistent indenting.

Link: https://lore.kernel.org/r/1621590368-72041-1-git-send-email-jiapeng.chong@linux.alibaba.com
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-05-21 17:01:18 -04:00
zuoqilin
1ecc820db0 scsi: bfa: Fix typo
Change 'chnage' to 'change'.

Link: https://lore.kernel.org/r/20210521092153.379-1-zuoqilin1@163.com
Signed-off-by: zuoqilin <zuoqilin@yulong.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-05-21 17:00:21 -04:00
Christophe JAILLET
4803bd066c scsi: bfa: Remove some unused variables
'lp' is unused, it is just declared and zeroed

Remove it.

Link: https://lore.kernel.org/r/d10ccee35e35bf33d651f2e0163034d7c451520b.1618944442.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-05-15 14:46:43 -04:00
Wan Jiabing
c3b0d08776 scsi: bfa: Remove unnecessary struct declarations
struct bfa_fcs_s is declared twice. First is declared at line 50, remove
the duplicate.

struct bfa_fcs_fabric_s is defined at line 175, remove unnecessary
declaration.

Link: https://lore.kernel.org/r/20210401063535.992487-1-wanjiabing@vivo.com
Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-04-05 23:44:01 -04:00
Bhaskar Chowdhury
9991ca001b scsi: bfa: Fix a typo in two places
s/defintions/definitions/  ....two different places.

Link: https://lore.kernel.org/r/20210322205821.1449844-1-unixbhaskar@gmail.com
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-03-24 23:06:27 -04:00
Jiapeng Chong
1630e752fb scsi: bfa: Fix warning comparing pointer to 0
Fix the following coccicheck warning:

./drivers/scsi/bfa/bfad_bsg.c:3412:29-30: WARNING comparing pointer to
0.

Link: https://lore.kernel.org/r/1615880930-120780-1-git-send-email-jiapeng.chong@linux.alibaba.com
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-03-24 22:35:39 -04:00
Lee Jones
a7a11b6cfe scsi: bfa: Move a large struct from the stack onto the heap
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/bfa/bfa_fcs_lport.c: In function ‘bfa_fcs_lport_fdmi_build_rhba_pyld’:
 drivers/scsi/bfa/bfa_fcs_lport.c:2152:1: warning: the frame size of 1200 bytes is larger than 1024 bytes [-Wframe-larger-than=]

Link: https://lore.kernel.org/r/20210312094738.2207817-15-lee.jones@linaro.org
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: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-03-15 22:28:58 -04:00
Hannes Reinecke
eb74b9322b scsi: bfa: Drop driver-defined SCSI status codes
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>
2021-01-22 21:14:08 -05:00
Gustavo A. R. Silva
4c7bd259d6 scsi: bfa: Fix fall-through warnings for Clang
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-12-02 12:59:46 -05:00
Linus Torvalds
af995383eb SCSI misc on 20201023
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.
 
 Signed-off-by: James E.J. Bottomley <jejb@linux.ibm.com>
 -----BEGIN PGP SIGNATURE-----
 
 iJwEABMIAEQWIQTnYEDbdso9F2cI+arnQslM7pishQUCX5MkQCYcamFtZXMuYm90
 dG9tbGV5QGhhbnNlbnBhcnRuZXJzaGlwLmNvbQAKCRDnQslM7pishRkuAPsEAR/W
 NS7J7j66rF2x15xGR2CNB4R6FEBSd/hdOPp7cQEA4rtLKKI53W4oydKsfTux6N6o
 MLZJIHM5nTitk++AVQs=
 =QgpC
 -----END PGP SIGNATURE-----

Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

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-23 16:19:02 -07:00
Jing Xiangfeng
f0f6c3a4fc scsi: bfa: Fix error return in bfad_pci_init()
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: 11ea382414 ("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-10-07 23:50:04 -04:00
Gustavo A. R. Silva
df561f6688 treewide: Use fallthrough pseudo-keyword
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-08-23 17:36:59 -05:00
Lee Jones
64332c13d0 scsi: bfa: Ensure a blank line precedes next function/header
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-24 22:33:06 -04:00
Lee Jones
20e73cb1d0 scsi: bfa: Demote seemingly unintentional kerneldoc header
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-24 22:33:04 -04:00
Lee Jones
310531ffc3 scsi: bfa: Demote seemingly unintentional kerneldoc header
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-24 22:33:04 -04:00
Lee Jones
b1a187f261 scsi: bfa: Demote non-kerneldoc headers down to standard comment blocks
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-24 22:33:00 -04:00
Lee Jones
e95fcb7792 scsi: bfa: Remove unused variable 'adisc'
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-24 22:32:08 -04:00
Lee Jones
eaefa33014 scsi: bfa: Demote non-compliant kerneldoc headers to standard comments
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-24 22:32:07 -04:00
Lee Jones
00025fc7e6 scsi: bfa: Staticify non-external functions
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-24 22:32:06 -04:00
Lee Jones
c7ccd038b7 scsi: bfa: Remove a few unused variables 'pgoff' and 't'
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-24 22:32:04 -04:00
Lee Jones
7106de1d8a scsi: bfa: Demote seemingly unintentional kerneldoc header
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-24 22:31:58 -04:00
Lee Jones
70b4de0bb9 scsi: bfa: Remove set but unused variable 'rp'
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-24 22:31:57 -04:00
Lee Jones
0aaaa04a7a scsi: bfa: Staticify local functions
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-24 22:31:56 -04:00
Lee Jones
3bbd8ef9f7 scsi: bfa: Staticify all local functions
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-07-24 22:10:02 -04:00
Jason Yan
102026483d scsi: bfa: Make bfad_iocmd_ioc_get_stats() static
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-05-11 22:22:07 -04:00
Jason Yan
f71ded01cc scsi: bfa: Remove unneeded semicolon in bfa_fcs_rport.c
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-24 18:21:15 -04:00
YueHaibing
0745c834f7 scsi: bfa: Remove set but not used variable 'fchs'
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-24 18:21:15 -04:00
Jason Yan
f166021c0f scsi: bfa: Remove unneeded semicolon in bfa_fcs_lport_ns_sm_online()
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-24 18:21:15 -04:00
Jason Yan
4d5956fb51 scsi: bfa: bfad.c: make max_rport_logins static
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-14 21:34:53 -04:00
Jason Yan
938b18462e scsi: bfa: bfad_attr.c: make two funcitons static
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-14 21:34:52 -04:00
Jason Yan
eae9b1788a scsi: bfa: bfa_ioc_ct.c: make two funcitons static
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-14 21:34:51 -04:00
Jason Yan
901ad27c69 scsi: bfa: bfa_fcs_lport.c: make bfa_fcport_get_loop_attr() static
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-14 21:34:51 -04:00
Jason Yan
84a2fd236d scsi: bfa: bfa_fcpim.c: make two functions static
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-14 21:34:50 -04:00
Jason Yan
b9ddee1ee1 scsi: bfa: bfa_core.c: make bfa_isr_rspq() static
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-14 21:34:50 -04:00