Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1599394 > unrolled thread

[PATCH] staging: android: ion: Replace pr_err with dev_err

Started bysimran singhal <singhalsimran0@gmail.com>
First post2017-03-13 15:00 +0100
Last post2017-03-13 22:00 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] staging: android: ion: Replace pr_err with dev_err simran singhal <singhalsimran0@gmail.com> - 2017-03-13 15:00 +0100
    Re: [PATCH] staging: android: ion: Replace pr_err with dev_err Laura Abbott <labbott@redhat.com> - 2017-03-13 22:00 +0100

#1599394 — [PATCH] staging: android: ion: Replace pr_err with dev_err

Fromsimran singhal <singhalsimran0@gmail.com>
Date2017-03-13 15:00 +0100
Subject[PATCH] staging: android: ion: Replace pr_err with dev_err
Message-ID<tkyFY-1ik-11@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1599813

FromLaura Abbott <labbott@redhat.com>
Date2017-03-13 22:00 +0100
Message-ID<tkFer-63w-43@gated-at.bofh.it>
In reply to#1599394
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>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web