Skip to content

Commit

Permalink
rtc: rtc-sun4v: use pr_warn() instead of printk()
Browse files Browse the repository at this point in the history
Fix the checkpatch warning as below:

  WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...

Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Jingoo Han authored and torvalds committed Feb 22, 2013
1 parent d75dcd3 commit d959f73
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions drivers/rtc/rtc-sun4v.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
* Copyright (C) 2008 David S. Miller <[email protected]>
*/

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/delay.h>
Expand All @@ -26,10 +28,10 @@ static unsigned long hypervisor_get_time(void)
udelay(100);
goto retry;
}
printk(KERN_WARNING "SUN4V: tod_get() timed out.\n");
pr_warn("tod_get() timed out.\n");
return 0;
}
printk(KERN_WARNING "SUN4V: tod_get() not supported.\n");
pr_warn("tod_get() not supported.\n");
return 0;
}

Expand All @@ -53,10 +55,10 @@ static int hypervisor_set_time(unsigned long secs)
udelay(100);
goto retry;
}
printk(KERN_WARNING "SUN4V: tod_set() timed out.\n");
pr_warn("tod_set() timed out.\n");
return -EAGAIN;
}
printk(KERN_WARNING "SUN4V: tod_set() not supported.\n");
pr_warn("tod_set() not supported.\n");
return -EOPNOTSUPP;
}

Expand Down

0 comments on commit d959f73

Please sign in to comment.