summaryrefslogtreecommitdiff
path: root/net/core/tso.c
diff options
context:
space:
mode:
authorHimangi Saraogi <himangi774@gmail.com>2014-05-28 18:23:09 +0400
committerDavid S. Miller <davem@davemloft.net>2014-05-31 02:40:29 +0400
commit09b38aa1e73234e9173a3d640eb0b02ab12b790c (patch)
treed0fdfd692137819427d0d646b7f37af98d3a60bc /net/core/tso.c
parentc3aad35e4890d79084ab70c54a5d7740045d2f90 (diff)
downloadlinux-09b38aa1e73234e9173a3d640eb0b02ab12b790c.tar.xz
ehea: Introduce the use of the managed version of kzalloc
This patch moves data allocated using kzalloc to managed data allocated using devm_kzalloc and cleans now unnecessary kfrees in probe and remove functions. Also, linux/device.h is added to make sure the devm_*() routine declarations are unambiguously available. The following Coccinelle semantic patch was used for making the change: @platform@ identifier p, probefn, removefn; @@ struct platform_driver p = { .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); ...+> } @rem depends on prb@ identifier platform.removefn; expression e; @@ removefn(...) { <... - kfree(e); ...> } Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Compile-Tested-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/tso.c')
0 files changed, 0 insertions, 0 deletions