[PATCH] scsi_debug: test always evaluates to false, || should be used instead

2015-01-22 Thread Colin King
From: Colin Ian King colin.k...@canonical.com cppcheck found the following issue: (warning) Logical conjunction always evaluates to false: alloc_len 4 alloc_len 65535. ..the test should be instead: if (alloc_len 4 || alloc_len 65536) This error was introduced by recent commit

[PATCH] scsi: ufs: fix typo in dev_err error message

2015-02-28 Thread Colin King
From: Colin Ian King colin.k...@canonical.com Fix typo, Intialization - Initialization Signed-off-by: Colin Ian King colin.k...@canonical.com --- drivers/scsi/ufs/ufshcd-pltfrm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/ufs/ufshcd-pltfrm.c

[PATCH] megaraid_sas: insert missing space in kernel message

2015-06-09 Thread Colin King
From: Colin Ian King colin.k...@canonical.com The printk format specifier string is missing a space between the %p format specifier and the on the defer text. Minor fix, add the missing space. Signed-off-by: Colin Ian King colin.k...@canonical.com --- drivers/scsi/megaraid/megaraid_sas_base.c |

[PATCH] [SCSI] bfa: fix missing { } braces

2015-08-03 Thread Colin King
From: Colin Ian King colin.k...@canonical.com Static analysis by smatch indicated that there was a curly braces issue: drivers/scsi/bfa/bfa_ioc.c:3668 bfa_cb_sfp_state_query() warn: curly braces intended? drivers/scsi/bfa/bfa_ioc.c:3671 bfa_cb_sfp_state_query() warn: inconsistent

[PATCH] scsi: a100u2w: trivial typo in printk

2015-07-29 Thread Colin King
From: Colin Ian King colin.k...@canonical.com Trivial typo fix, \b should be \n Signed-off-by: Colin Ian King colin.k...@canonical.com --- drivers/scsi/a100u2w.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/a100u2w.c b/drivers/scsi/a100u2w.c index

[PATCH] lpfc: fix double free on mp

2015-07-31 Thread Colin King
From: Colin Ian King colin.k...@canonical.com The error path when the call to lpfc_sli_issue_mbox returns MBX_NOT_FINISHED results in the code freeing mp and calling lpfc_mbuf_free twice. Fix this by jumping to the correct part of the error clean up path. Signed-off-by: Colin Ian King

[PATCH] megaraid_sas: fix missing { } braces

2015-08-03 Thread Colin King
From: Colin Ian King colin.k...@canonical.com Static analysis by smatch indicated that there was a curly braces issue: drivers/scsi/megaraid/megaraid_sas_base.c:6139 megasas_mgmt_fw_ioctl() warn: curly braces intended? Add braces in the appropriate place so that kbuf_arr[i] gets set to NULL

[PATCH] cciss: print max outstanding commands as a hex value

2015-12-06 Thread Colin King
From: Colin Ian King The max outstanding commands is being printed with a 0x prefix to suggest it is a hex value, when in fact the integer decimal %d format specifier is being used and this is a bit confusing. Use %x instead to match the proceeding 0x prefix.

[PATCH] scsi: mvsas: fix indenting on return error code

2016-01-05 Thread Colin King
From: Colin Ian King The return code and error return is incorrectly indented which may cause some confusion as it appears at first sight to be associated with a device not ready error (with missing { } braces) rather than a DEV_IS_GONE() failure. The incorrect

[PATCH] scsi: ufs: fix spelling mistake in error message

2015-11-28 Thread Colin King
From: Colin Ian King Minor issue, fix spelling mistake, Intialization -> Initialization Signed-off-by: Colin Ian King --- drivers/scsi/ufs/ufshcd-pltfrm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] bnx2i: fix spelling mistake "complection" -> "completion"

2016-06-04 Thread Colin King
From: Colin Ian King trivial fix to spelling mistake in printk message Signed-off-by: Colin Ian King --- drivers/scsi/bnx2i/bnx2i_hwi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/bnx2i/bnx2i_hwi.c

[PATCH] target: fix spelling mistake: "limitiation" -> "limitation"

2016-06-22 Thread Colin King
From: Colin Ian King trivial fix to spelling mistake Signed-off-by: Colin Ian King --- drivers/target/target_core_file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/target/target_core_file.c

[PATCH] tcm_qla2xxx: fix spelling mistake: "seperator" -> "separator"

2016-06-23 Thread Colin King
From: Colin Ian King trivial fix to spelling mistake in pr_err message Signed-off-by: Colin Ian King --- drivers/scsi/qla2xxx/tcm_qla2xxx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] snic: correctly check for array overrun on overly long version number

2016-02-25 Thread Colin King
From: Colin Ian King The snic version number is expected to be 4 decimals in the form like a netmask string with each number stored in an element in array v. However, there is an off-by-one check on the number of elements in v allowing one to pass a 5 decimal version

[PATCH] megaraid_sas: trivial fix, add missing space in dev_err message

2016-04-25 Thread Colin King
From: Colin Ian King Add a missing space in dev_err message, missed because the string spans a few lines. Signed-off-by: Colin Ian King --- drivers/scsi/megaraid/megaraid_sas_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH] target: need_to_release is always false, remove redundant check and kfree

2016-05-05 Thread Colin King
From: Colin Ian King The removal the #ifdef'd code on CONFIG_ARCH_HAS_SG_CHAIN in commit 02c4de53add1b79 ("target/rd: always chain S/G list") removed the setting of need_to_release to true, so we are now left with need_to_release always being false and hence the

[PATCH] scsi, block: fix memory leak of sdpk on when gd fails to allocate

2017-02-03 Thread Colin King
From: Colin Ian King On an allocation failure of gd, the current exit path is via out_free_devt which leaves sdpk still allocated and hence it gets leaked. Fix this by correcting the order of resource free'ing with a change in the error exit path labels. Detected by

[PATCH] scsi_dh_emc: fix uninitialized return value ret

2017-01-31 Thread Colin King
From: Colin Ian King ret is uninitialized on a successful execution of clarrion_std_inquiry and a garbage return value is being returted. Fix this by setting ret to zero on the success exit path. Found by CoverityScan, CID#1398889 ("Uninitialized scaler variable")

[PATCH] scsi: aacraid: rcode is unsigned, so can never be less than zero

2017-02-07 Thread Colin King
From: Colin Ian King The check on rcode >= 0 is always true because rcode is unsigned and can never be less than zero. Remove the redundant check. Signed-off-by: Colin Ian King --- drivers/scsi/aacraid/aachba.c | 2 +- 1 file changed, 1

[PATCH][V2] scsi: aacraid: rcode is unsigned and should be signed int

2017-02-07 Thread Colin King
From: Colin Ian King aac_fib_send can return -ve error returns and hence rcode should be signed. Currently the rcode >= 0 check is always true and -ve errors are not being checked. Thanks to Dan Carpenter for spotting my original broken fix to this issue.

[PATCH] scsi: aacraid: fix information leak on hbainfo.driver_name

2017-02-07 Thread Colin King
From: Colin Ian King The driver_name field is not initialized and hence information on the stack is being leaked to userspace on the copy_to_user. Fix this. Signed-off-by: Colin Ian King --- drivers/scsi/aacraid/commctrl.c | 2 +- 1 file

[PATCH] scsi: BusLogic: fix incorrect spelling of adatper_reset_req

2017-02-21 Thread Colin King
From: Colin Ian King trivial fix to spelling mistake, adatper_reset_req should be adapter_reset_req. Also break up very long seq_printf statement into multiple lines. Signed-off-by: Colin Ian King --- drivers/scsi/BusLogic.c | 14

[PATCH] scsi: fusion: fix spelling mistakes of "primitive"

2017-02-17 Thread Colin King
From: Colin Ian King trivial fix to spelling mistakes of "primitive" and also re-join a literal string that spans 2 lines to squelch a checkpatch warning. Signed-off-by: Colin Ian King --- drivers/message/fusion/lsi/mpi_cnfg.h | 2 +-

[PATCH] scsi: lpfc: remove redundant assignment of sgel

2017-02-24 Thread Colin King
From: Colin Ian King In the NVMET_FCOP_RSP case, sgel is assigned but never used and hence is redundant and can be removed. Detected by CoverityScan, CID#1411658 ("Unused value") Signed-off-by: Colin Ian King ---

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

[PATCH] qla2xxx: fix spelling mistake: "seperator" -> "separator"

2017-02-23 Thread Colin King
From: Colin Ian King trivial fix to spelling mistake in pr_err message Signed-off-by: Colin Ian King --- drivers/scsi/qla2xxx/tcm_qla2xxx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[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] iscsi-target: fix spelling mistake "Unsolicitied" -> "Unsolicited"

2016-09-02 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistakes in pr_debug message and comments Signed-off-by: Colin Ian King --- drivers/target/iscsi/iscsi_target.c | 2 +- drivers/target/iscsi/iscsi_target_login.c | 4 ++-- 2 files changed, 3

[PATCH] bfa: do not dereference port before it is null checked

2016-08-30 Thread Colin King
From: Colin Ian King port is deferenced before it is null sanity checked, hence we potentially have a null pointer dereference bug. Instead, initialise trl_enabled from port->fcs->bfa after we are sure port is not null. Signed-off-by: Colin Ian King

[PATCH] scsi: megaraid_sas: add in missing white space in error message text

2016-09-12 Thread Colin King
From: Colin Ian King A dev_printk message spans two lines and the literal string is missing a white space between words. Add the white space. Signed-off-by: Colin Ian King --- drivers/scsi/megaraid/megaraid_sas_base.c | 2 +- 1 file changed,

[PATCH] scsi: fcoe: fix off-by-one array size comparison

2016-10-06 Thread Colin King
From: Colin Ian King Fix an off-by-one array size comparison that is comparing one too many items in an array and hence will causing an out-of-bounds array read on array fcoe_port_speed_mapping. Signed-off-by: Colin Ian King ---

[PATCH] qla2xxx: fix spelling mistake "retyring" -> "retrying"

2016-08-28 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistakes in ql_dbg messages. Signed-off-by: Colin Ian King --- drivers/scsi/qla2xxx/qla_os.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_os.c

[PATCH] target: fix spelling mistake and unwrap multi-line text

2016-11-07 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake "Obselete" to "Obsolete" in error message and also turn multi-line text into one line. Signed-off-by: Colin Ian King --- drivers/target/target_core_pr.c | 3 +-- 1 file changed, 1

[PATCH] scsi: fix spelling mistake in error message

2016-11-07 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake "operatio" to "operation" in critical error message Signed-off-by: Colin Ian King --- drivers/scsi/dpt_i2o.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] iscsi: fix spelling mistakes in dev_warn messages

2016-11-12 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake "suspeneded" to "suspended" in dev_warn messages Signed-off-by: Colin Ian King --- drivers/scsi/isci/remote_node_context.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH] scsi: megaraid_sas: add in missing white spaces in error messages text

2016-11-12 Thread Colin King
From: Colin Ian King A couple of dev_printk messages spans two lines and the literal string is missing a white space between words. Add the white space. Signed-off-by: Colin Ian King --- drivers/scsi/megaraid/megaraid_sas_base.c | 6 ++

[PATCH] isci: fix typo in deg_dbg message

2016-11-12 Thread Colin King
From: Colin Ian King Trivial fix to typo "repsonse" to "response" in dev_dbg message. Signed-off-by: Colin Ian King --- drivers/scsi/isci/request.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] scsi: hpsa: free irq on q indexed by h->intr_mode and not i

2016-11-14 Thread Colin King
From: Colin Ian King Use correct index on q, use h->intr_mode instead of i. Issue detected using static analysis with cppcheck Fixes: bc2bb1543e62a5d0 ("scsi: hpsa: use pci_alloc_irq_vectors and automatic irq affinity") Signed-off-by: Colin Ian King

[PATCH] scsi: mpt3sas: fix some spelling mistakes in message and comments

2016-10-31 Thread Colin King
From: Colin Ian King Trival fixes, minor spelling mistakes in comments and in a KERN_INFO message. Signed-off-by: Colin Ian King --- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 16 1 file changed, 8 insertions(+), 8 deletions(-)

[PATCH][V2] scsi: megaraid-sas: fix spelling mistake of "outstanding"

2016-11-29 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake "oustanding" to "outstanding" in dev_info and scmd_printk messages. Also join wrapped literal string in the scmd_printk. Signed-off-by: Colin Ian King ---

[PATCH] scsi: megaraid-sas: fix spelling mistake of "outstanding"

2016-11-29 Thread Colin King
From: Colin Ian King Trivial fix to spelling mistake "oustanding" to "outstanding" in dev_info and scmd_printk messages Signed-off-by: Colin Ian King --- drivers/scsi/megaraid/megaraid_sas_base.c | 2 +-

[PATCH] scsi: qedi: return via va_end to match corresponding va_start

2016-12-16 Thread Colin King
From: Colin Ian King Although on most systems va_end is a no-op, it is good practice to use va_end on the function return path, especially since the va_start documenation states: "Each invocation of va_start() must be matched by a corresponding invocation of

[PATCH] qla2xxx: rename {vendor|hba}_indentifer to {vendor|hba}_identifer

2016-12-29 Thread Colin King
From: Colin Ian King Rename the vendor_indentifer and hba_indentifer fields to correct spelling. Signed-off-by: Colin Ian King --- drivers/scsi/qla2xxx/qla_def.h | 4 ++-- drivers/scsi/qla2xxx/qla_gs.c | 6 +++--- 2 files changed, 5

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

  1   2   >