[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

[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 ---

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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 ++--

[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

[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 ---

[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

[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.

[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

[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:

[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

[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

[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:

[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

[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:

[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

[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:

[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

[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

[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

[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'

[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:

[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

[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,

[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

[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

[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

[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

[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

[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

[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(-)

[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

[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

[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:

[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

[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

[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 ---

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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:

[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?"

[PATCH][V2] scsi: qedf: fix spelling mistake: "offlading" -> "offloading"

2017-07-03 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in QEDF_INFO message and remove duplicated "since" (thanks to Tyrel Datwyler for spotting the latter issue). Signed-off-by: Colin Ian King --- drivers/scsi/qedf/qedf_main.c | 2 +- 1 file

[PATCH] scsi: qedi: fix another spelling mistake: "alloction" -> "allocation"

2017-07-03 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in QEDF_ERR message. I should have also included this in a previous fix, but I only just spotted this one. Signed-off-by: Colin Ian King --- drivers/scsi/qedi/qedi_fw.c | 2 +- 1 file

[PATCH] scsi: isci: fix typo in function names

2017-07-03 Thread Colin King
From: Colin Ian King There are a couple of typos in function names and spelling of request where the letters u and e are swapped: scu_ssp_reqeust_construct_task_context scu_sata_reqeust_construct_task_context Fix the spelling of request. Signed-off-by: Colin Ian King

[PATCH] scsi: qedf: fix spelling mistake: "offlading" -> "offloading"

2017-07-03 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in QEDF_INFO message Signed-off-by: Colin Ian King --- drivers/scsi/qedf/qedf_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/qedf/qedf_main.c

[PATCH][V2] scsi: snic: fix a couple of spelling mistakes/typos

2017-06-30 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistakes/typos: "requrest_irq" -> "request_irq" "Firmwqre" -> "Firmware" Signed-off-by: Colin Ian King --- drivers/scsi/snic/snic_isr.c | 4 ++-- drivers/scsi/snic/snic_scsi.c | 2 +- 2 files

[PATCH] scsi: snic: fix a couple of spelling mistakes/typos

2017-06-30 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistakes/typos: "Allodating" -> "Allocating" "incative" -> "inactive" Signed-off-by: Colin Ian King --- drivers/scsi/snic/snic_isr.c | 4 ++-- drivers/scsi/snic/snic_scsi.c | 2 +- 2 files

[PATCH][scsi-next] scsi: qla2xxx: fix a bunch of typos and spelling mistakes

2017-06-30 Thread Colin King
From: Colin Ian King Fix the following typos/spelling mistakes: "attribure" -> "attribute" "suppored" -> "supported" "Symobilic" -> "Symbolic" "iteself" -> "itself" "reqeust" -> "request" "nvme_wait_on_comand" -> "nvme_wait_on_command" "bount" -> "bound" "captrue_mask"

[PATCH] scsi: hpsa: fix spelling mistake: "encrypytion" -> "encryption"

2017-06-26 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in dev_info message Signed-off-by: Colin Ian King --- drivers/scsi/hpsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c

[PATCH] scsi: hptiop: make function hptiop_iop_request_callback_itl static

2017-06-22 Thread Colin King
From: Colin Ian King The function hptiop_iop_request_callback_itl does not need to be in global scope, so make it static. Cleans up sparse warning: "symbol 'hptiop_iop_request_callback_itl' was not declared. Should it be static?" Signed-off-by: Colin Ian King

[PATCH][V2][target-devel-next] tcmu: make array tcmu_attrib_attrs static const

2017-06-13 Thread Colin King
From: Colin Ian King The array tcmu_attrib_attrs does not need to be in global scope, so make it static. Cleans up sparse warning: "symbol 'tcmu_attrib_attrs' was not declared. Should it be static?" Signed-off-by: Colin Ian King ---

[PATCH][target-devel-next] tcmu: make array tcmu_attrib_attrs static const

2017-06-13 Thread Colin King
From: Colin Ian King The guid intel_dsm_guid does not need to be in global scope, so make it static. Cleans up sparse warning: "symbol 'tcmu_attrib_attrs' was not declared. Should it be static?" Signed-off-by: Colin Ian King ---

[PATCH][scsi-next] scsi: qla2xxx: remove redundant null check on tgt

2017-06-05 Thread Colin King
From: Colin Ian King An earlier commit ed7fb808477b846bb2 ("scsi: qla2xxx: Remove redundant wait when target is stopped.") removed a null check on ha->tgt.tgt_ops and replaced it with a new check that null checked tgt, thus making the subsequent null check on tgt

[PATCH] scsi: lpfc: fix spelling mistake "entrys" -> "entries"

2017-05-26 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in debugfs message Signed-off-by: Colin Ian King --- drivers/scsi/lpfc/lpfc_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c

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

2017-05-18 Thread Colin King
From: Colin Ian King functions lpfc_nvmet_cleanup_io_context and lpfc_nvmet_setup_io_context can be made static as they do not need to be in global scope. Cleans up sparse warnings: "warning: symbol 'lpfc_nvmet_cleanup_io_context' was not declared. Should it be

[PATCH] scsi: aacraid: fix leak of data from stack back to userspace

2017-05-15 Thread Colin King
From: Colin Ian King The fields sense_data_size and sense_data are unitialized garbage from the stack and are being copied back to userspace. Fix this leak of stack information by ensuring they are zero'd. Detected by CoverityScan, CID#1435473 ("Uninitialized scalar

[PATCH] target/iscsi: make function target_parse_xcopy_cmd static

2017-05-11 Thread Colin King
From: Colin Ian King Making target_parse_xcopy_cmd static fixes sparse warning: "warning: symbol 'target_parse_xcopy_cmd' was not declared. Should it be static?" Fixes: 1bd05294519f76 ("target/iscsi: Fix a deadlock between the XCOPY code and session shutdown")

[PATCH] scsi: qla4xxx: check for null return from iscsi_lookup_endpoint

2017-05-07 Thread Colin King
From: Colin Ian King iscsi_lookup_endpoint can potentially return null and in 9 out of the 10 calls to this function a null return is checked, so I think it is pertinent to perform a null check here too and return -EINVAL as in the other null cases. Detected by

[PATCH] scsi: lpfc: ensure els_wq is being checked before destroying it

2017-05-06 Thread Colin King
From: Colin Ian King I believe there is a typo on the wq destroy of els_wq, currently the driver is checking if els_cq is not null and I think this should be a check on els_wq instead. Detected by CoverityScan, CID#1411629 ("Copy-paste error") Signed-off-by: Colin Ian

[PATCH] scsi: pmcraid: remove redundant check to see if request_size is less than zero

2017-05-03 Thread Colin King
From: Colin Ian King The 2nd check to see if request_size is less than zero is redundant because the first check takes error exit path on this condition. So, since it is redundant, remove it. Detected by CoverityScan, CID#146149 ("Logically Dead Code") Signed-off-by:

[PATCH] qla4xxx: fix spelling mistake: "Tempalate" -> "Template"

2017-04-25 Thread Colin King
From: Colin Ian King trivial fix to spelling mistake in DEBUG2 debug message Signed-off-by: Colin Ian King --- drivers/scsi/qla4xxx/ql4_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] scsi: stex: make S6flag static

2017-04-25 Thread Colin King
From: Colin Ian King This module specific flag can be made static as it does not need to be in global scope. Signed-off-by: Colin Ian King --- drivers/scsi/stex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] scsi: fcoe: make fcoe_e_d_tov and fcoe_r_a_tov static

2017-04-24 Thread Colin King
From: Colin Ian King These module parameter variables don't need global scope, make them static Signed-off-by: Colin Ian King --- drivers/scsi/fcoe/fcoe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH] scsi: fusion: fix spelling mistake: "Persistancy" -> "Persistency"

2017-04-22 Thread Colin King
From: Colin Ian King trivial fix to spelling mistake 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

[PATCH] [SCSI] aic7xxx: remove redundant assignment to error

2017-04-18 Thread Colin King
From: Colin Ian King error is initially assigned to ENOENT and a few statements later is re-assigned to the error return from the call to ahd_wait_seeprom, hence the initial assignment is redundant and can be removed. Signed-off-by: Colin Ian King

[PATCH] scsi: fc: remove redundant check of an unsigned long being less than zero

2017-04-14 Thread Colin King
From: Colin Ian King The check for an unsigned long being less than zero is always false so it is a redundant check and can be removed. Detected by static analysis with by PVS-Studio Signed-off-by: Colin Ian King ---

[PATCH] snic: fix spelling mistake: "Cann't" -> "Cannot"

2017-04-12 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake in SNIC_ERR error message text, one cannot have "Cann't". Signed-off-by: Colin Ian King --- drivers/scsi/snic/snic_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH] [SCSI] aic7xxx: fix order of arguments in function prototype

2017-04-08 Thread Colin King
From: Colin Ian King The vendor/device and subvendor/subdevice arguments to the function prototype ahc_9005_subdevinfo_valid are in the wrong order and need to be swapped to fix this. Detected with PVS-Studio studio. Signed-off-by: Colin Ian King

[PATCH] scsi: qla2xxx: remove some redundant pointer assignments

2017-04-06 Thread Colin King
From: Colin Ian King There are several local or function parameter pointers that are being assigned NULL after a kfree where and these have no effect and hence can be removed. Fixes various cppcheck warnings: "Assignment of function parameter has no effect outside the

[PATCH] scsi: hisi_sas: add missing break in switch statement

2017-03-28 Thread Colin King
From: Colin Ian King It appears that a break in the TRANS_TX_OPEN_CNX_ERR_NO_DESTINATION case got accidentally removed in an earlier commit, as it stands, the ts->stat and ts->open_rej_reason are being updated twice for this case which looks incorrect. Fix this by

[PATCH] qla2xxx: remove redundant check on sess being non-null

2017-03-23 Thread Colin King
From: Colin Ian King All error paths to label out_term2 result in sess being null, so the check for sess being non-null and the call to put_sess is dead code and can therefore be removed. Detected with CoverityScan, CID#1420664 ("Logically dead code") Signed-off-by:

[PATCH] scsi: pm8001: build in relevant functions and code on PM8001_USE_MSIX

2017-03-22 Thread Colin King
From: Colin Ian King Currently the misx and intx variables of the interrupt enable/disable helper functions are built in no matter what the setting of the macro PM8001_USE_MSIX. Clean this up by just building in the necessary helper functions and calls to these

[PATCH] scsi: fcoe: sanity check string size for store_ctrl_mode option

2017-03-22 Thread Colin King
From: Colin Ian King Reading and writing to mode[count - 1] implies the count should not be less than 1 so add a sanity check for this. Detected with CoverityScan, CID#1357345 ("Overflowed array index write") Signed-off-by: Colin Ian King

[PATCH] [SCSI] esas2r: remove redundant NULL check on buffer

2017-03-15 Thread Colin King
From: Colin Ian King buffer is a pointer to the static char array event_buffer and therefore can never be null, so the check is redundant. Remove it. Detected by CoverityScan, CID#1077556 ("Logically Dead Code") Signed-off-by: Colin Ian King

[PATCH][V2] scsi: cxgb3i: remove redundant null check and kfree on skb

2017-03-14 Thread Colin King
From: Colin Ian King On the error exit path, skb is always null, so the non-null check and __kfree_skb call are redundant. Remove the redundant code and just directly return with the appropriate error return code. Detected by CoverityScan, CID#114328 ("Logically Dead

[PATCH] scsi: cxgb3i: remove redundant null check and kfree on skb

2017-03-13 Thread Colin King
From: Colin Ian King On the error exit path, skb is always null, so the non-null check and __kfree_skb call are redundant. Remove the redundant code, rename the rel_release label to err and make error paths jump to the err exit path. Detected by CoverityScan,

[PATCH] scsi: qedi: fix missing return error code check on call to qedi_setup_int

2017-02-28 Thread Colin King
From: Colin Ian King The call to qedi_setup_int is not updating the return code rc yet rc is being checked for an error. Fix this by assigning rc to the return code from the call to qedi_setup_int. Signed-off-by: Colin Ian King ---

[PATCH] scsi: aacraid: remove redundant zero check on ret

2017-02-24 Thread Colin King
From: Colin Ian King The check for ret being zero is redundant as a few statements earlier we break out of the while loop if ret is non-zero. Thus we can remove the zero check and also the dead-code non-zero case too. Detected by CoverityScan, CID#1411632 ("Logically

[PATCH] scsi: lpfc: fix missing spin_unlock on sql_list_lock

2017-02-24 Thread Colin King
From: Colin Ian King In the case where sglq is null, the current code just returns without unlocking the spinlock sql_list_lock. Fix this by breaking out of the while loop and the exit path will then unlock and return NULL as was the original intention. Detected by

[PATCH] scsi: lpfc: don't dereference dma_buf->iocbq before null check

2017-02-24 Thread Colin King
From: Colin Ian King dma_buf->iocbq is being dereferenced immediately before it is being null checked, so we have a potential null pointer dereference bug. Fix this by only dereferencing it only once we have passed a null check on the pointer. Detected by

[PATCH] scsi: lpfc: sanity check hrq is null before dereferencing it

2017-02-24 Thread Colin King
From: Colin Ian King The sanity check for hrq should be moved to before the deference of hrq to ensure we don't perform a null pointer deference. Detected by CoverityScan, CID#1411650 ("Dereference before null check") Signed-off-by: Colin Ian King

  1   2   >