* [PATCH] staging: android: ion: Replace pr_err with dev_err
@ 2017-03-13 13:56 simran singhal
2017-03-13 20:57 ` Laura Abbott
0 siblings, 1 reply; 2+ messages in thread
From: simran singhal @ 2017-03-13 13:56 UTC (permalink / raw)
To: labbott
Cc: Laura Abbott, Sumit Semwal, Greg Kroah-Hartman,
Arve Hjønnevåg, Riley Andrews, devel, linux-kernel,
outreachy-kernel
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,
...);
)
...+>
Signed-off-by: simran singhal <singhalsimran0@gmail.com>
---
drivers/staging/android/ion/ion_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/android/ion/ion_test.c b/drivers/staging/android/ion/ion_test.c
index 5abf8320..0ab7d11 100644
--- a/drivers/staging/android/ion/ion_test.c
+++ b/drivers/staging/android/ion/ion_test.c
@@ -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;
}
--
2.7.4
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] staging: android: ion: Replace pr_err with dev_err
2017-03-13 13:56 [PATCH] staging: android: ion: Replace pr_err with dev_err simran singhal
@ 2017-03-13 20:57 ` Laura Abbott
0 siblings, 0 replies; 2+ messages in thread
From: Laura Abbott @ 2017-03-13 20:57 UTC (permalink / raw)
To: simran singhal
Cc: Sumit Semwal, Greg Kroah-Hartman, Arve Hjønnevåg,
Riley Andrews, devel, linux-kernel, outreachy-kernel
On 03/13/2017 06:56 AM, simran singhal wrote:
> 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,
> ...);
> )
> ...+>
>
> Signed-off-by: simran singhal <singhalsimran0@gmail.com>
> ---
> drivers/staging/android/ion/ion_test.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/android/ion/ion_test.c b/drivers/staging/android/ion/ion_test.c
> index 5abf8320..0ab7d11 100644
> --- a/drivers/staging/android/ion/ion_test.c
> +++ b/drivers/staging/android/ion/ion_test.c
> @@ -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;
> }
>
>
Acked-by: Laura Abbott <labbott@redhat.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-13 20:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-13 13:56 [PATCH] staging: android: ion: Replace pr_err with dev_err simran singhal
2017-03-13 20:57 ` Laura Abbott
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®