question about hvc_opal.c

2014-05-16 Thread Himangi Saraogi
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

[PATCH] dt/powerpc: Introduce the use of the managed version of kzalloc

2014-05-19 Thread Himangi Saraogi
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

[PATCH] powerpc: Introduce the use of the managed version of kzalloc

2014-05-26 Thread Himangi Saraogi
= { .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

[PATCH] usb: gadget: fsl_qe_udc: Introduce use of managed version of kzalloc

2014-06-14 Thread Himangi Saraogi
+ 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

linuxppc-dev@lists.ozlabs.org

2014-07-05 Thread Himangi Saraogi
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

[PATCH] powerpc/mpic_msgr: Use kcalloc and correct the argument to sizeof

2014-07-06 Thread Himangi Saraogi
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 +-

linuxppc-dev@lists.ozlabs.org

2014-07-19 Thread Himangi Saraogi
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

[RESEND PATCH] powerpc/mpic_msgr: Use kcalloc and correct the argument to sizeof

2014-07-19 Thread Himangi Saraogi
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 +-

[PATCH] powerpc/perf/hv-24x7: Use kmem_cache_free

2014-07-22 Thread Himangi Saraogi
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

[PATCH] powerpc/pseries: Drop unnecessary continue

2014-08-13 Thread Himangi Saraogi
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