[PATCH] scsi: bnx2fc: fix incorrect cast to u64 on shift operation

2019-05-04 Thread Colin King
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

[PATCH] mptsas: fix undefined behaviour of a shift of an int by more than 31 places

2019-05-04 Thread Colin King
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

[PATCH] scsi: aic7xxx: fix spelling mistake "recevied" -> "received"

2019-04-18 Thread Colin King
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

[PATCH] scsi: megaraid_sas: fix spelling mistake "oustanding" -> "outstanding"

2019-04-17 Thread Colin King
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

[PATCH] scsi: qedi: fix spelling mistake "oflload" -> "offload"

2019-04-17 Thread Colin King
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

[PATCH][V2] scsi: qedf: remove memset/memcpy to nfunc and use func instead

2019-04-12 Thread Colin King
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

[PATCH] scsi: qedf: replace memset/memcpy with safer strscpy

2019-04-12 Thread Colin King
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

[PATCH][V3] scsi: cxgbi: remove redundant __kfree_skb call on skb and free cst->atid

2019-04-12 Thread Colin King
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

[PATCH][V2] scsi: cxgbi: remove redundant __kfree_skb call on skb and free cst->atid

2019-04-10 Thread Colin King
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

[PATCH] scsi: cxgbi: remove redundant __kfree_skb call on skb

2019-04-09 Thread Colin King
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

[PATCH][next] scsi: qla2xxx: fix spelling mistake "alredy" -> "already"

2019-04-08 Thread Colin King
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

[PATCH] scsi: mptfusion: fix sign-extension on large shift of 1

2019-04-05 Thread Colin King
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

[PATCH][next] scsi: lpfc: ensure error is set to -ENODEV on failing exit paths

2019-02-26 Thread Colin King
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

[PATCH] scsi: mvumi: fix 32 bit shift of a 32 bit unsigned int

2019-02-16 Thread Colin King
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

[PATCH][V2] scsi: qla2xxx: remove redundant null check on pointer sess

2019-02-15 Thread Colin King
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

[PATCH] scsi: qla2xxx: remove redundant null check on pointer sess

2019-02-13 Thread Colin King
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

[PATCH] scsi: lpfc: fix a handful of indentation issues

2019-02-12 Thread Colin King
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

[PATCH] scsi: mpt fusion: fix indentation issues

2019-02-07 Thread Colin King
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 |

[PATCH] scsi: aacraid: clean up some indentation and formatting issues

2019-02-02 Thread Colin King
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 +-

[PATCH] scsi: mvsas: clean up a few indentation issues

2019-02-02 Thread Colin King
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

[PATCH] scsi: qlogicfas408: clean up a couple of indentation issues

2019-01-23 Thread Colin King
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

[PATCH] scsi: dpt_i2o: clean up indentation issues, remove spaces

2019-01-23 Thread Colin King
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

[PATCH] scsi: hpsa: clean up two indentation issues

2019-01-22 Thread Colin King
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

[PATCH] scsi: atp870u: clean up code style and indentation issues

2019-01-22 Thread Colin King
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

[PATCH] scsi: gdth: fix indentation issue, remove a tab

2019-01-04 Thread Colin King
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

[PATCH] scsi: csiostor: fix two minor indentation issues

2019-01-04 Thread Colin King
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

[PATCH] scsi: bnx2i: fix indentation issue, remove a tab

2019-01-04 Thread Colin King
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

[PATCH][next] scsi: lpfc: replace snprintf with strscpy

2018-12-20 Thread Colin King
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

[PATCH] scsi: bfa: clean up a couple of indentation issues

2018-12-15 Thread Colin King
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

[PATCH] scsi: 3w-xxx: fix indentation issue, add missing tab

2018-12-15 Thread Colin King
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

[PATCH][scsi-next] scsi: qla2xxx: remove unused variable status

2018-12-10 Thread Colin King
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

[PATCH] scsi: mpt3sas: fix spelling mistake "manufaucturing" -> "manufacturing"

2018-11-28 Thread Colin King
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

[PATCH] scsi: aic7xxx: Fix unintended sign extension issue

2018-10-25 Thread Colin King
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

[PATCH] scsi: be2iscsi: fix spelling mistake "Retreiving" -> "Retrieving"

2018-10-16 Thread Colin King
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

[PATCH] scsi: lpfc: fix spelling mistake "Resrouce" -> "Resource"

2018-10-16 Thread Colin King
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

[PATCH] scsi: arcmsr: clean up clang warning on extraneous parentheses

2018-09-30 Thread Colin King
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 +++---

[PATCH] scsi: message: fusion: clean up clang warning on extraneous parentheses

2018-09-30 Thread Colin King
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

[PATCH] scsi: qla4xxx: remove redundant check on drvr_wait

2018-09-26 Thread Colin King
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

[PATCH] scsi: megaraid: fix spelling mistake "maibox" -> "mailbox"

2018-09-23 Thread Colin King
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

[PATCH] scsi: target: fix spelling mistake "Uknown" -> "Unknown"

2018-05-26 Thread Colin King
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

[PATCH] scsi: pm80xx: fix spelling mistake "UNSORPORTED" -> "SUPPORTED"

2018-05-26 Thread Colin King
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

[PATCH] scsi: snic: fix a couple of spelling mistakes: "COMPLETE"

2018-05-17 Thread Colin King
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 |

[PATCH] scsi: esas2r: fix spelling mistake: "requestss" -> "requests"

2018-05-08 Thread Colin King
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

[PATCH] scsi: mptsas: fix spelling mistake: "matchs" -> "matches"

2018-05-03 Thread Colin King
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

[PATCH][V2] scsi: lpfc: fix spelling mistakes: "mabilbox" and "maibox"

2018-05-03 Thread Colin King
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

[PATCH] scsi: lpfc: fix spelling mistake: "mabilbox" -> "mailbox"

2018-05-03 Thread Colin King
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

[PATCH] scsi: mptfusion: fix spelling mistake: "initators" -> "initiators"

2018-05-02 Thread Colin King
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

[PATCH] scsi: mpt3sas: fix spelling mistake: "disbale" -> "disable"

2018-04-29 Thread Colin King
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

[PATCH] scsi: megaraid_sas: fix spelling mistake: "disbale" -> "disable"

2018-04-29 Thread Colin King
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

[PATCH] scsi: esas2r: fix spelling mistake: "asynchromous" -> "asynchronous"

2018-04-27 Thread Colin King
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

[PATCH] scsi: isci: remove redundant check on in_connection_align_insertion_frequency

2018-04-25 Thread Colin King
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.

[PATCH][V2] isci: Fix infinite loop in while loop

2018-04-20 Thread Colin King
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

[PATCH] isci: Fix infinite loop in while loop

2018-04-20 Thread Colin King
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

[PATCH] scsi: mptfc: fix spelling mistake in macro names

2018-04-18 Thread Colin King
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

[PATCH][next] scsi: fnic: fix spelling mistake in fnic stats "Abord" -> "Abort"

2018-04-11 Thread Colin King
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

[PATCH][scsi-next] scsi: core: remove redundant assignment to shost->use_blk_mq

2018-03-28 Thread Colin King
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

[PATCH] scsi: fnic: fix spelling mistake: "abord" -> "abort"

2018-03-28 Thread Colin King
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

[PATCH] scsi: qla2xxx: fix spelling mistake: "existant" -> "existent"

2018-03-19 Thread Colin King
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

[PATCH][next] scsi: lpfc: make several unions static, fix non-ANSI prototype

2018-03-13 Thread Colin King
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

[PATCH] scsi: scsi_transport_spi make two const arrays static, shrinks object size

2018-02-14 Thread Colin King
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

[PATCH][scsi-next] scsi: myrb: remove shadowed and unassigned variable ldev_num

2018-02-14 Thread Colin King
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

[PATCH][scsi-next] scsi: myrs: ensure sge_count is set correctly

2018-02-14 Thread Colin King
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

[PATCH][scsi-next] scsi: myrs: Fix spelling mistake: "Cashe"-> "Cache"

2018-02-14 Thread Colin King
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

[PATCH] scsi: pmcraid: remove redundant initializations of pointer 'ioadl'

2018-02-06 Thread Colin King
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

[PATCH] scsi: libfc: remove redundant initialization of 'disc'

2018-02-06 Thread Colin King
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

[PATCH] scsi: isci: remove redundant initialization to 'bit'

2018-02-06 Thread Colin King
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

[PATCH] scsi: qedf: remove redundant initialization of 'fcport'

2018-02-06 Thread Colin King
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

[PATCH] scsi: csiostor: remove redundant assignment to pointer 'ln'

2018-01-24 Thread Colin King
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

[PATCH] scsi: mptsas: remove duplicated assignment to pointer head

2018-01-16 Thread Colin King
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

[PATCH][scsi-next] scsi: mpt3sas: make function _get_st_from_smid static

2018-01-11 Thread Colin King
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

[PATCH] scsi: bfa: use ARRAY_SIZE for array sizing calculation on array __pciids

2018-01-07 Thread Colin King
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

[PATCH][scsi-next] scsi: qla2xxx: remove redundant assignment of d

2018-01-05 Thread Colin King
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

[PATCH][scsi-next] scsi: aacraid: remove redundant setting of variable c

2018-01-05 Thread Colin King
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

[PATCH] scsi: lpfc: fix a couple of minor indentation issues

2017-12-21 Thread Colin King
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

[PATCH] scsi: lpfc: don't dereference localport before it has been null checked

2017-12-21 Thread Colin King
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

[PATCH][next] scsi: arcmsr: remove redundant check for secs < 0

2017-12-08 Thread Colin King
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

[PATCH] scsi: fusion: clean up some indentations

2017-12-06 Thread Colin King
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

[PATCH] scsi: ipr: fix incorrect indentation of assignment statement

2017-12-01 Thread Colin King
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

[PATCH] scsi: csiostor: fix spelling mistake: "Couldnt" -> "Couldn't"

2017-12-01 Thread Colin King
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

[PATCH] scsi: bnx2fc: fix spelling mistake: "Couldnt" -> "Couldn't"

2017-12-01 Thread Colin King
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

[PATCH] scsi: wd719x: make card_types static const, shrinks object size

2017-11-28 Thread Colin King
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

[PATCH] scsi: sym53c8xx_2: use setup_timer instead of init_timer

2017-11-24 Thread Colin King
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

[PATCH] scsi: bfa: use setup_timer instead of init_timer

2017-11-24 Thread Colin King
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

[PATCH] bfa: remove unused pointer 'port'

2017-11-15 Thread Colin King
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 |

[PATCH] scsi: aacraid: remove unused variable managed_request_id

2017-11-15 Thread Colin King
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

[PATCH] scsi: megaraid_sas: fix spelling mistake: "thershold" -> "threshold"

2017-11-02 Thread Colin King
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

[PATCH] scsi: aic7xxx: make a couple of functions static

2017-10-05 Thread Colin King
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

[PATCH] scsi: libsas: remove unused variable sas_ha

2017-09-26 Thread Colin King
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

[PATCH] scsi: libfc: fix potential null lport dereference

2017-09-20 Thread Colin King
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

[PATCH] ufs: make const array setup_attrs static to shink object code size

2017-09-16 Thread Colin King
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

[PATCH] scsi: scsi_transport_spi: make const arrays static to shink object code size

2017-09-16 Thread Colin King
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

[PATCH] scsi: ufs: tc-dwc-g210: make arrays static, reduces object code size

2017-09-12 Thread Colin King
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

[PATCH] scsi: lpfc: remove redundant null check on eqe

2017-09-08 Thread Colin King
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

[PATCH] csi: libcxgbi: remove redundant check and close on csk

2017-09-07 Thread Colin King
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 --

[PATCH] scsi: qla2xxx: fix spelling mistake of variable sfp_additonal_info

2017-08-16 Thread Colin King
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/

[PATCH] scsi: add missing indent on a for loop statement

2017-08-15 Thread Colin King
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

[PATCH] scsi: mpt3sas: fix pr_info message continuation

2017-08-15 Thread Colin King
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_

[PATCH] scsi: dpt_i2o: remove redundant null check on array device

2017-08-09 Thread Colin King
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

[PATCH] scsi: hisi_sas: make several const arrays static

2017-07-11 Thread Colin King
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

[PATCH] target: make device_mutex and device_list static

2017-07-04 Thread Colin King
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   2   >