HBA memories,
we should also free the HBA memories.
- We should free shost memory at the end of hisi_sas_remove().
- sha->core.shost is set twice, so remove extra set.
Signed-off-by: Xiaofei Tan
Signed-off-by: John Garry
Reviewed-by: Quentin Lambert
diff --git a/drivers/scsi/hisi_
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 do
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
---
v2: set the point to NULL after having freed it
drivers
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 we
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 li
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
---
drivers/scsi/xen-scsifront.c |1 +
1 file changed, 1 insertion(+)
--- a/drivers/scsi/xen
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
---
drivers/scsi/dpt_i2o.c |4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/drivers
missing.
This issue was found with Hector.
Signed-off-by: Quentin Lambert
---
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 @@ static long pmcraid_ioctl_passthrough
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
---
drivers/scsi/isci/probe_roms.c |1 +
1 file changed, 1 insertion(+)
--- a
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
---
drivers/scsi/hisi_sas/hisi_sas_main.c |6 --
1 file changed, 4 insertions
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
---
drivers/scsi/cxgbi/cxgb4i/cxgb4i.c |2 +-
1 file changed, 1 insertion(+), 1
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
---
drivers/scsi/aic94xx/aic94xx_hwi.c |4 +++-
1 file changed, 3 insertions(+), 1 deletion
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 L
lists/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_
Signed-off-by: Quentin Lambert
---
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/mpt2sas/mpt2sas_base.c
+++ b
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
---
drivers/scsi/mpt2sas/mpt2sas_scsih.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/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
---
drivers/scsi/mpt2sas/mpt2sas_scsih.c | 43
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
Signed-off-by: Quentin Lambert
---
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/mpt2sas/mpt2sas_base.c
+++ b
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
---
drivers/scsi/mpt2sas/mpt2sas_scsih.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/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
---
drivers/scsi/mpt2sas/mpt2sas_scsih.c | 43
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
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 L
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
24 matches
Mail list logo