]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
Staging: fsl-mc: Replace pr_debug with dev_dbg
authorBhumika Goyal <bhumirks@gmail.com>
Fri, 4 Mar 2016 13:44:52 +0000 (19:14 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Mar 2016 06:09:09 +0000 (22:09 -0800)
This patch replaces pr_debug calls with dev_dbg 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-sys.c

index 6e1489246066d8d9092a933f391fd19e3ab62ff9..8101c469abb0cd05eb43597b1119dda112f62528 100644 (file)
@@ -328,7 +328,8 @@ static int mc_polling_wait_preemptible(struct fsl_mc_io *mc_io,
                             MC_CMD_COMPLETION_POLLING_MAX_SLEEP_USECS);
 
                if (time_after_eq(jiffies, jiffies_until_timeout)) {
-                       pr_debug("MC command timed out (portal: %#llx, obj handle: %#x, command: %#x)\n",
+                       dev_dbg(&mc_io->dev,
+                               "MC command timed out (portal: %#llx, obj handle: %#x, command: %#x)\n",
                                 mc_io->portal_phys_addr,
                                 (unsigned int)
                                        MC_CMD_HDR_READ_TOKEN(cmd->header),
@@ -369,7 +370,8 @@ static int mc_polling_wait_atomic(struct fsl_mc_io *mc_io,
                udelay(MC_CMD_COMPLETION_POLLING_MAX_SLEEP_USECS);
                timeout_usecs -= MC_CMD_COMPLETION_POLLING_MAX_SLEEP_USECS;
                if (timeout_usecs == 0) {
-                       pr_debug("MC command timed out (portal: %#llx, obj handle: %#x, command: %#x)\n",
+                       dev_dbg(&mc_io->dev,
+                               "MC command timed out (portal: %#llx, obj handle: %#x, command: %#x)\n",
                                 mc_io->portal_phys_addr,
                                 (unsigned int)
                                        MC_CMD_HDR_READ_TOKEN(cmd->header),
@@ -424,7 +426,8 @@ int mc_send_command(struct fsl_mc_io *mc_io, struct mc_command *cmd)
                goto common_exit;
 
        if (status != MC_CMD_STATUS_OK) {
-               pr_debug("MC command failed: portal: %#llx, obj handle: %#x, command: %#x, status: %s (%#x)\n",
+               dev_dbg(&mc_io->dev,
+                       "MC command failed: portal: %#llx, obj handle: %#x, command: %#x, status: %s (%#x)\n",
                         mc_io->portal_phys_addr,
                         (unsigned int)MC_CMD_HDR_READ_TOKEN(cmd->header),
                         (unsigned int)MC_CMD_HDR_READ_CMDID(cmd->header),