mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-29 23:53:32 +00:00
rtc: rtc-efi: use dev_err()/dev_warn()/pr_err() instead of printk()
Fix 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 <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
3cebeb53d9
commit
34650f9ea1
1 changed files with 6 additions and 4 deletions
|
@ -13,6 +13,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||||
|
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/time.h>
|
#include <linux/time.h>
|
||||||
|
@ -47,7 +49,7 @@ compute_wday(efi_time_t *eft)
|
||||||
int ndays = 0;
|
int ndays = 0;
|
||||||
|
|
||||||
if (eft->year < 1998) {
|
if (eft->year < 1998) {
|
||||||
printk(KERN_ERR "efirtc: EFI year < 1998, invalid date\n");
|
pr_err("EFI year < 1998, invalid date\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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);
|
status = efi.set_wakeup_time((efi_bool_t)wkalrm->enabled, &eft);
|
||||||
|
|
||||||
printk(KERN_WARNING "write status is %d\n", (int)status);
|
dev_warn(dev, "write status is %d\n", (int)status);
|
||||||
|
|
||||||
return status == EFI_SUCCESS ? 0 : -EINVAL;
|
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) {
|
if (status != EFI_SUCCESS) {
|
||||||
/* should never happen */
|
/* should never happen */
|
||||||
printk(KERN_ERR "efitime: can't read time\n");
|
dev_err(dev, "can't read time\n");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue