Staging: fsl-mc: Replace pr_err with dev_err
authorBhumika Goyal <bhumirks@gmail.com>
Fri, 4 Mar 2016 13:45:55 +0000 (19:15 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Mar 2016 06:09:09 +0000 (22:09 -0800)
commit454b0ec8bf992b35895eb86a4b62ec3ba7be190c
tree73e1576a8dfadabafbbbd04e24f4ce36db05de6f
parentde71daf5c839b3b3cc8a5b09b4a00107817868de
Staging: fsl-mc: Replace pr_err with dev_err

This patch replaces pr_err calls with dev_err when the device structure
is available as dev_* prints identifying information about the struct device.
Done using coccinelle:

@r exists@
identifier f, s;
identifier x;
position p;
@@
f(...,struct s *x,...) {
<+...
when != x == NULL
\(pr_err@p\|pr_debug@p\|pr_info\)(...);
...+>
}

@r2@
identifier fld2;
identifier r.s;
@@

struct s {
        ...
        struct device *fld2;
        ...
};

@@
identifier r.x,r2.fld2;
position r.p;
@@

(
-pr_err@p
+dev_err
   (
+ &x->fld2,
...)
|
- pr_debug@p
+ dev_dbg
   (
+ &x->fld2,
...)
|
- pr_info@p
+ dev_info
   (
+ &x->fld2,
...)
)

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fsl-mc/bus/mc-bus.c