Hi,
In function hvc_opal_probe I find :
hp = hvc_alloc(termno, 0, ops, MAX_VIO_PUT_CHARS);
if (IS_ERR(hp))
return PTR_ERR(hp);
Earlier, hpc_opal_privs[termno] is assigned pv which is allocated using
kzalloc. Shouldn't there be a kfree(pv) and the array element (wh
ev->dev, e1, e2)
...
?-kfree(e);
...+>
}
@rem depends on prb@
identifier platform.removefn;
expression e;
@@
removefn(...) {
<...
- kfree(e);
...>
}
Signed-off-by: Himangi Saraogi
Acked-by: Julia Lawall
---
Not compile tested due to incompatible architecture
arch/power
= {
.probe = probefn,
.remove = removefn,
};
@prb@
identifier platform.probefn, pdev;
expression e, e1, e2;
@@
probefn(struct platform_device *pdev, ...) {
<+...
- e = kzalloc(e1, e2)
+ e = devm_kzalloc(&pdev->dev, e1, e2)
...
?-kfree(e);
...+>
}
Signed-off-by: Himangi Saraogi
Ac
+ e = devm_kzalloc(&pdev->dev, e1, e2)
...
?-kfree(e);
...+>
}
@rem depends on prb@
identifier platform.removefn;
expression e;
@@
removefn(...) {
<...
- kfree(e);
...>
}
Signed-off-by: Himangi Saraogi
---
Not compile tested due to incompatible architecture.
drivers/usb/gadge
on E1,E2; @@
(
!E1 & !E2
|
- !E1 & E2
+ !(E1 & E2)
)
//
Signed-off-by: Himangi Saraogi
---
This is not tested and clearly changes the semantics, so it is only
something to consider.
arch/powerpc/sysdev/fsl_pci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a
bit nicer to read.
The Coccinelle semantic patch that makes the first change is as follows:
//
@disable sizeof_type_expr@
type T;
T **x;
@@
x =
<+...sizeof(
- T
+ *x
)...+>
//
Signed-off-by: Himangi Saraogi
Acked-by: Julia Lawall
---
arch/powerpc/sysdev/mpic_msgr.c | 2 +-
consider.
The Coccinelle semantic patch that makes this change is as follows:
//
@@ expression E1,E2; @@
(
!E1 & !E2
|
- !E1 & E2
+ !(E1 & E2)
)
//
Signed-off-by: Himangi Saraogi
---
arch/powerpc/sysdev/fsl_pci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a
bit nicer to read.
The Coccinelle semantic patch that makes the first change is as follows:
//
@disable sizeof_type_expr@
type T;
T **x;
@@
x =
<+...sizeof(
- T
+ *x
)...+>
//
Signed-off-by: Himangi Saraogi
Acked-by: Julia Lawall
---
arch/powerpc/sysdev/mpic_msgr.c | 2 +-
mp;x
?-kfree(x)
+kmem_cache_free(c,x)
//
Signed-off-by: Himangi Saraogi
Acked-by: Julia Lawall
---
arch/powerpc/perf/hv-24x7.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/perf/hv-24x7.c b/arch/powerpc/perf/hv-24x7.c
index 66d0f17..70d4f74 100644
--- a/arch/pow
Continue is not needed at the bottom of a loop.
The Coccinelle semantic patch implementing this change is:
@@
@@
for (...;...;...) {
...
if (...) {
...
- continue;
}
}
Signed-off-by: Himangi Saraogi
Acked-by: Julia Lawall
---
Not compile tested.
arch/powerpc/platforms/pseries
10 matches
Mail list logo