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
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
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
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
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
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
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
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
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
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
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
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
+++
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/
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
+++
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
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.
*/
+#
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
+++
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
+++
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
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
20 matches
Mail list logo