]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mpt3sas: Fix warnings exposed by W=1
authorCalvin Owens <calvinowens@fb.com>
Fri, 29 Jul 2016 04:38:22 +0000 (21:38 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Mon, 6 Mar 2017 21:24:07 +0000 (13:24 -0800)
commitb0c3e48115a18dd5d63d137c45c087d1e9b4c148
treebe8759a005fdf5c82f0910f554543ea895ec96cb
parent8bffdd75d1030f843838a4891ed6ee67da9b7288
mpt3sas: Fix warnings exposed by W=1

Orabug: 25535122

Trivial non-functional changes for a couple annoying things:

  1) Functions local to files are not declared static, which is
  frustrating when reading the code because it's non-obvious at first
  glance what's actually called from other files.

  2) Set-but-unused variables abound, presumably to mask -Wunused-result
  errors in the past. None of these are flagged today though (with one
  exception noted below), so remove them.

Fixing (2) exposed the fact that we improperly ignore the return value
of scsi_device_reprobe() in _scsih_reprobe_lun(). Fixing the calling
code to deal with the potential error is non-trivial, so for now just
WARN().

Signed-off-by: Calvin Owens <calvinowens@fb.com>
Acked-by: Chaitra P B <chaitra.basappa@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 8bbb1cf63f5e345685d42749606d0474cfde6def)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/scsi/mpt3sas/mpt3sas_base.c
drivers/scsi/mpt3sas/mpt3sas_config.c
drivers/scsi/mpt3sas/mpt3sas_ctl.c
drivers/scsi/mpt3sas/mpt3sas_scsih.c
drivers/scsi/mpt3sas/mpt3sas_transport.c