staging: android: ion: Replace pr_err with dev_err
PATCH 1/1 staging: android: ion: Replace pr_err with dev_err
All devm functions has a device structure as the first argument which is required by dev_{err,info,dbg} printing functions.
This patch converts pr_err to dev_err as dev_* is preferred after calls to devm functions.
Done using coccinelle:
@r1 exists@
expression e,e1;
identifier f =~ "^devm_";
identifier g =~ "^pcim_";
identifier h =~ "^dmam_";
@@
e=\(f\|g\|h\)(e1,...);
<+...
(
- pr_info(
+ dev_info(e1,
...);
|
- pr_err(
+ dev_err(e1,
...);
|
- pr_debug(
+ dev_dbg(e1,
...);
)
...+>
--- drivers/staging/android/ion/ion_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/android/ion/ion_test.c +1 -1
@@ -255,7 +255,7 @@ static int __init ion_test_probe(struct platform_device *pdev) testdev->misc.parent = &pdev->dev; ret =misc_register (&testdev->misc);if (ret) { -pr_err ("failed to register misc device.\n" ); +dev_err (&pdev->dev,"failed to register misc device.\n" );return ret; }
Signature · 1 line
2.7.4
Quoted 41 lines · simran singhal
All devm functions has a device structure as the first argument which is required by dev_{err,info,dbg} printing functions.
This patch convertspr_errtodev_erras dev_* is preferred after calls to devm functions.Done using coccinelle:
@r1 exists@
expression e,e1;
identifier f =~ "^devm_";
identifier g =~ "^pcim_";
identifier h =~ "^dmam_";
@@
e=\(f\|g\|h\)(e1,...);
<+...
(
- pr_info(
+ dev_info(e1,
...);
|
- pr_err(
+ dev_err(e1,
...);
|
- pr_debug(
+ dev_dbg(e1,
...);
)
...+>Signed-off-by simran singhal <[email protected]>--- drivers/staging/android/ion/ion_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/android/ion/ion_test.c +0
-0
drivers/staging/android/ion/ion_test.c static int __init ion_test_probe(struct platform_device *pdev) · line 261
Quoted 8 lines
drivers/staging/android/ion/ion_test.c +1
-1@@ -255,7 +255,7 @@ static int __init ion_test_probe(struct platform_device *pdev) testdev->misc.parent = &pdev->dev; ret =misc_register (&testdev->misc);if (ret) { -pr_err ("failed to register misc device.\n" ); +dev_err (&pdev->dev,"failed to register misc device.\n" );return ret; }