Message ID | 002501ce0b48$36cf28e0$a46d7aa0$%han@samsung.com |
---|---|
State | Superseded |
Headers | show |
On Fri, 2013-02-15 at 15:46 +0900, Jingoo Han wrote: > Fixed the checkpatch warning as below: [] > diff --git a/drivers/rtc/rtc-rs5c313.c b/drivers/rtc/rtc-rs5c313.c [] > @@ -39,6 +39,8 @@ > * 1.13 Nobuhiro Iwamatsu: Updata driver. > */ > > +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > + > #include <linux/module.h> > #include <linux/err.h> > #include <linux/rtc.h> > @@ -352,8 +354,7 @@ static void rs5c313_check_xstp_bit(void) > tm.tm_year = 2000 - 1900; > > rs5c313_rtc_set_time(NULL, &tm); > - printk(KERN_ERR "RICHO RS5C313: invalid value, resetting to " > - "1 Jan 2000\n"); > + pr_err("RICHO RS5C313: invalid value, resetting to 1 Jan 2000\n"); You could remove the "RICH0 RS5C313: "prefix, pr_fmt adds it (more or less).
On Friday, February 15, 2013 3:50 PM, Joe Perches wrote: > On Fri, 2013-02-15 at 15:46 +0900, Jingoo Han wrote: > > Fixed the checkpatch warning as below: > [] > > diff --git a/drivers/rtc/rtc-rs5c313.c b/drivers/rtc/rtc-rs5c313.c > [] > > @@ -39,6 +39,8 @@ > > * 1.13 Nobuhiro Iwamatsu: Updata driver. > > */ > > > > +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > > + > > #include <linux/module.h> > > #include <linux/err.h> > > #include <linux/rtc.h> > > @@ -352,8 +354,7 @@ static void rs5c313_check_xstp_bit(void) > > tm.tm_year = 2000 - 1900; > > > > rs5c313_rtc_set_time(NULL, &tm); > > - printk(KERN_ERR "RICHO RS5C313: invalid value, resetting to " > > - "1 Jan 2000\n"); > > + pr_err("RICHO RS5C313: invalid value, resetting to 1 Jan 2000\n"); > > You could remove the "RICH0 RS5C313: "prefix, > pr_fmt adds it (more or less). OK, I will remove it. Thank you. Best regards, Jingoo Han
diff --git a/drivers/rtc/rtc-rs5c313.c b/drivers/rtc/rtc-rs5c313.c index d1aee79..8ca55a6 100644 --- a/drivers/rtc/rtc-rs5c313.c +++ b/drivers/rtc/rtc-rs5c313.c @@ -39,6 +39,8 @@ * 1.13 Nobuhiro Iwamatsu: Updata driver. */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include <linux/module.h> #include <linux/err.h> #include <linux/rtc.h> @@ -352,8 +354,7 @@ static void rs5c313_check_xstp_bit(void) tm.tm_year = 2000 - 1900; rs5c313_rtc_set_time(NULL, &tm); - printk(KERN_ERR "RICHO RS5C313: invalid value, resetting to " - "1 Jan 2000\n"); + pr_err("RICHO RS5C313: invalid value, resetting to 1 Jan 2000\n"); } RS5C313_CEDISABLE; ndelay(700); /* CE:L */
Fixed 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 <jg1.han@samsung.com> --- No changes since v1: drivers/rtc/rtc-rs5c313.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)