n.ga...@huawei.com>
Reviewed-by: Quentin Lambert <lambert.quen...@gmail.com>
diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c
b/drivers/scsi/hisi_sas/hisi_sas_main.c
index 6d6f150..d50e9cf 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_main.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_main.c
@@ -1412,
On 11/30/2016 08:36 PM, Dan Carpenter wrote:
We recently introduced a kfree() in the caller for this function.
That's where, logically, you would think the kfree() should be.
Unfortunately the code was just ugly and not buggy so the static
checker warning was a false postive and introduced a
Most error branches following the call to kzalloc contain
a call to kfree. This patch add these calls where they are
missing and set the relevant pointers to NULL.
This issue was found with Hector.
Signed-off-by: Quentin Lambert <lambert.quen...@gmail.com>
---
v2: set the point to NULL
On 11/21/2016 03:16 PM, John Garry wrote:
On 21/11/2016 13:20, Quentin Lambert wrote:
On 11/21/2016 01:53 PM, John Garry wrote:
However I have noticed that we should do a call to hisi_sas_free() for
this failure, and later failures in the probe.
I don't understand why, and would welcome
On 11/21/2016 01:53 PM, John Garry wrote:
However I have noticed that we should do a call to hisi_sas_free() for
this failure, and later failures in the probe.
I don't understand why, and would welcome the opportunity to learn
something.
Quentin
--
To unsubscribe from this list: send the
Most error branches following the call to kmalloc contain
a call to kfree. This patch add these calls where they are
missing.
This issue was found with Hector.
Signed-off-by: Quentin Lambert <lambert.quen...@gmail.com>
---
drivers/scsi/xen-scsifront.c |1 +
1 file changed, 1 ins
Most error branches following the call to kzalloc contain
a call to kfree. This patch add these calls where they are
missing.
This issue was found with Hector.
Signed-off-by: Quentin Lambert <lambert.quen...@gmail.com>
---
drivers/scsi/dpt_i2o.c |4 +++-
1 file changed, 3 insertions
they are
missing.
This issue was found with Hector.
Signed-off-by: Quentin Lambert <lambert.quen...@gmail.com>
---
drivers/scsi/pmcraid.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
--- a/drivers/scsi/pmcraid.c
+++ b/drivers/scsi/pmcraid.c
@@ -3787,11 +3787,11 @@ stati
Most error branches following the call to pci_map_biosrom contain
a call to pci_unmap_biosrom. This patch add these calls where
they are missing.
This issue was found with Hector.
Signed-off-by: Quentin Lambert <lambert.quen...@gmail.com>
---
drivers/scsi/isci/probe_roms.c |1 +
Most error branches following the call to hisi_sas_shost_alloc contain
a call to kfree. This patch add these calls where they are
missing.
This issue was found with Hector.
Signed-off-by: Quentin Lambert <lambert.quen...@gmail.com>
---
drivers/scsi/hisi_sas/hisi_sas_main.c |6 +++
Most error branches following the call to dst_neigh_lookup contain
a call to neigh_release. This patch add these calls where they are
missing.
This issue was found with Hector.
Signed-off-by: Quentin Lambert <lambert.quen...@gmail.com>
---
drivers/scsi/cxgbi/cxgb4i/cxgb4i.c |2 +-
Most error branches following the call to kzalloc contain
a call to kfree. This patch add these calls where they are
missing.
This issue was found with Hector.
Signed-off-by: Quentin Lambert <lambert.quen...@gmail.com>
---
drivers/scsi/aic94xx/aic94xx_hwi.c |4 +++-
1 file chan
of the loop. It now
uses a break statement to exit it.
The third patch simplifies an unnecesary complicated use of a boolean variable.
Quentin Lambert (3):
[SCSI] mpt2sas: Merge two similar functions
[SCSI] mpt2sas: Simplify the code of mpt2sas_scsih_tm_flag
[SCSI] mpt2sas: Remove
mpt2sas_scsih_set_tm_flag and mpt2sas_scsih_clear_tm_flag
shared a lot of code. Therefore, they are merged into one
function whose behaviour is given by a new parameter
named action.
Signed-off-by: Quentin Lambert lambert.quen...@gmail.com
---
drivers/scsi/mpt2sas/mpt2sas_scsih.c | 43
Since skip was only used to pass through the rest of the loop,
a break statment is called where skip was previously assigned 1.
Signed-off-by: Quentin Lambert lambert.quen...@gmail.com
---
drivers/scsi/mpt2sas/mpt2sas_scsih.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git
Signed-off-by: Quentin Lambert lambert.quen...@gmail.com
---
drivers/scsi/mpt2sas/mpt2sas_base.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c
b/drivers/scsi/mpt2sas/mpt2sas_base.c
index 58e4521..c31de9d 100644
--- a/drivers/scsi
The version 2 of this patch fix the logic error pointed out by Joe Perches.
Quentin Lambert (3):
[SCSI] mpt2sas: Merge two similar functions
[SCSI] mpt2sas: Simplify the code of mpt2sas_scsih_tm_flag
[SCSI] mpt2sas: Remove unnecessary use of a boolean variable
drivers/scsi/mpt2sas
mpt2sas_scsih_set_tm_flag and mpt2sas_scsih_clear_tm_flag
shared a lot of code. Therefore, they are merged into one
function whose behaviour is given by a new parameter
named action.
Signed-off-by: Quentin Lambert lambert.quen...@gmail.com
---
drivers/scsi/mpt2sas/mpt2sas_scsih.c | 43
Since skip was only used to pass through the rest of the loop,
a break statment is called where skip was previously assigned 1.
Signed-off-by: Quentin Lambert lambert.quen...@gmail.com
---
drivers/scsi/mpt2sas/mpt2sas_scsih.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git
Signed-off-by: Quentin Lambert lambert.quen...@gmail.com
---
drivers/scsi/mpt2sas/mpt2sas_base.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c
b/drivers/scsi/mpt2sas/mpt2sas_base.c
index 58e4521..6cc0591 100644
--- a/drivers/scsi
/linux-kernel-janitors/msg20627.html
Quentin Lambert (1):
[SCSI] mpt2sas: Convert non-returned local variable to boolean when
relevant
drivers/scsi/mpt2sas/mpt2sas_base.c | 12 ++--
drivers/scsi/mpt2sas/mpt2sas_config.c| 5 +++--
drivers/scsi/mpt2sas/mpt2sas_ctl.c
expression e1 != {0, 1}, e2;
@@
f(...) {
...when any
(
x = e1;
|
x + e2
)
...when any
}
@depends on !bad@
identifier r.f;
local idexpression u8 r.x;
identifier r.xname;
@@
f(...) {
...
++ bool xname;
- int xname;
...
(
x =
- 1
+ true
|
x =
- -1
+ false
)
...
}
Signed-off-by: Quentin Lambert
This patch converts local variable declared as integer and used as
boolean into actual booleans. It only patches variables that are not
returned to limit the scope of the changes.
This patch was generated with Coccinelle using the semantic patch below.
Quentin Lambert (1):
[SCSI] mpt2sas
expression e1 != {0, 1}, e2;
@@
f(...) {
...when any
(
x = e1;
|
x + e2
)
...when any
}
@depends on !bad@
identifier r.f;
local idexpression u8 r.x;
identifier r.xname;
@@
f(...) {
...
++ bool xname;
- int xname;
...
(
x =
- 1
+ true
|
x =
- -1
+ false
)
...
}
Signed-off-by: Quentin Lambert
24 matches
Mail list logo