[PATCH] scsi: aic7xxx: NULL check before some freeing functions is not needed.

2018-12-02 Thread Thomas Meyer
NULL check before some freeing functions is not needed. Signed-off-by: Thomas Meyer --- diff -u -p a/drivers/scsi/aic7xxx/aic79xx_core.c b/drivers/scsi/aic7xxx/aic79xx_core.c --- a/drivers/scsi/aic7xxx/aic79xx_core.c +++ b/drivers/scsi/aic7xxx/aic79xx_core.c @@ -3673,8 +3673,7

[PATCH] scsi: megaraid_sas: NULL check before some freeing functions is not needed.

2018-12-02 Thread Thomas Meyer
NULL check before some freeing functions is not needed. Signed-off-by: Thomas Meyer --- diff -u -p a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c --- a/drivers/scsi/megaraid/megaraid_mbox.c +++ b/drivers/scsi/megaraid/megaraid_mbox.c @@ -1243,8 +1243,7

[PATCH] scsi: qedf: NULL check before some freeing functions is not needed.

2018-12-02 Thread Thomas Meyer
NULL check before some freeing functions is not needed. Signed-off-by: Thomas Meyer --- diff -u -p a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c --- a/drivers/scsi/qedf/qedf_main.c +++ b/drivers/scsi/qedf/qedf_main.c @@ -2935,8 +2935,7 @@ static void qedf_free_fcoe_pf_param

[PATCH] scsi: mpt3sas: NULL check before some freeing functions is not needed.

2018-12-02 Thread Thomas Meyer
NULL check before some freeing functions is not needed. Signed-off-by: Thomas Meyer --- diff -u -p a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c --- a/drivers/scsi/mpt3sas/mpt3sas_base.c +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c @@ -4213,8 +4213,7

[PATCH] scsi: qla4xxx: NULL check before some freeing functions is not needed.

2018-12-02 Thread Thomas Meyer
NULL check before some freeing functions is not needed. Signed-off-by: Thomas Meyer --- diff -u -p a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c @@ -4160,20 +4160,17 @@ static void qla4xxx_mem_free(struct

[PATCH] scsi: ipr: NULL check before some freeing functions is not needed.

2018-12-02 Thread Thomas Meyer
NULL check before some freeing functions is not needed. Signed-off-by: Thomas Meyer --- diff -u -p a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c @@ -9537,8 +9537,7 @@ static void ipr_free_cmd_blks(struct ipr } } - if

[PATCH] scsi: lpfc: NULL check before some freeing functions is not needed.

2018-12-02 Thread Thomas Meyer
NULL check before some freeing functions is not needed. Signed-off-by: Thomas Meyer --- diff -u -p a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c --- a/drivers/scsi/lpfc/lpfc_bsg.c +++ b/drivers/scsi/lpfc/lpfc_bsg.c @@ -1276,8 +1276,7 @@ lpfc_bsg_hba_set_event(struct bsg_job *j

[PATCH] scsi: NULL check before some freeing functions is not needed.

2018-12-02 Thread Thomas Meyer
NULL check before some freeing functions is not needed. Signed-off-by: Thomas Meyer --- diff -u -p a/drivers/scsi/aic94xx/aic94xx_init.c b/drivers/scsi/aic94xx/aic94xx_init.c --- a/drivers/scsi/aic94xx/aic94xx_init.c +++ b/drivers/scsi/aic94xx/aic94xx_init.c @@ -584,8 +584,7 @@ static void

[PATCH] scsi: qla2xxx: NULL check before some freeing functions is not needed.

2018-12-02 Thread Thomas Meyer
NULL check before some freeing functions is not needed. Signed-off-by: Thomas Meyer --- diff -u -p a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -4191,12 +4191,10 @@ fail_free_nvram: kfree(ha

[PATCH] scsi: csiostor: NULL check before some freeing functions is not needed.

2018-12-02 Thread Thomas Meyer
NULL check before some freeing functions is not needed. Signed-off-by: Thomas Meyer --- diff -u -p a/drivers/scsi/csiostor/csio_init.c b/drivers/scsi/csiostor/csio_init.c --- a/drivers/scsi/csiostor/csio_init.c +++ b/drivers/scsi/csiostor/csio_init.c @@ -157,8 +157,7 @@ csio_dfs_create(struct

[PATCH 3/6] scsi: lpfc: Cocci spatch "pool_zalloc-simple"

2017-09-20 Thread Thomas Meyer
Use *_pool_zalloc rather than *_pool_alloc followed by memset with 0. Found by coccinelle spatch "api/alloc/pool_zalloc-simple.cocci" Signed-off-by: Thomas Meyer --- diff -u -p a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c --- a/drivers/scsi/lpfc/lpfc_nvme.c +++ b/dr

[PATCH 6/6] scsi: Cocci spatch "pool_zalloc-simple"

2017-09-20 Thread Thomas Meyer
Use *_pool_zalloc rather than *_pool_alloc followed by memset with 0. Found by coccinelle spatch "api/alloc/pool_zalloc-simple.cocci" Signed-off-by: Thomas Meyer --- diff -u -p a/drivers/scsi/qla4xxx/ql4_mbx.c b/drivers/scsi/qla4xxx/ql4_mbx.c --- a/drivers/scsi/qla4xxx/ql4_mbx.c +++

[PATCH 4/6] mvsas: Cocci spatch "pool_zalloc-simple"

2017-09-20 Thread Thomas Meyer
Use *_pool_zalloc rather than *_pool_alloc followed by memset with 0. Found by coccinelle spatch "api/alloc/pool_zalloc-simple.cocci" Signed-off-by: Thomas Meyer --- diff -u -p a/drivers/scsi/mvsas/mv_sas.c b/drivers/scsi/mvsas/mv_sas.c --- a/drivers/scsi/mvsas/mv_sas.c +++ b/drivers/

[PATCH 5/6] scsi: qla2xxx: Cocci spatch "pool_zalloc-simple"

2017-09-20 Thread Thomas Meyer
Use *_pool_zalloc rather than *_pool_alloc followed by memset with 0. Found by coccinelle spatch "api/alloc/pool_zalloc-simple.cocci" Signed-off-by: Thomas Meyer --- diff -u -p a/drivers/scsi/qla2xxx/qla_bsg.c b/drivers/scsi/qla2xxx/qla_bsg.c --- a/drivers/scsi/qla2xxx/qla_bsg.c +++

[PATCH 1/1] [SCSI] fnic: Cocci spatch "simple_open"

2017-09-20 Thread Thomas Meyer
This removes an open coded simple_open() function and replaces file operations references to the function with simple_open() instead. Found by coccinelle spatch "api/simple_open.cocci" Signed-off-by: Thomas Meyer --- diff -u -p a/drivers/scsi/fnic/fnic_debugfs.c b/drivers

[PATCH 9/10] [SCSI] bfa: Use ARRAY_SIZE macro

2017-09-03 Thread Thomas Meyer
k/verification. Signed-off-by: Thomas Meyer --- diff --git a/drivers/scsi/bfa/bfa_core.c b/drivers/scsi/bfa/bfa_core.c index 3e1caec82554..4a03cd9fa63f 100644 --- a/drivers/scsi/bfa/bfa_core.c +++ b/drivers/scsi/bfa/bfa_core.c @@ -16,6 +16,7 @@ * General Public License for more details. */ +#

[PATCH 2/2] [SCSI] aic7xxx: Cocci spatch "kzalloc-simple"

2013-09-19 Thread Thomas Meyer
Use kzalloc rather than kmalloc followed by memset with 0. Found by coccinelle spatch "api/alloc/kzalloc-simple.cocci" Signed-off-by: Thomas Meyer --- diff -u -p a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c --- a/drivers/scsi/aic7xxx/aic79xx_osm.c +++

[PATCH 4/10] [SCSI] csiostor: Cocci spatch "noderef"

2013-09-19 Thread Thomas Meyer
sizeof when applied to a pointer typed expression gives the size of the pointer. Found by coccinelle spatch "misc/noderef.cocci" Signed-off-by: Thomas Meyer --- diff -u -p a/drivers/scsi/csiostor/csio_mb.c b/drivers/scsi/csiostor/csio_mb.c --- a/drivers/scsi/csiostor/csio_mb.c +++

[PATCH] [SCSI] libsas: Cocci spatch "ptr_ret.spatch"

2013-06-01 Thread Thomas Meyer
Signed-off-by: Thomas Meyer --- diff -u -p a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c --- a/drivers/scsi/libsas/sas_scsi_host.c +++ b/drivers/scsi/libsas/sas_scsi_host.c @@ -1093,9 +1093,7 @@ int sas_init_queue(struct sas_ha_struct core->queue_thr

[PATCH] [SCSI] libsas: Use PTR_RET rather than if(IS_ERR(.. [1]

2012-08-06 Thread Thomas Meyer
The semantic patch that makes this change is available in scripts/coccinelle/api/ptr_ret.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Thomas Meyer --- diff -u -p a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas