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


Groups > linux.kernel > #1564713

Re: [PATCH 1/2] hwmon: (lm70) Utilize dev_warn instead of pr_warn

From Joe Perches <joe@perches.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/2] hwmon: (lm70) Utilize dev_warn instead of pr_warn
Date 2017-01-23 08:00 +0100
Message-ID <t2GLE-35L-5@gated-at.bofh.it> (permalink)
References <t29wl-7O2-7@gated-at.bofh.it> <t29wl-7O2-9@gated-at.bofh.it> <t2GBY-32t-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sun, 2017-01-22 at 22:43 -0800, Joe Perches wrote:
> Two questions for Julia Lawall:
> 
> o is there a better way to do this than repeat the blocks
>   one for each replacement
> o can struct device * dev be made an arbitrary identifier
> 
> $ cat dev_printk.cocci
> @@
> identifier fn;
> type T;
> @@
> 
> T fn ( ..., struct device * dev, ... ) {
> <...
> -	pr_emerg(
> +	dev_emerg(dev,
> 	...);
> ...>
> }

Well, the second question is simple if I would just
think a little before asking...

@@
identifier fn;
identifier dev;
type T;
@@

T fn ( ..., struct device * dev, ... ) {
<...
-	pr_emerg(
+	dev_emerg(dev,
	...);
...>
}

etc...

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/2] hwmon: (lm70) Utilize dev_warn instead of pr_warn Florian Fainelli <f.fainelli@gmail.com> - 2017-01-21 20:30 +0100
  Re: [PATCH 1/2] hwmon: (lm70) Utilize dev_warn instead of pr_warn Guenter Roeck <linux@roeck-us.net> - 2017-01-21 21:20 +0100
  Re: [PATCH 1/2] hwmon: (lm70) Utilize dev_warn instead of pr_warn Joe Perches <joe@perches.com> - 2017-01-23 07:50 +0100
    Re: [PATCH 1/2] hwmon: (lm70) Utilize dev_warn instead of pr_warn Joe Perches <joe@perches.com> - 2017-01-23 08:00 +0100
      Re: [PATCH 1/2] hwmon: (lm70) Utilize dev_warn instead of pr_warn Julia Lawall <julia.lawall@lip6.fr> - 2017-01-23 13:10 +0100
    Re: [PATCH 1/2] hwmon: (lm70) Utilize dev_warn instead of pr_warn Guenter Roeck <linux@roeck-us.net> - 2017-01-23 08:10 +0100
      Re: [PATCH 1/2] hwmon: (lm70) Utilize dev_warn instead of pr_warn Julia Lawall <julia.lawall@lip6.fr> - 2017-01-23 08:20 +0100

csiph-web