All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/11] rtc: use pr_err()/pr_warn() instead of printk()
@ 2013-02-15  5:57 Jingoo Han
  2013-02-15  5:58 ` [PATCH 02/11] rtc: max77686: use dev_info() " Jingoo Han
                   ` (9 more replies)
  0 siblings, 10 replies; 13+ messages in thread
From: Jingoo Han @ 2013-02-15  5:57 UTC (permalink / raw)
  To: 'Andrew Morton'
  Cc: linux-kernel, 'Alessandro Zummo',
	rtc-linux, 'Jingoo Han'

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>
---
 drivers/rtc/class.c   |    4 +++-
 drivers/rtc/rtc-dev.c |    7 ++++---
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c
index 26388f1..9b742d3 100644
--- a/drivers/rtc/class.c
+++ b/drivers/rtc/class.c
@@ -11,6 +11,8 @@
  * published by the Free Software Foundation.
 */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/module.h>
 #include <linux/rtc.h>
 #include <linux/kdev_t.h>
@@ -261,7 +263,7 @@ static int __init rtc_init(void)
 {
 	rtc_class = class_create(THIS_MODULE, "rtc");
 	if (IS_ERR(rtc_class)) {
-		printk(KERN_ERR "%s: couldn't create class\n", __FILE__);
+		pr_err("couldn't create class\n");
 		return PTR_ERR(rtc_class);
 	}
 	rtc_class->suspend = rtc_suspend;
diff --git a/drivers/rtc/rtc-dev.c b/drivers/rtc/rtc-dev.c
index 9a86b4b..471c30e 100644
--- a/drivers/rtc/rtc-dev.c
+++ b/drivers/rtc/rtc-dev.c
@@ -11,6 +11,8 @@
  * published by the Free Software Foundation.
 */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/module.h>
 #include <linux/rtc.h>
 #include <linux/sched.h>
@@ -480,7 +482,7 @@ void rtc_dev_prepare(struct rtc_device *rtc)
 void rtc_dev_add_device(struct rtc_device *rtc)
 {
 	if (cdev_add(&rtc->char_dev, rtc->dev.devt, 1))
-		printk(KERN_WARNING "%s: failed to add char device %d:%d\n",
+		pr_warn("%s: failed to add char device %d:%d\n",
 			rtc->name, MAJOR(rtc_devt), rtc->id);
 	else
 		pr_debug("%s: dev (%d:%d)\n", rtc->name,
@@ -499,8 +501,7 @@ void __init rtc_dev_init(void)
 
 	err = alloc_chrdev_region(&rtc_devt, 0, RTC_DEV_MAX, "rtc");
 	if (err < 0)
-		printk(KERN_ERR "%s: failed to allocate char dev region\n",
-			__FILE__);
+		pr_err("failed to allocate char dev region\n");
 }
 
 void __exit rtc_dev_exit(void)
-- 
1.7.2.5



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 02/11] rtc: max77686: use dev_info() instead of printk()
  2013-02-15  5:57 [PATCH 01/11] rtc: use pr_err()/pr_warn() instead of printk() Jingoo Han
@ 2013-02-15  5:58 ` Jingoo Han
  2013-02-15  5:58 ` [PATCH 03/11] rtc: rtc-efi: use pr_err()/pr_warn() " Jingoo Han
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 13+ messages in thread
From: Jingoo Han @ 2013-02-15  5:58 UTC (permalink / raw)
  To: 'Andrew Morton'
  Cc: linux-kernel, 'Alessandro Zummo',
	rtc-linux, 'Jingoo Han'

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>
---
 drivers/rtc/rtc-max77686.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/rtc/rtc-max77686.c b/drivers/rtc/rtc-max77686.c
index 2da0855..abe27c0 100644
--- a/drivers/rtc/rtc-max77686.c
+++ b/drivers/rtc/rtc-max77686.c
@@ -507,7 +507,7 @@ static int max77686_rtc_probe(struct platform_device *pdev)
 	struct max77686_rtc_info *info;
 	int ret, virq;
 
-	printk(KERN_INFO "%s\n", __func__);
+	dev_info(&pdev->dev, "%s\n", __func__);
 
 	info = kzalloc(sizeof(struct max77686_rtc_info), GFP_KERNEL);
 	if (!info)
@@ -546,7 +546,7 @@ static int max77686_rtc_probe(struct platform_device *pdev)
 			&max77686_rtc_ops, THIS_MODULE);
 
 	if (IS_ERR(info->rtc_dev)) {
-		printk(KERN_INFO "%s: fail\n", __func__);
+		dev_info(&pdev->dev, "%s: fail\n", __func__);
 
 		ret = PTR_ERR(info->rtc_dev);
 		dev_err(&pdev->dev, "Failed to register RTC device: %d\n", ret);
-- 
1.7.2.5



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 03/11] rtc: rtc-efi: use pr_err()/pr_warn() instead of printk()
  2013-02-15  5:57 [PATCH 01/11] rtc: use pr_err()/pr_warn() instead of printk() Jingoo Han
  2013-02-15  5:58 ` [PATCH 02/11] rtc: max77686: use dev_info() " Jingoo Han
@ 2013-02-15  5:58 ` Jingoo Han
  2013-02-15  6:04   ` Venu Byravarasu
  2013-02-15  5:59 ` [PATCH 04/11] rtc: rtc-ds2404: use dev_err() " Jingoo Han
                   ` (7 subsequent siblings)
  9 siblings, 1 reply; 13+ messages in thread
From: Jingoo Han @ 2013-02-15  5:58 UTC (permalink / raw)
  To: 'Andrew Morton'
  Cc: linux-kernel, 'Alessandro Zummo',
	rtc-linux, '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 <jg1.han@samsung.com>
---
 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 <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/time.h>
@@ -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;
 	}
 
-- 
1.7.2.5



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 04/11] rtc: rtc-ds2404: use dev_err() instead of printk()
  2013-02-15  5:57 [PATCH 01/11] rtc: use pr_err()/pr_warn() instead of printk() Jingoo Han
  2013-02-15  5:58 ` [PATCH 02/11] rtc: max77686: use dev_info() " Jingoo Han
  2013-02-15  5:58 ` [PATCH 03/11] rtc: rtc-efi: use pr_err()/pr_warn() " Jingoo Han
@ 2013-02-15  5:59 ` Jingoo Han
  2013-02-15  6:00 ` [PATCH 05/11] rtc: rtc-rs5c372: use dev_dbg()/dev_warn() instead of printk()/pr_debug() Jingoo Han
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 13+ messages in thread
From: Jingoo Han @ 2013-02-15  5:59 UTC (permalink / raw)
  To: 'Andrew Morton'
  Cc: linux-kernel, 'Alessandro Zummo',
	rtc-linux, 'Jingoo Han'

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>
---
 drivers/rtc/rtc-ds2404.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/rtc/rtc-ds2404.c b/drivers/rtc/rtc-ds2404.c
index 4539e37..b04fc42 100644
--- a/drivers/rtc/rtc-ds2404.c
+++ b/drivers/rtc/rtc-ds2404.c
@@ -70,7 +70,7 @@ static int ds2404_gpio_map(struct ds2404 *chip, struct platform_device *pdev,
 	for (i = 0; i < ARRAY_SIZE(ds2404_gpio); i++) {
 		err = gpio_request(ds2404_gpio[i].gpio, ds2404_gpio[i].name);
 		if (err) {
-			printk(KERN_ERR "error mapping gpio %s: %d\n",
+			dev_err(&pdev->dev, "error mapping gpio %s: %d\n",
 				ds2404_gpio[i].name, err);
 			goto err_request;
 		}
@@ -177,7 +177,7 @@ static void ds2404_write_memory(struct device *dev, u16 offset,
 
 	for (i = 0; i < length; i++) {
 		if (out[i] != ds2404_read_byte(dev)) {
-			printk(KERN_ERR "read invalid data\n");
+			dev_err(dev, "read invalid data\n");
 			return;
 		}
 	}
-- 
1.7.2.5



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 05/11] rtc: rtc-rs5c372: use dev_dbg()/dev_warn() instead of printk()/pr_debug()
  2013-02-15  5:57 [PATCH 01/11] rtc: use pr_err()/pr_warn() instead of printk() Jingoo Han
                   ` (2 preceding siblings ...)
  2013-02-15  5:59 ` [PATCH 04/11] rtc: rtc-ds2404: use dev_err() " Jingoo Han
@ 2013-02-15  6:00 ` Jingoo Han
  2013-02-15  6:00 ` [PATCH 06/11] rtc: rtc-at91rm9200: use dev_dbg()/dev_err() " Jingoo Han
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 13+ messages in thread
From: Jingoo Han @ 2013-02-15  6:00 UTC (permalink / raw)
  To: 'Andrew Morton'
  Cc: linux-kernel, 'Alessandro Zummo',
	rtc-linux, 'Jingoo Han'

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>
---
 drivers/rtc/rtc-rs5c372.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/rtc/rtc-rs5c372.c b/drivers/rtc/rtc-rs5c372.c
index 76f565a..581739f 100644
--- a/drivers/rtc/rtc-rs5c372.c
+++ b/drivers/rtc/rtc-rs5c372.c
@@ -311,8 +311,7 @@ static int rs5c_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled)
 		buf &= ~RS5C_CTRL1_AALE;
 
 	if (i2c_smbus_write_byte_data(client, addr, buf) < 0) {
-		printk(KERN_WARNING "%s: can't update alarm\n",
-			rs5c->rtc->name);
+		dev_warn(dev, "can't update alarm\n");
 		status = -EIO;
 	} else
 		rs5c->regs[RS5C_REG_CTRL1] = buf;
@@ -381,7 +380,7 @@ static int rs5c_set_alarm(struct device *dev, struct rtc_wkalrm *t)
 		addr = RS5C_ADDR(RS5C_REG_CTRL1);
 		buf[0] = rs5c->regs[RS5C_REG_CTRL1] & ~RS5C_CTRL1_AALE;
 		if (i2c_smbus_write_byte_data(client, addr, buf[0]) < 0) {
-			pr_debug("%s: can't disable alarm\n", rs5c->rtc->name);
+			dev_dbg(dev, "can't disable alarm\n");
 			return -EIO;
 		}
 		rs5c->regs[RS5C_REG_CTRL1] = buf[0];
@@ -395,7 +394,7 @@ static int rs5c_set_alarm(struct device *dev, struct rtc_wkalrm *t)
 	for (i = 0; i < sizeof(buf); i++) {
 		addr = RS5C_ADDR(RS5C_REG_ALARM_A_MIN + i);
 		if (i2c_smbus_write_byte_data(client, addr, buf[i]) < 0) {
-			pr_debug("%s: can't set alarm time\n", rs5c->rtc->name);
+			dev_dbg(dev, "can't set alarm time\n");
 			return -EIO;
 		}
 	}
@@ -405,8 +404,7 @@ static int rs5c_set_alarm(struct device *dev, struct rtc_wkalrm *t)
 		addr = RS5C_ADDR(RS5C_REG_CTRL1);
 		buf[0] = rs5c->regs[RS5C_REG_CTRL1] | RS5C_CTRL1_AALE;
 		if (i2c_smbus_write_byte_data(client, addr, buf[0]) < 0)
-			printk(KERN_WARNING "%s: can't enable alarm\n",
-				rs5c->rtc->name);
+			dev_warn(dev, "can't enable alarm\n");
 		rs5c->regs[RS5C_REG_CTRL1] = buf[0];
 	}
 
-- 
1.7.2.5



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 06/11] rtc: rtc-at91rm9200: use dev_dbg()/dev_err() instead of printk()/pr_debug()
  2013-02-15  5:57 [PATCH 01/11] rtc: use pr_err()/pr_warn() instead of printk() Jingoo Han
                   ` (3 preceding siblings ...)
  2013-02-15  6:00 ` [PATCH 05/11] rtc: rtc-rs5c372: use dev_dbg()/dev_warn() instead of printk()/pr_debug() Jingoo Han
@ 2013-02-15  6:00 ` Jingoo Han
  2013-02-15  6:01 ` [PATCH 07/11] rtc: rtc-rs5c313: use pr_err() instead of printk() Jingoo Han
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 13+ messages in thread
From: Jingoo Han @ 2013-02-15  6:00 UTC (permalink / raw)
  To: 'Andrew Morton'
  Cc: linux-kernel, 'Alessandro Zummo',
	rtc-linux, 'Jingoo Han'

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>
---
 drivers/rtc/rtc-at91rm9200.c |   17 ++++++++---------
 1 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/drivers/rtc/rtc-at91rm9200.c b/drivers/rtc/rtc-at91rm9200.c
index b6469e2..4a2e451 100644
--- a/drivers/rtc/rtc-at91rm9200.c
+++ b/drivers/rtc/rtc-at91rm9200.c
@@ -86,7 +86,7 @@ static int at91_rtc_readtime(struct device *dev, struct rtc_time *tm)
 	tm->tm_yday = rtc_year_days(tm->tm_mday, tm->tm_mon, tm->tm_year);
 	tm->tm_year = tm->tm_year - 1900;
 
-	pr_debug("%s(): %4d-%02d-%02d %02d:%02d:%02d\n", __func__,
+	dev_dbg(dev, "%s(): %4d-%02d-%02d %02d:%02d:%02d\n", __func__,
 		1900 + tm->tm_year, tm->tm_mon, tm->tm_mday,
 		tm->tm_hour, tm->tm_min, tm->tm_sec);
 
@@ -100,7 +100,7 @@ static int at91_rtc_settime(struct device *dev, struct rtc_time *tm)
 {
 	unsigned long cr;
 
-	pr_debug("%s(): %4d-%02d-%02d %02d:%02d:%02d\n", __func__,
+	dev_dbg(dev, "%s(): %4d-%02d-%02d %02d:%02d:%02d\n", __func__,
 		1900 + tm->tm_year, tm->tm_mon, tm->tm_mday,
 		tm->tm_hour, tm->tm_min, tm->tm_sec);
 
@@ -145,7 +145,7 @@ static int at91_rtc_readalarm(struct device *dev, struct rtc_wkalrm *alrm)
 	alrm->enabled = (at91_rtc_read(AT91_RTC_IMR) & AT91_RTC_ALARM)
 			? 1 : 0;
 
-	pr_debug("%s(): %4d-%02d-%02d %02d:%02d:%02d\n", __func__,
+	dev_dbg(dev, "%s(): %4d-%02d-%02d %02d:%02d:%02d\n", __func__,
 		1900 + tm->tm_year, tm->tm_mon, tm->tm_mday,
 		tm->tm_hour, tm->tm_min, tm->tm_sec);
 
@@ -183,7 +183,7 @@ static int at91_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm)
 		at91_rtc_write(AT91_RTC_IER, AT91_RTC_ALARM);
 	}
 
-	pr_debug("%s(): %4d-%02d-%02d %02d:%02d:%02d\n", __func__,
+	dev_dbg(dev, "%s(): %4d-%02d-%02d %02d:%02d:%02d\n", __func__,
 		at91_alarm_year, tm.tm_mon, tm.tm_mday, tm.tm_hour,
 		tm.tm_min, tm.tm_sec);
 
@@ -192,7 +192,7 @@ static int at91_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm)
 
 static int at91_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled)
 {
-	pr_debug("%s(): cmd=%08x\n", __func__, enabled);
+	dev_dbg(dev, "%s(): cmd=%08x\n", __func__, enabled);
 
 	if (enabled) {
 		at91_rtc_write(AT91_RTC_SCCR, AT91_RTC_ALARM);
@@ -240,7 +240,7 @@ static irqreturn_t at91_rtc_interrupt(int irq, void *dev_id)
 
 		rtc_update_irq(rtc, 1, events);
 
-		pr_debug("%s(): num=%ld, events=0x%02lx\n", __func__,
+		dev_dbg(&pdev->dev, "%s(): num=%ld, events=0x%02lx\n", __func__,
 			events >> 8, events & 0x000000FF);
 
 		return IRQ_HANDLED;
@@ -296,8 +296,7 @@ static int __init at91_rtc_probe(struct platform_device *pdev)
 				IRQF_SHARED,
 				"at91_rtc", pdev);
 	if (ret) {
-		printk(KERN_ERR "at91_rtc: IRQ %d already in use.\n",
-				irq);
+		dev_err(&pdev->dev, "at91_rtc: IRQ %d already in use.\n", irq);
 		return ret;
 	}
 
@@ -315,7 +314,7 @@ static int __init at91_rtc_probe(struct platform_device *pdev)
 	}
 	platform_set_drvdata(pdev, rtc);
 
-	printk(KERN_INFO "AT91 Real Time Clock driver.\n");
+	dev_info(&pdev->dev, "AT91 Real Time Clock driver.\n");
 	return 0;
 }
 
-- 
1.7.2.5



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 07/11] rtc: rtc-rs5c313: use pr_err() instead of printk()
  2013-02-15  5:57 [PATCH 01/11] rtc: use pr_err()/pr_warn() instead of printk() Jingoo Han
                   ` (4 preceding siblings ...)
  2013-02-15  6:00 ` [PATCH 06/11] rtc: rtc-at91rm9200: use dev_dbg()/dev_err() " Jingoo Han
@ 2013-02-15  6:01 ` Jingoo Han
  2013-02-15  6:02 ` [PATCH 08/11] rtc: rtc-vr41xx: use dev_info() " Jingoo Han
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 13+ messages in thread
From: Jingoo Han @ 2013-02-15  6:01 UTC (permalink / raw)
  To: 'Andrew Morton'
  Cc: linux-kernel, 'Alessandro Zummo',
	rtc-linux, 'Jingoo Han'

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>
---
 drivers/rtc/rtc-rs5c313.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

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 */
-- 
1.7.2.5



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 08/11] rtc: rtc-vr41xx: use dev_info() instead of printk()
  2013-02-15  5:57 [PATCH 01/11] rtc: use pr_err()/pr_warn() instead of printk() Jingoo Han
                   ` (5 preceding siblings ...)
  2013-02-15  6:01 ` [PATCH 07/11] rtc: rtc-rs5c313: use pr_err() instead of printk() Jingoo Han
@ 2013-02-15  6:02 ` Jingoo Han
  2013-02-15  6:02 ` [PATCH 09/11] rtc: rtc-sun4v: use pr_warn() " Jingoo Han
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 13+ messages in thread
From: Jingoo Han @ 2013-02-15  6:02 UTC (permalink / raw)
  To: 'Andrew Morton'
  Cc: linux-kernel, 'Alessandro Zummo',
	rtc-linux, 'Jingoo Han'

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>
---
 drivers/rtc/rtc-vr41xx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/rtc/rtc-vr41xx.c b/drivers/rtc/rtc-vr41xx.c
index 6c3774c..f91be04 100644
--- a/drivers/rtc/rtc-vr41xx.c
+++ b/drivers/rtc/rtc-vr41xx.c
@@ -352,7 +352,7 @@ static int rtc_probe(struct platform_device *pdev)
 	disable_irq(aie_irq);
 	disable_irq(pie_irq);
 
-	printk(KERN_INFO "rtc: Real Time Clock of NEC VR4100 series\n");
+	dev_info(&pdev->dev, "Real Time Clock of NEC VR4100 series\n");
 
 	return 0;
 
-- 
1.7.2.5



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 09/11] rtc: rtc-sun4v: use pr_warn() instead of printk()
  2013-02-15  5:57 [PATCH 01/11] rtc: use pr_err()/pr_warn() instead of printk() Jingoo Han
                   ` (6 preceding siblings ...)
  2013-02-15  6:02 ` [PATCH 08/11] rtc: rtc-vr41xx: use dev_info() " Jingoo Han
@ 2013-02-15  6:02 ` Jingoo Han
  2013-02-15  6:03 ` [PATCH 10/11] rtc: rtc-pcf8583: use dev_warn() " Jingoo Han
  2013-02-15  6:04 ` [PATCH 11/11] rtc: rtc-cmos: use dev_warn()/dev_dbg() instead of printk()/pr_debug() Jingoo Han
  9 siblings, 0 replies; 13+ messages in thread
From: Jingoo Han @ 2013-02-15  6:02 UTC (permalink / raw)
  To: 'Andrew Morton'
  Cc: linux-kernel, 'Alessandro Zummo',
	rtc-linux, 'Jingoo Han'

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>
---
 drivers/rtc/rtc-sun4v.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/rtc/rtc-sun4v.c b/drivers/rtc/rtc-sun4v.c
index 5b22610..59b5c2d 100644
--- a/drivers/rtc/rtc-sun4v.c
+++ b/drivers/rtc/rtc-sun4v.c
@@ -3,6 +3,8 @@
  * Copyright (C) 2008 David S. Miller <davem@davemloft.net>
  */
 
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/delay.h>
@@ -26,10 +28,10 @@ retry:
 			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;
 }
 
@@ -53,10 +55,10 @@ retry:
 			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;
 }
 
-- 
1.7.2.5



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 10/11] rtc: rtc-pcf8583: use dev_warn() instead of printk()
  2013-02-15  5:57 [PATCH 01/11] rtc: use pr_err()/pr_warn() instead of printk() Jingoo Han
                   ` (7 preceding siblings ...)
  2013-02-15  6:02 ` [PATCH 09/11] rtc: rtc-sun4v: use pr_warn() " Jingoo Han
@ 2013-02-15  6:03 ` Jingoo Han
  2013-02-15  6:04 ` [PATCH 11/11] rtc: rtc-cmos: use dev_warn()/dev_dbg() instead of printk()/pr_debug() Jingoo Han
  9 siblings, 0 replies; 13+ messages in thread
From: Jingoo Han @ 2013-02-15  6:03 UTC (permalink / raw)
  To: 'Andrew Morton'
  Cc: linux-kernel, 'Alessandro Zummo',
	rtc-linux, 'Jingoo Han'

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>
---
 drivers/rtc/rtc-pcf8583.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/rtc/rtc-pcf8583.c b/drivers/rtc/rtc-pcf8583.c
index 3415b8f..aa9bf2b 100644
--- a/drivers/rtc/rtc-pcf8583.c
+++ b/drivers/rtc/rtc-pcf8583.c
@@ -185,7 +185,7 @@ static int pcf8583_rtc_read_time(struct device *dev, struct rtc_time *tm)
 	if (ctrl & (CTRL_STOP | CTRL_HOLD)) {
 		unsigned char new_ctrl = ctrl & ~(CTRL_STOP | CTRL_HOLD);
 
-		printk(KERN_WARNING "RTC: resetting control %02x -> %02x\n",
+		dev_warn(dev, "RTC: resetting control %02x -> %02x\n",
 		       ctrl, new_ctrl);
 
 		if ((err = pcf8583_set_ctrl(client, &new_ctrl)) < 0)
-- 
1.7.2.5



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* RE: [PATCH 03/11] rtc: rtc-efi: use pr_err()/pr_warn() instead of printk()
  2013-02-15  5:58 ` [PATCH 03/11] rtc: rtc-efi: use pr_err()/pr_warn() " Jingoo Han
@ 2013-02-15  6:04   ` Venu Byravarasu
  0 siblings, 0 replies; 13+ messages in thread
From: Venu Byravarasu @ 2013-02-15  6:04 UTC (permalink / raw)
  To: Jingoo Han, 'Andrew Morton'
  Cc: linux-kernel, 'Alessandro Zummo', rtc-linux

> -----Original Message-----
> From: linux-kernel-owner@vger.kernel.org [mailto:linux-kernel-
> owner@vger.kernel.org] On Behalf Of Jingoo Han
> Sent: Friday, February 15, 2013 11:29 AM
> To: 'Andrew Morton'
> Cc: linux-kernel@vger.kernel.org; 'Alessandro Zummo'; rtc-
> linux@googlegroups.com; 'Jingoo Han'
> Subject: [PATCH 03/11] rtc: rtc-efi: use pr_err()/pr_warn() instead of printk()
> 
> 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 <jg1.han@samsung.com>
> ---
>  drivers/rtc/rtc-efi.c |   10 ++++++----
>  1 files changed, 6 insertions(+), 4 deletions(-)
> 
>  	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);

Why don't you use dev_warn itself? 

> 
>  	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");

Why don't you use dev_err itself?  

>  		return -EINVAL;
>  	}
> 
> --
> 1.7.2.5
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 11/11] rtc: rtc-cmos: use dev_warn()/dev_dbg() instead of printk()/pr_debug()
  2013-02-15  5:57 [PATCH 01/11] rtc: use pr_err()/pr_warn() instead of printk() Jingoo Han
                   ` (8 preceding siblings ...)
  2013-02-15  6:03 ` [PATCH 10/11] rtc: rtc-pcf8583: use dev_warn() " Jingoo Han
@ 2013-02-15  6:04 ` Jingoo Han
  9 siblings, 0 replies; 13+ messages in thread
From: Jingoo Han @ 2013-02-15  6:04 UTC (permalink / raw)
  To: 'Andrew Morton'
  Cc: linux-kernel, 'Alessandro Zummo',
	rtc-linux, 'Jingoo Han'

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>
---
 drivers/rtc/rtc-cmos.c |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
index 9deb9e4..af97c94 100644
--- a/drivers/rtc/rtc-cmos.c
+++ b/drivers/rtc/rtc-cmos.c
@@ -706,7 +706,7 @@ cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq)
 			rtc_cmos_int_handler = hpet_rtc_interrupt;
 			err = hpet_register_irq_handler(cmos_interrupt);
 			if (err != 0) {
-				printk(KERN_WARNING "hpet_register_irq_handler "
+				dev_warn(dev, "hpet_register_irq_handler "
 						" failed in rtc_init().");
 				goto cleanup1;
 			}
@@ -731,8 +731,7 @@ cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq)
 		goto cleanup2;
 	}
 
-	pr_info("%s: %s%s, %zd bytes nvram%s\n",
-		dev_name(&cmos_rtc.rtc->dev),
+	dev_info(dev, "%s%s, %zd bytes nvram%s\n",
 		!is_valid_irq(rtc_irq) ? "no alarms" :
 			cmos_rtc.mon_alrm ? "alarms up to one year" :
 			cmos_rtc.day_alrm ? "alarms up to one month" :
@@ -820,8 +819,7 @@ static int cmos_suspend(struct device *dev)
 			enable_irq_wake(cmos->irq);
 	}
 
-	pr_debug("%s: suspend%s, ctrl %02x\n",
-			dev_name(&cmos_rtc.rtc->dev),
+	dev_dbg(dev, "suspend%s, ctrl %02x\n",
 			(tmp & RTC_AIE) ? ", alarm may wake" : "",
 			tmp);
 
@@ -876,9 +874,7 @@ static int cmos_resume(struct device *dev)
 		spin_unlock_irq(&rtc_lock);
 	}
 
-	pr_debug("%s: resume, ctrl %02x\n",
-			dev_name(&cmos_rtc.rtc->dev),
-			tmp);
+	dev_dbg(dev, "resume, ctrl %02x\n", tmp);
 
 	return 0;
 }
-- 
1.7.2.5



^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH 03/11] rtc: rtc-efi: use pr_err()/pr_warn() instead of printk()
@ 2013-02-15  6:37 Jingoo Han
  0 siblings, 0 replies; 13+ messages in thread
From: Jingoo Han @ 2013-02-15  6:37 UTC (permalink / raw)
  To: Venu Byravarasu, 'Andrew Morton'
  Cc: linux-kernel, 'Alessandro Zummo', rtc-linux, Jingoo Han

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=euc-kr, Size: 2142 bytes --]

On Friday, February 15, 2013 3:04 PM, Venu Byravarasu wrote:
> 
> > -----Original Message-----
> > From: linux-kernel-owner@vger.kernel.org [mailto:linux-kernel-
> > owner@vger.kernel.org] On Behalf Of Jingoo Han
> > Sent: Friday, February 15, 2013 11:29 AM
> > To: 'Andrew Morton'
> > Cc: linux-kernel@vger.kernel.org; 'Alessandro Zummo'; rtc-
> > linux@googlegroups.com; 'Jingoo Han'
> > Subject: [PATCH 03/11] rtc: rtc-efi: use pr_err()/pr_warn() instead of printk()
> >
> > 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 <jg1.han@samsung.com>
> > ---
> >  drivers/rtc/rtc-efi.c |   10 ++++++----
> >  1 files changed, 6 insertions(+), 4 deletions(-)
> >
> >  	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);
> 
> Why don't you use dev_warn itself?

OK, I will change it.
Thank you.

Best regards,
Jingoo Han

> 
> >
> >  	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");
> 
> Why don't you use dev_err itself?
> 
> >  		return -EINVAL;
> >  	}
> >
> > --
> > 1.7.2.5
> >
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at  http://www.tux.org/lkml/
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2013-02-15  6:37 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-15  5:57 [PATCH 01/11] rtc: use pr_err()/pr_warn() instead of printk() Jingoo Han
2013-02-15  5:58 ` [PATCH 02/11] rtc: max77686: use dev_info() " Jingoo Han
2013-02-15  5:58 ` [PATCH 03/11] rtc: rtc-efi: use pr_err()/pr_warn() " Jingoo Han
2013-02-15  6:04   ` Venu Byravarasu
2013-02-15  5:59 ` [PATCH 04/11] rtc: rtc-ds2404: use dev_err() " Jingoo Han
2013-02-15  6:00 ` [PATCH 05/11] rtc: rtc-rs5c372: use dev_dbg()/dev_warn() instead of printk()/pr_debug() Jingoo Han
2013-02-15  6:00 ` [PATCH 06/11] rtc: rtc-at91rm9200: use dev_dbg()/dev_err() " Jingoo Han
2013-02-15  6:01 ` [PATCH 07/11] rtc: rtc-rs5c313: use pr_err() instead of printk() Jingoo Han
2013-02-15  6:02 ` [PATCH 08/11] rtc: rtc-vr41xx: use dev_info() " Jingoo Han
2013-02-15  6:02 ` [PATCH 09/11] rtc: rtc-sun4v: use pr_warn() " Jingoo Han
2013-02-15  6:03 ` [PATCH 10/11] rtc: rtc-pcf8583: use dev_warn() " Jingoo Han
2013-02-15  6:04 ` [PATCH 11/11] rtc: rtc-cmos: use dev_warn()/dev_dbg() instead of printk()/pr_debug() Jingoo Han
2013-02-15  6:37 [PATCH 03/11] rtc: rtc-efi: use pr_err()/pr_warn() instead of printk() Jingoo Han

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.