From patchwork Fri Feb 15 05:58:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [03/11] rtc: rtc-efi: use pr_err()/pr_warn() instead of printk() Date: Thu, 14 Feb 2013 19:58:45 -0000 From: Jingoo Han X-Patchwork-Id: 220637 Message-Id: <001401ce0b41$83d7c9a0$8b875ce0$%han@samsung.com> To: 'Andrew Morton' Cc: linux-kernel@vger.kernel.org, 'Alessandro Zummo' , rtc-linux@googlegroups.com, 'Jingoo Han' Fixed the checkpatch warnings as below: WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... WARNING: please, no space before tabs Signed-off-by: Jingoo Han --- drivers/rtc/rtc-efi.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/rtc/rtc-efi.c b/drivers/rtc/rtc-efi.c index c9f890b..d4755dc 100644 --- a/drivers/rtc/rtc-efi.c +++ b/drivers/rtc/rtc-efi.c @@ -13,6 +13,8 @@ * */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include #include #include @@ -47,7 +49,7 @@ compute_wday(efi_time_t *eft) int ndays = 0; if (eft->year < 1998) { - printk(KERN_ERR "efirtc: EFI year < 1998, invalid date\n"); + pr_err("EFI year < 1998, invalid date\n"); return -1; } @@ -70,7 +72,7 @@ convert_to_efi_time(struct rtc_time *wtime, efi_time_t *eft) eft->day = wtime->tm_mday; eft->hour = wtime->tm_hour; eft->minute = wtime->tm_min; - eft->second = wtime->tm_sec; + eft->second = wtime->tm_sec; eft->nanosecond = 0; eft->daylight = wtime->tm_isdst ? EFI_ISDST : 0; eft->timezone = EFI_UNSPECIFIED_TIMEZONE; @@ -142,7 +144,7 @@ static int efi_set_alarm(struct device *dev, struct rtc_wkalrm *wkalrm) */ status = efi.set_wakeup_time((efi_bool_t)wkalrm->enabled, &eft); - printk(KERN_WARNING "write status is %d\n", (int)status); + pr_warn("write status is %d\n", (int)status); return status == EFI_SUCCESS ? 0 : -EINVAL; } @@ -157,7 +159,7 @@ static int efi_read_time(struct device *dev, struct rtc_time *tm) if (status != EFI_SUCCESS) { /* should never happen */ - printk(KERN_ERR "efitime: can't read time\n"); + pr_err("can't read time\n"); return -EINVAL; }