memory allocated by kmem_cache_alloc() should be freed using
kmem_cache_free(), not kfree().
Fixes: ad669505c4e9 ("scsi: target/core: Make sure that
target_wait_for_sess_cmds() waits long enough")
Signed-off-by: Wei Yongjun
---
drivers/target/target_core_transport.c | 2 +-
1 file
Add the missing unlock before return from function hisi_sas_phy_read32()
in the error handling case.
Fixes: 784b46b7cba0 ("scsi: hisi_sas: Use block layer tag instead for IPTT")
Signed-off-by: Wei Yongjun
---
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 4 +++-
1 file changed, 3 insert
Fix a typo in hisi_sas_task_prep().
Fixes: 7eee4b921822 ("scsi: hisi_sas: relocate smp sg map")
Signed-off-by: Wei Yongjun
---
drivers/scsi/hisi_sas/hisi_sas_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c
b/drivers/scs
Fix to return error code -ENOMEM from the error handling
case instead of 0, as done elsewhere in this function.
Signed-off-by: Wei Yongjun
---
drivers/scsi/qedf/qedf_main.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c
index
Fixes the following sparse warning:
drivers/scsi/hisi_sas/hisi_sas_main.c:1691:25: warning:
symbol 'host_attrs' was not declared. Should it be static?
Signed-off-by: Wei Yongjun
---
drivers/scsi/hisi_sas/hisi_sas_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
di
Fix to return error code -ENOMEM from the kzalloc() error handling
case instead of 0, as done elsewhere in this function.
Fixes: fabe6a59cc5a ("tcmu: allow max block and global max blocks to be
settable")
Signed-off-by: Wei Yongjun
---
drivers/target/target_core_user.c | 4 +++-
1 fi
From: Wei Yongjun
free_irq() expects the same device identity that was passed to
corresponding request_irq(), otherwise the IRQ is not freed.
Signed-off-by: Wei Yongjun
---
drivers/scsi/mac_esp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/mac_esp.c b
From: Wei Yongjun
Fixes the following sparse warning:
drivers/scsi/sd.c:3087:6: warning:
symbol 'sd_devt_release' was not declared. Should it be static?
Signed-off-by: Wei Yongjun
---
drivers/scsi/sd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/s
From: Wei Yongjun
'conn_info' is malloced in qedi_iscsi_update_conn() and should be
freed before leaving from the error handling cases, otherwise it
will cause memory leak.
Fixes: ace7f46ba5fd ("scsi: qedi: Add QLogic FastLinQ offload iSCSI
driver framework.")
Signed
From: Wei Yongjun
A spin lock is taken here so we should use GFP_ATOMIC.
Fixes: 987132167f4b ("scsi: be2iscsi: Fix for crash in beiscsi_eh_device_reset")
Signed-off-by: Wei Yongjun
---
drivers/scsi/be2iscsi/be_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
From: Wei Yongjun
Fix to return error code -ENOMEM from the error handling
case instead of 0, as done elsewhere in this function.
Signed-off-by: Wei Yongjun
---
drivers/scsi/mvsas/mv_sas.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/mvsas/mv_sas.c b
From: Wei Yongjun
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.
Signed-off-by: Wei Yongjun
---
drivers/scsi/ufs/ufshcd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs
From: Wei Yongjun
Fix to return error code -ENOMEM from the dma mapping error handling
case instead of 0, as done elsewhere in this function.
Signed-off-by: Wei Yongjun
---
drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/scsi/ibmvscsi_tgt
From: Wei Yongjun
Fix to return error code -ENOMEM from the workqueue alloc error
handling case instead of 0, as done elsewhere in this function.
Signed-off-by: Wei Yongjun
---
drivers/message/fusion/mptfc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers
From: Wei Yongjun
Fix typo in parameter description.
Signed-off-by: Wei Yongjun
---
drivers/scsi/ibmvscsi/ibmvfc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c
index 6b92169..56b9f45 100644
--- a/drivers
Fix to return error code -ENOMEM from the workqueue alloc error
handling case instead of 0, as done elsewhere in this function.
Signed-off-by: Wei Yongjun
---
drivers/scsi/ipr.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index 95e4834..bf85974
Add the missing destroy_workqueue() before return from fcoe_init()
in the fcoe transport register failed error handling case.
Signed-off-by: Wei Yongjun
---
drivers/scsi/fcoe/fcoe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi
Use kfree_skb() instead of kfree() to free sk_buff.
Signed-off-by: Wei Yongjun
---
drivers/scsi/fcoe/fcoe_ctlr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/fcoe/fcoe_ctlr.c b/drivers/scsi/fcoe/fcoe_ctlr.c
index a569c65..dcf3653 100644
--- a/drivers/scsi
Using list_move_tail() instead of list_del() + list_add_tail().
Signed-off-by: Wei Yongjun
---
drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
From: Wei Yongjun
Fixes the following sparse warning:
drivers/target/target_core_sbc.c:573:1: warning:
symbol 'sbc_check_prot' was not declared. Should it be static?
Signed-off-by: Wei Yongjun
---
drivers/target/target_core_sbc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletio
From: Wei Yongjun
The variable 'sg_table' is initialized but never used
otherwise, so remove the unused variable.
Signed-off-by: Wei Yongjun
---
drivers/target/target_core_rd.c | 6 --
1 file changed, 6 deletions(-)
diff --git a/drivers/target/target_core_rd.c b/driv
From: Wei Yongjun
A spin lock is taken here so we should use GFP_ATOMIC.
Signed-off-by: Wei Yongjun
---
drivers/scsi/megaraid/megaraid_mm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/megaraid/megaraid_mm.c
b/drivers/scsi/megaraid/megaraid_mm.c
index
From: Wei Yongjun
Add the missing destroy_workqueue() before return from
fcoe_init() in the error handling case.
Signed-off-by: Wei Yongjun
---
drivers/scsi/fcoe/fcoe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
From: Wei Yongjun
Add the missing unlock before return from function bfad_iocmd_cfg_trunk()
in the error handling case.
Signed-off-by: Wei Yongjun
---
drivers/scsi/bfa/bfad_bsg.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/bfa/bfad_bsg.c b/drivers/scsi
From: Wei Yongjun
In case of error, the function kthread_run() returns ERR_PTR()
and never returns NULL. The NULL test in the return value check
should be replaced with IS_ERR().
Signed-off-by: Wei Yongjun
---
drivers/scsi/hpsa.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff
From: Wei Yongjun
In case of error, the function scsi_host_lookup() returns NULL
pointer not ERR_PTR(). The IS_ERR() test in the return value check
should be replaced with NULL test.
Signed-off-by: Wei Yongjun
---
drivers/target/target_core_pscsi.c | 8
1 file changed, 4 insertions
From: Wei Yongjun
Remove including that don't need it.
Signed-off-by: Wei Yongjun
---
drivers/target/target_core_xcopy.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/target/target_core_xcopy.c
b/drivers/target/target_core_xcopy.c
index 7e12286..fb4b0c5 100644
--- a/dr
From: Wei Yongjun
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.
Signed-off-by: Wei Yongjun
---
drivers/scsi/3w-.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/3w-.c b
From: Wei Yongjun
There is a error message within devm_ioremap_resource
already, so remove the dev_err call to avoid redundant
error message.
Signed-off-by: Wei Yongjun
---
drivers/scsi/ufs/ufshcd-pltfrm.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/scsi/ufs/ufshcd-pltfrm.c b
From: Wei Yongjun
Fix to return -ENOMEM in the pci_pool_alloc() error handling
case instead of 0, as done elsewhere in this function.
Signed-off-by: Wei Yongjun
---
drivers/scsi/mvsas/mv_sas.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/mvsas/mv_sas.c b
From: Wei Yongjun
Fix to return -ENOMEM in the mempool_create_slab_pool() error handling
case instead of 0, as done elsewhere in this function.
Signed-off-by: Wei Yongjun
---
drivers/scsi/fnic/fnic_main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/scsi/fnic/fnic_main.c b
From: Wei Yongjun
Fix to return a negative error code in the device add error handling
case instead of 0, as done elsewhere in this function.
Signed-off-by: Wei Yongjun
---
drivers/scsi/sd.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/sd.c b/drivers/scsi
From: Wei Yongjun
Fix to return -ENOMEM in the ecardm_iomap() error handling
case instead of 0, as done elsewhere in this function.
Signed-off-by: Wei Yongjun
---
drivers/scsi/arm/acornscsi.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/arm/acornscsi.c b
From: Wei Yongjun
Fix to return a negative error code in the queues alloc error handling
case instead of 0, as done elsewhere in this function.
And also fix to return 0 from qla2x00_alloc_queues() when no error, otherwise
this cause if (!qla2x00_alloc_queues(ha, req, rsp)) always be false
From: Wei Yongjun
Fix to return -ENOMEM in the create workqueue error case
instead of 0, as done elsewhere in this function.
Signed-off-by: Wei Yongjun
---
drivers/scsi/scsi_transport_iscsi.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi
From: Wei Yongjun
Fix to return a negative error code from the error handling
case instead of 0, as returned elsewhere in this function.
Signed-off-by: Wei Yongjun
---
drivers/scsi/mvumi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/scsi/mvumi.c b/drivers/scsi/mvumi.c
index
From: Wei Yongjun
Fix to return a negative error code from the error handling
case instead of 0, as returned elsewhere in this function.
Signed-off-by: Wei Yongjun
---
drivers/message/fusion/mptfc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/message/fusion
From: Wei Yongjun
The variable 'data' is initialized but never used
otherwise, so remove the unused variable.
Signed-off-by: Wei Yongjun
---
drivers/scsi/csiostor/csio_hw.c | 5 -
1 file changed, 5 deletions(-)
diff --git a/drivers/scsi/csiostor/csio_hw.c b/drivers/scs
From: Wei Yongjun
'se_tpg->tpg_lun_list' is malloced in core_tpg_register() and should be freed
before leaving from the error handling cases, otherwise it will cause memory
leak.
'se_tpg' is malloced out of this function, and will be freed if we return
error, so
From: Wei Yongjun
This removes an open coded simple_open() function and
replaces file operations references to the function
with simple_open() instead.
Signed-off-by: Wei Yongjun
---
drivers/scsi/fnic/fnic_debugfs.c | 19 +--
1 file changed, 1 insertion(+), 18 deletions
From: Wei Yongjun
This removes an open coded simple_open() function and
replaces file operations references to the function
with simple_open() instead.
Signed-off-by: Wei Yongjun
---
drivers/scsi/csiostor/csio_init.c | 9 +
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a
From: Wei Yongjun
The dereference to 'put_index' should be moved below the NULL test.
Signed-off-by: Wei Yongjun
---
drivers/scsi/lpfc/lpfc_sli.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
ind
From: Wei Yongjun
This removes an open coded simple_open() function and
replaces file operations references to the function
with simple_open() instead.
Signed-off-by: Wei Yongjun
---
drivers/scsi/csiostor/csio_init.c | 12 +---
1 file changed, 1 insertion(+), 11 deletions(-)
diff
From: Wei Yongjun
The function iscsit_build_conn_drop_async_message() is called
from iscsit_close_connection() with spin lock 'sess->conn_lock'
held, so we should use GFP_ATOMIC instead of GFP_KERNEL.
Signed-off-by: Wei Yongjun
---
drivers/target/iscsi/iscsi_target.c | 2 +-
1 fi
From: Wei Yongjun
In case of error, the function target_fabric_configfs_init() returns
ERR_PTR() not NULL pointer. The NULL test in the return value check
should be replaced with IS_ERR().
dpatch engine is used to auto generated this patch.
(https://github.com/weiyj/dpatch)
Signed-off-by: Wei
From: Wei Yongjun
The dereference should be moved below the NULL test.
spatch with a semantic match is used to found this.
(http://coccinelle.lip6.fr/)
Signed-off-by: Wei Yongjun
---
drivers/scsi/bfa/bfad_im.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a
From: Wei Yongjun
The dereference should be moved below the NULL test.
spatch with a semantic match is used to found this.
(http://coccinelle.lip6.fr/)
Signed-off-by: Wei Yongjun
---
drivers/scsi/bnx2fc/bnx2fc_io.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a
From: Wei Yongjun
The dereference should be moved below the NULL test.
spatch with a semantic match is used to found this.
(http://coccinelle.lip6.fr/)
Signed-off-by: Wei Yongjun
---
drivers/target/target_core_pr.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git
From: Wei Yongjun
The dereference should be moved below the NULL test.
spatch with a semantic match is used to found this.
(http://coccinelle.lip6.fr/)
Signed-off-by: Wei Yongjun
---
drivers/target/tcm_fc/tfc_io.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers
From: Wei Yongjun
Using list_move() instead of list_del() + list_add().
spatch with a semantic match is used to found this problem.
(http://coccinelle.lip6.fr/)
Signed-off-by: Wei Yongjun
---
drivers/scsi/fcoe/fcoe_ctlr.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a
From: Wei Yongjun
Using list_move_tail() instead of list_del() + list_add_tail().
spatch with a semantic match is used to found this problem.
(http://coccinelle.lip6.fr/)
Signed-off-by: Wei Yongjun
---
v1 -> v2: add cleanup for drivers/scsi/bfa/bfa_svc.c
---
drivers/scsi/bfa/bfa_svc.c |
From: Wei Yongjun
Using list_move_tail() instead of list_del() + list_add_tail().
spatch with a semantic match is used to found this problem.
(http://coccinelle.lip6.fr/)
Signed-off-by: Wei Yongjun
---
drivers/scsi/lpfc/lpfc_sli.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff
From: Wei Yongjun
Using list_move_tail() instead of list_del() + list_add_tail().
spatch with a semantic match is used to found this problem.
(http://coccinelle.lip6.fr/)
Signed-off-by: Wei Yongjun
---
drivers/target/sbp/sbp_target.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions
From: Wei Yongjun
Using list_move_tail() instead of list_del() + list_add_tail().
spatch with a semantic match is used to found this problem.
(http://coccinelle.lip6.fr/)
Signed-off-by: Wei Yongjun
---
drivers/scsi/bfa/bfa_ioc.c | 3 +--
drivers/scsi/bfa/bfa_fcpim.c | 37
From: Wei Yongjun
From: Wei Yongjun
Remove including that don't need it.
Signed-off-by: Wei Yongjun
---
drivers/target/target_core_fabric_configfs.c | 1 -
drivers/target/target_core_stat.c| 1 -
2 files changed, 2 deletions(-)
diff --git a/drivers/t
From: Wei Yongjun
From: Wei Yongjun
Remove including that don't need it.
Signed-off-by: Wei Yongjun
---
drivers/target/tcm_fc/tfc_cmd.c | 1 -
drivers/target/tcm_fc/tfc_io.c | 1 -
drivers/target/tcm_fc/tfc_sess.c | 1 -
3 files changed, 3 deletions(-)
diff --git a/drivers/t
56 matches
Mail list logo