From: Colin Ian King
Currently an int is being shifted and the result is being cast to a u64
which leads to undefined behaviour if the shift is more than 31 bits. Fix
this by casting the integer value 1 to u64 before the shift operation.
Addresses-Coverity: ("Bad shift operation")
Fixes: 7b59476
From: Colin Ian King
Currently the shift of int value 1 by more than 31 places can result
in undefined behaviour. Fix this by making the 1 a ULL value before the
shift operation.
Addresses-Coverity: ("Bad shift operation")
Fixes: 547f9a218436 ("[SCSI] mptsas: wide port support")
Signed-off-by: C
From: Colin Ian King
There is a spelling mistake in a kernel message, fix it.
Signed-off-by: Colin Ian King
---
drivers/scsi/aic7xxx/aic7xxx_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/aic7xxx/aic7xxx_core.c
b/drivers/scsi/aic7xxx/aic7xxx_core.c
ind
From: Colin Ian King
There are a couple of spelling mistakes in some kernel info and notice
messages. Fix these.
Signed-off-by: Colin Ian King
---
drivers/scsi/megaraid/megaraid_sas_base.c | 2 +-
drivers/scsi/megaraid/megaraid_sas_fusion.c | 2 +-
2 files changed, 2 insertions(+), 2 deletio
From: Colin Ian King
There are a couple of spelling mistakes in some kernel alert messages.
Fix these.
Signed-off-by: Colin Ian King
---
drivers/scsi/qedi/qedi_iscsi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/qedi/qedi_iscsi.c b/drivers/scsi/qedi/qed
From: Colin Ian King
Currently the qedf_dbg_* family of functions can overrun the end
of the source string if it is less than the destination buffer
length because of the use of a fixed sized memcpy. Remove the
memset/memcpy calls to nfunc and just use func instead as it
is always a null terminat
From: Colin Ian King
Currently the qedf_dbg_* family of functions can overrun the end
of the source string if it is less than the destination buffer
length because of the use of a fixed sized memcpy. Replace the
memset/memcpy calls with the safer strscpy as this won't overrun
the end of the sourc
From: Colin Ian King
The error return path via label rel_resource checks for a non-null
skb before free'ing it. However, skb is always null at this exit
path, so the null check and the free are redundant and can be removed.
Removing this allows the original goto's to rel_resource to be cleaned
u
From: Colin Ian King
The error return path via label rel_resource checks for a non-null
skb before free'ing it. However, skb is always null at this exit
path, so the null check and the free are redundant and can be removed.
Removing this allows the original goto's to rel_resource to be cleaned
u
From: Colin Ian King
The error return path via label rel_resource checks for a non-null
skb before free'ing it. However, skb is always null at this exit
path, so the null check and the free are redundant and can be removed.
Removing this allows the original goto's to rel_resource to be cleaned
u
From: Colin Ian King
There is a spelling mistake in a ql_log message. Fix it.
Signed-off-by: Colin Ian King
---
drivers/scsi/qla2xxx/qla_nvme.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/qla2xxx/qla_nvme.c b/drivers/scsi/qla2xxx/qla_nvme.c
index 1ca63e80a7
From: Colin Ian King
Shifting the int value 1 can lead to sign-extension overflow when the shift
is 31 bits and ending up with the upper 32 bits being set. Fix this by
shifting 1ULL instead of 1.
Signed-off-by: Colin Ian King
---
drivers/message/fusion/mptsas.c | 6 +++---
1 file changed, 3 i
From: Colin Ian King
A previous commit assigned error to the return value from the call to
dma_set_mask_and_coherent and on the non-failure path error is zero. The
subsequent error return paths now return 0 instead of -ENODEV causing
failures to now be ignored. Fix this by setting error to -ENOD
From: Colin Ian King
Currently m_sg->baseaddr_h (a 32 bit unsigned int) is being shifted by a
total of 32 bits; this always produces a 0 result. Fix this by casting
it to a dma_addr_t (a 64 bit unsigned int) before performing the shift.
Detected by CoverityScan, CID#147270 ("Operands don't affe
From: Colin Ian King
The null check on pointer sess and the subsequent call is redundant
as sess is null on all the the paths that lead to the out_term2 label.
Hence the null check and the call can be removed. Also remove the
redundant setting of sess to NULL as this is not required now.
Detect
From: Colin Ian King
The null check on pointer sess and the subsequent call is redundant
as sess is null on all the the paths that lead to the out_term2 label.
Hence the null check and the call can be removed.
Detected by CoverityScan, CID#1420663 ("Logically dead code")
Signed-off-by: Colin Ia
From: Colin Ian King
There are a handful of statements that are indented incorrectly. Fix these.
Signed-off-by: Colin Ian King
---
drivers/scsi/lpfc/lpfc_bsg.c | 4 ++--
drivers/scsi/lpfc/lpfc_debugfs.c | 4 ++--
drivers/scsi/lpfc/lpfc_init.c| 2 +-
drivers/scsi/lpfc/lpfc_mbox.c| 4
From: Colin Ian King
There are several statements and code blocks there are incorrectly
indented. Fix these.
Signed-off-by: Colin Ian King
---
drivers/message/fusion/mptctl.c | 2 +-
drivers/message/fusion/mptsas.c | 40 +++
drivers/message/fusion/mptscsih.c |
From: Colin Ian King
There are several issues with badly indented statements. Fix these
and clean up the formatting.
Signed-off-by: Colin Ian King
---
drivers/scsi/aacraid/commsup.c | 25 +
drivers/scsi/aacraid/linit.c | 3 +--
drivers/scsi/aacraid/src.c | 2 +-
From: Colin Ian King
There are a few statements that are not indented correctly,
so fix these. Also add empty line between variable declaration and
first statements in functions. Also remove whitespace between *
and mvi_dev to clean up a cppcheck warning.
Signed-off-by: Colin Ian King
---
driv
From: Colin Ian King
An if statement is indented correctly and an outb statement has
a redundant empty comment and incorrect indentation. Fix these.
Signed-off-by: Colin Ian King
---
drivers/scsi/qlogicfas408.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scs
From: Colin Ian King
There are several lines where the indentation has an extra space,
fix this by removing the spaces.
Signed-off-by: Colin Ian King
---
drivers/scsi/dpt_i2o.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scs
From: Colin Ian King
There are two statements that are indented incorrectly. Fix these.
Signed-off-by: Colin Ian King
---
drivers/scsi/hpsa.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index ff67ef5d5347..528fdd10 10064
From: Colin Ian King
Clean up { brace to fix cppcheck warning. Remove some trailing spaces
at end of a statement. Also clean up an indentation issue.
Signed-off-by: Colin Ian King
---
drivers/scsi/atp870u.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/scs
From: Colin Ian King
A goto statement is indented incorrectly, fix this by removing a tab.
Signed-off-by: Colin Ian King
---
drivers/scsi/gdth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c
index 194c294f9b6c..159a4e301c4d 100644
From: Colin Ian King
Two statements are indented incorrectly, fix these by removing
a tab and a space.
Signed-off-by: Colin Ian King
---
drivers/scsi/csiostor/csio_mb.c | 2 +-
drivers/scsi/csiostor/csio_scsi.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/sc
From: Colin Ian King
The return statement is indented incorrectly, fix this by removing a
single tab.
Signed-off-by: Colin Ian King
---
drivers/scsi/bnx2i/bnx2i_iscsi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c b/drivers/scsi/bnx2i/bnx
From: Colin Ian King
Using snprintf without a format specifier is potentially risky if the
string phba->ModelDesc contains format specifiers. Replace this with
the safer and more efficient strscpy.
Cleans up clang warning:
drivers/scsi/lpfc/lpfc_scsi.c:4543:31: warning: format string is not a
st
From: Colin Ian King
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
---
drivers/scsi/bfa/bfa_ioc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/driv
From: Colin Ian King
There is a tab missing on a return statement, add the missing tab.
Signed-off-by: Colin Ian King
---
drivers/scsi/3w-.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/3w-.c b/drivers/scsi/3w-.c
index a58257645e94..04164d2f03dd
From: Colin Ian King
Variable 'status' is declared but not used, remove it.
Cleans up warning:
warning: unused variable ‘status’ [-Wunused-variable]
Signed-off-by: Colin Ian King
---
drivers/scsi/qla2xxx/qla_os.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi
From: Colin Ian King
There is a spelling mistake in some description text, fix it.
Signed-off-by: Colin Ian King
---
drivers/scsi/mpt3sas/mpt3sas_config.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/mpt3sas/mpt3sas_config.c
b/drivers/scsi/mpt3sas/mpt3sas_c
From: Colin Ian King
In the expression "ahc_inb(ahc, port+3) << 24", the initial value is a
u8, but is promoted to a signed int, then sign-extended to uint64_t. If
the value read from the port has the upper bit set then the sign
extension will set all the upper bits of the expression which is pr
From: Colin Ian King
Trivial fix to spelling mistake in beiscsi_log message.
Signed-off-by: Colin Ian King
---
drivers/scsi/be2iscsi/be_iscsi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/be2iscsi/be_iscsi.c b/drivers/scsi/be2iscsi/be_iscsi.c
index c8f0a214
From: Colin Ian King
Trivial fix to spelling mistake in lpfc_printf_log message text.
Signed-off-by: Colin Ian King
---
drivers/scsi/lpfc/lpfc_init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 0bd3ae99
From: Colin Ian King
There are extraneous parantheses that are causing clang to produce a
warning so remove these.
Clean up 3 clang warnings:
equality comparison with extraneous parentheses [-Wparentheses-equality]
Signed-off-by: Colin Ian King
---
drivers/scsi/arcmsr/arcmsr_hba.c | 6 +++---
From: Colin Ian King
There are extraneous parantheses that are causing clang to produce a
warning so remove these. Also replace pointer comparison with NULL
with the !ptr idiom.
Clean up clang warnings:
equality comparison with extraneous parentheses [-Wparentheses-equality]
Signed-off-by: Coli
From: Colin Ian King
The check for a non-zero drvr_wait is redundant as the same check
is performed earlier in the outer while loop, the inner check will
always be true if we reached this point inside the while loop.
Remove the redundant if check.
Detected by cppcheck:
(warning) Identical inner
From: Colin Ian King
Trivial fix to spelling mistake in warning message and comments
Signed-off-by: Colin Ian King
---
drivers/scsi/megaraid/megaraid_mbox.c | 4 ++--
drivers/scsi/megaraid/megaraid_mbox.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/megar
From: Colin Ian King
Trivial fix to spelling mistake in pr_err message text
Signed-off-by: Colin Ian King
---
drivers/target/target_core_transport.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/target/target_core_transport.c
b/drivers/target/target_core_transpor
From: Colin Ian King
Trivial fix to spelling mistake in pm8001_printk message text; also
I believe NOT_UNSUPPORTED should probably be NOT_SUPPORTED. Also
fix the indent of the pm8001_printk statement.
Signed-off-by: Colin Ian King
---
drivers/scsi/pm8001/pm8001_hwi.c | 2 +-
1 file changed, 1
From: Colin Ian King
Trivial fix to spelling mistakes/typos:
"SNIC_IOREQ_ABTS_COMPELTE" -> "SNIC_IOREQ_ABTS_COMPLETE"
"SNIC_IOREQ_LR_COMPELTE" -> "SNIC_IOREQ_LR_COMPLETE"
"SNIC_IOREQ_CMD_COMPELTE" -> "SNIC_IOREQ_CMD_COMPLETE"
Signed-off-by: Colin Ian King
---
drivers/scsi/snic/snic_scsi.c |
From: Colin Ian King
Trivial fix to spelling mistake in esas2r_debug message
Signed-off-by: Colin Ian King
---
drivers/scsi/esas2r/esas2r_ioctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/esas2r/esas2r_ioctl.c
b/drivers/scsi/esas2r/esas2r_ioctl.c
index 9
From: Colin Ian King
Trivial fix to spelling mistake in warning message
Signed-off-by: Colin Ian King
---
drivers/message/fusion/mptsas.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c
index 86503f60468f..9a
From: Colin Ian King
Trivial fix to spelling mistakes in lpfc_printf_log log message
"mabilbox" -> "mailbox"
"maibox" -> "mailbox"
Signed-off-by: Colin Ian King
---
V2: Add maibox fixes
---
drivers/scsi/lpfc/lpfc_bsg.c | 20 ++--
drivers/scsi/lpfc/lpfc_init.c | 4 ++--
2 f
From: Colin Ian King
Trivial fix to spelling mistake in lpfc_printf_log log message
Signed-off-by: Colin Ian King
---
drivers/scsi/lpfc/lpfc_init.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 060f0e
From: Colin Ian King
Trivial fix to spelling mistake in text string
Signed-off-by: Colin Ian King
---
drivers/message/fusion/mptbase.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index 51eb1b027963..72e
From: Colin Ian King
Trivial fix to spelling mistake in module parameter description text
Signed-off-by: Colin Ian King
---
drivers/scsi/mpt3sas/mpt3sas_base.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c
b/drivers/scsi/mpt3sas/mpt3sa
From: Colin Ian King
Trivial fix to spelling mistake in module parameter description text
Signed-off-by: Colin Ian King
---
drivers/scsi/megaraid/megaraid_sas_base.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c
b/drivers/scsi/me
From: Colin Ian King
Trivial fix to spelling mistake in module description text
Signed-off-by: Colin Ian King
---
drivers/scsi/esas2r/esas2r_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/esas2r/esas2r_main.c
b/drivers/scsi/esas2r/esas2r_main.c
index e
From: Colin Ian King
The sanity check on u->in_connection_align_insertion_frequency is being
performed twice and hence the first check can be removed since it is
redundant. Cleans up cppcheck warning:
drivers/scsi/ibmvscsi/ibmvscsi.c:1711: (warning) Identical inner 'if'
condition is always true.
From: Colin Ian King
In the case when the phy_mask is bitwise anded with the
phy_index bit is zero the continue statement currently jumps
to the next iteration of the while loop and phy_index is
never actually incremented, potentially causing an infinite
loop if phy_index is less than SCI_MAX_PHS
From: Colin Ian King
In the case when the phy_mask is bitwise anded with the
phy_index bit is zero the continue statement currently jumps
to the next iteration of the while loop and phy_index is
never actually incremented, potentially causing an infinite
loop if phy_index is less than SCI_MAX_PHS
From: Colin Ian King
Rename macros MPI_FCPORTPAGE0_SUPPORT_SPEED_UKNOWN and
MPI_FCPORTPAGE0_CURRENT_SPEED_UKNOWN to add in missing N in UNKNOWN
Signed-off-by: Colin Ian King
---
drivers/message/fusion/lsi/mpi_cnfg.h | 4 ++--
drivers/message/fusion/mptfc.c| 2 +-
2 files changed, 3 ins
From: Colin Ian King
Trivial fix to spelling mistake in fnic stats message text
Signed-off-by: Colin Ian King
---
drivers/scsi/fnic/fnic_trace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/fnic/fnic_trace.c b/drivers/scsi/fnic/fnic_trace.c
index abddde11982
From: Colin Ian King
The first assignment to shost->use_blk_mq is redundant as it is
overwritten by the following statement. Remove this redundant code.
Detected by CoverityScan, CID#1466993 ("Unused value")
Signed-off-by: Colin Ian King
---
drivers/scsi/hosts.c | 1 -
1 file changed, 1 delet
From: Colin Ian King
Trivial fix to spelling mistake in message text
Signed-off-by: Colin Ian King
---
drivers/scsi/fnic/fnic_trace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/fnic/fnic_trace.c b/drivers/scsi/fnic/fnic_trace.c
index abddde11982b..98597b59
From: Colin Ian King
Trivial fix to spelling mistake in debug message text
Signed-off-by: Colin Ian King
---
drivers/scsi/qla2xxx/qla_target.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/qla2xxx/qla_target.c
b/drivers/scsi/qla2xxx/qla_target.c
index 245005
From: Colin Ian King
There are several unions that are local to the source and do not need
to be in global scope, so make them static. Also add in a missing void
parameter to functions lpfc_nvme_cmd_template and
lpfc_nvmet_cmd_template to clean up non-ANSI warning.
Cleans up sparse warnings:
dri
From: Colin Ian King
Don't populate the const read-only arrays spi_test_unit_ready and
spi_test_unit_ready on the stack but instead make them static. Makes the
object code smaller by over 100 bytes:
Before:
textdata bss dec hex filename
40171 12832 128 53131cf8b
From: Colin Ian King
A lower-scoped variable ldev_num is never assigned and is shadowing
the higher scoped iterator ldev_num and should be removed to avoid
using garbage ldev_num values.
Detected by CoverityScan, CID#1465226 ("Uninitialized scalar variable")
Fixes: dd47c1072226 ("scsi: myrb: Ad
From: Colin Ian King
The DMA size is not being assigned to sge_count, instead sge_addr is
being assigned this value, which is incorrected.
Detected by CoverityScan, CID#1465233 ("Unused value")
Fixes: 8a8606895947 ("scsi: myrs: Add Mylex RAID controller (SCSI interface)")
Signed-off-by: Colin I
From: Colin Ian King
Trivial fix to spelling mistake in info message text.
Signed-off-by: Colin Ian King
---
drivers/scsi/myrs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/myrs.c b/drivers/scsi/myrs.c
index 3b87c6942a8e..16498e1b0dd4 100644
--- a/drivers/s
From: Colin Ian King
There are several occurrances where pointer ioadl is initialized with a
value that is never read and where it is re-assigned a new value later
on, hence the initialization is redundant and can be removed.
Cleans up clang warnings:
drivers/scsi/pmcraid.c:1028:29: warning: Val
From: Colin Ian King
Pointer disc is being intializated a value that is never read and then
re-assigned the same value later on, hence the initialization is redundant
and can be removed.
Cleans up clang warning:
drivers/scsi/libfc/fc_disc.c:734:18: warning: Value stored to 'disc'
during its init
From: Colin Ian King
Variable bit is initialized with a value that is never read and is
being updated immediately after the initialization, hence the
initialization is redundant and can be removed.
Cleans up clang warning:
drivers/scsi/isci/host.c:2769:8: warning: Value stored to 'bit' during
it
From: Colin Ian King
Pointer fcport is initialized with a value that is never read, it is
re-assigned a new value later on, hence the initialization is redundant
and can be removed.
Cleans up clang warning:
drivers/scsi/qedf/qedf_io.c:920:21: warning: Value stored to 'fcport'
during its initiali
From: Colin Ian King
The pointer ln is assigned a value that is never read, it is re-assigned
a new value in the list_for_each loop hence the initialization is
redundant and can be removed.
Cleans up clang warning:
drivers/scsi/csiostor/csio_lnode.c:117:21: warning: Value stored to 'ln'
during i
From: Colin Ian King
The pointer head is re-assigned the same value twice, so remove the
second redundant assignment.
Cleans up clang warning:
drivers/message/fusion/mptsas.c:1161:20: warning: Value stored to 'head'
during its initialization is never read
Signed-off-by: Colin Ian King
---
dri
From: Colin Ian King
The function _get_st_from_smid is local to the source and does
not need to be in global scope, so make it static.
Cleans up sparse warning:
symbol '_get_st_from_smid' was not declared. Should it be static?
Signed-off-by: Colin Ian King
---
drivers/scsi/mpt3sas/mpt3sas_bas
From: Colin Ian King
Use the ARRAY_SIZE macro on array __pciids to determine size of the array.
Improvement suggested by coccinelle.
Signed-off-by: Colin Ian King
---
drivers/scsi/bfa/bfa_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/bfa/bfa_core.c b/d
From: Colin Ian King
The initialization of d is redundant as this value is never read
and it is overwritten inside the subsequent for-loop. Remove this
redundant assignment.
Cleans up clang warning:
drivers/scsi/qla2xxx/qla_gs.c:3985:29: warning: Value stored to 'd'
during its initialization is
From: Colin Ian King
A previous commit no longer stores the contents of c, so we now have
a situation where c is being updated but the value is never read. Clean
up the code by removing the now redundant setting of variable c.
Cleans up clang warning:
drivers/scsi/aacraid/aachba.c:943:3: warning
From: Colin Ian King
Several statements are indented too far, fix these
Signed-off-by: Colin Ian King
---
drivers/scsi/lpfc/lpfc_els.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
index dfb21d9efb0d..234
From: Colin Ian King
localport is being dereferenced to assign lport and then immediately
afterwards localport is being sanity checked to see if it is null.
Fix this by only dereferencing localport until after it has been
null checked.
Detected by CoverityScan, CID#1463038 ("Dereference before n
From: Colin Ian King
The check for secs being less than zero is redundant for two reasons.
Firstly, secs is unsigned so the check is always going to be false.
Secondly, if secs was signed the proceeding calculation of secs is
never going to be negative. Hence we can remove this redundant check
a
From: Colin Ian King
There are several places where the source is not indented correctly
with either too many or too few levels of intentation. Fix these.
Signed-off-by: Colin Ian King
---
drivers/message/fusion/mptbase.c | 57
1 file changed, 29 insert
From: Colin Ian King
Remove one extraneous level of indentation on an assignment statement.
Signed-off-by: Colin Ian King
---
drivers/scsi/ipr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index cc0187965eee..e07dd990e585 1006
From: Colin Ian King
Trivial fix to spelling mistake in error message text.
Signed-off-by: Colin Ian King
---
drivers/scsi/csiostor/csio_mb.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/csiostor/csio_mb.c b/drivers/scsi/csiostor/csio_mb.c
index 931b1d
From: Colin Ian King
Trivial fix to spelling mistake in error message text.
Signed-off-by: Colin Ian King
---
drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
index e
From: Colin Ian King
Don't populate the read-only array card_types on the stack but instead
make it static and constify it. Makes the object code smaller by over
110 bytes:
Before:
textdata bss dec hex filename
256255752 0 313777a91 drivers/scsi/wd719x.o
Aft
From: Colin Ian King
Use setup_timer function instead of initializing timer with the
function and data fields.
Signed-off-by: Colin Ian King
---
drivers/scsi/sym53c8xx_2/sym_glue.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c
b/dri
From: Colin Ian King
Use setup_timer function instead of initializing timer with the
function and data fields.
Signed-off-by: Colin Ian King
---
drivers/scsi/bfa/bfad.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/scsi/bfa/bfad.c b/drivers/scsi/bfa/bfad.c
ind
From: Colin Ian King
The pointer 'port' is being assigned but it is never read,
hence it is redundant and can be removed. Cleans up clang warning:
drivers/scsi/bfa/bfad_attr.c:505:2: warning: Value stored to 'port'
is never read
Signed-off-by: Colin Ian King
---
drivers/scsi/bfa/bfad_attr.c |
From: Colin Ian King
Variable managed_request_id is being assigned but it is never read,
hence it is redundant and can be removed. Cleans up clang warning:
drivers/scsi/aacraid/linit.c:706:5: warning: Value stored to
'managed_request_id' is never read
Signed-off-by: Colin Ian King
---
drivers
From: Colin Ian King
Trivial fix to spelling mistake in dev_info message
Signed-off-by: Colin Ian King
---
drivers/scsi/megaraid/megaraid_sas_fusion.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c
b/drivers/scsi/megaraid/megara
From: Colin Ian King
Functions ahc_devlimited_syncrate and ahc_linux_initialize_scsi_bus
are declared static in their prototypes but are missing in their
definitions, so add the missing static.
Cleans up sparse warnings:
symbol 'ahc_devlimited_syncrate' was not declared. Should it be static?
sym
From: Colin Ian King
Remove unused variable sas_ha to clean up build warning
"unused variable ‘sas_ha’ [-Wunused-variable]"
Fixes: 042ebd293b86 ("scsi: libsas: kill useless ha_event and do some cleanup")
Signed-off-by: Colin Ian King
---
drivers/scsi/hisi_sas/hisi_sas_main.c | 1 -
1 file chan
From: Colin Ian King
Don't pass a null lport to FC_LPORT_DBG as this causes a null pointer
dereference when accessing lport->host and lport->port_id. Instead
use the FC_CHECK_LOGGING macro to print the kernel message via pr_info.
Detected by CoverityScan, CID#113198 ("Dereference after null chec
From: Colin Ian King
Don't populate const array setup_attrs on the stack, instead make it
static. Makes the object code smaller by over 120 bytes:
Before:
textdata bss dec hex filename
1588 208 01796 704 drivers/scsi/ufs/ufshcd-dwc.o
After:
textda
From: Colin Ian King
Don't populate const arrays on the stack, instead make them static.
Makes the object code smaller by over 530 bytes:
Before:
37010 14144 128 51282c852 drivers/scsi/scsi_transport_spi.o
After:
textdata bss dec hex filename
36312 14304
From: Colin Ian King
Don't populate const arrays on the stack, instead make them
static. Makes the object code smaller by over 740 bytes.
Before:
textdata bss dec hex filename
3840 208 04048 fd0 drivers/scsi/ufs/tc-dwc-g210.o
After:
textdata b
From: Colin Ian King
The pointer eqe is always non-null inside the while loop, so the
check to see if eqe is NULL is redudant and hence can be removed.
Detected by CoverityScan CID#1248693 ("Logically Dead Code")
Signed-off-by: Colin Ian King
---
drivers/scsi/lpfc/lpfc_sli.c | 3 ---
1 file c
From: Colin Ian King
csk is always null on the error return path and so the non-null
check and call to cxgbi_sock_closed on csk is redundant and
can be removed.
Detected by: CoverityScan CID#114329 ("Logically dead code")
Signed-off-by: Colin Ian King
---
drivers/scsi/cxgbi/libcxgbi.c | 2 --
From: Colin Ian King
Trivial fix to variable name, sfp_additonal_info should be
sfp_additional_info (add in missing i).
Signed-off-by: Colin Ian King
---
drivers/scsi/qla2xxx/qla_isr.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/
From: Colin Ian King
The for loop is statement is missing an indent, add it.
Signed-off-by: Colin Ian King
---
drivers/scsi/osst.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c
index 97ab5f160bc6..241908aca468 100644
--- a/drivers
From: Colin Ian King
An optional discovery status should be printed with a pr_cont
and needs a leading space to make it more readable. The final
new line should also be a pr_cont and the indentation is out
by one, so fix that too.
Signed-off-by: Colin Ian King
---
drivers/scsi/mpt3sas/mpt3sas_
From: Colin Ian King
The null check on pHba->channel[chan].device is redundant because
device is an array and hence can never be null. Remove the check.
Detected by CoverityScan, CID#115362 ("Array compared against 0")
Signed-off-by: Colin Ian King
---
drivers/scsi/dpt_i2o.c | 5 -
1 file
From: Colin Ian King
Don't populate various tables on the stack but make them static const.
Makes the object code smaller by over 280 bytes:
Before:
textdata bss dec hex filename
398875080 64 45031afe7 hisi_sas_v2_hw.o
After:
textdata bss dec
From: Colin Ian King
Variables device_mutex and device_list static are local to the source,
so make them static.
Cleans up sparse warnings:
"symbol 'device_list' was not declared. Should it be static?"
"symbol 'device_mutex' was not declared. Should it be static?"
Signed-off-by: Colin Ian King
1 - 100 of 182 matches
Mail list logo