mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Wim Van Sebroeck <wim@iguana.be>
Cc: linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 15/16] watchdog: Convert dev_printk(KERN_<LEVEL> to dev_<level>(
Date: Sun, 28 Oct 2012 01:05:53 -0700	[thread overview]
Message-ID: <e77e06add16c9cb82fd359b68f63d7b9f4597ed3.1351411048.git.joe@perches.com> (raw)
In-Reply-To: <cover.1351411047.git.joe@perches.com>

dev_<level> calls take less code than dev_printk(KERN_<LEVEL>
and reducing object size is good.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/watchdog/mpcore_wdt.c |   19 +++++++++----------
 1 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/drivers/watchdog/mpcore_wdt.c b/drivers/watchdog/mpcore_wdt.c
index 7c741dc..24388c2 100644
--- a/drivers/watchdog/mpcore_wdt.c
+++ b/drivers/watchdog/mpcore_wdt.c
@@ -80,8 +80,7 @@ static irqreturn_t mpcore_wdt_fire(int irq, void *arg)
 
 	/* Check it really was our interrupt */
 	if (readl(wdt->base + TWD_WDOG_INTSTAT)) {
-		dev_printk(KERN_CRIT, wdt->dev,
-					"Triggered - Reboot ignored.\n");
+		dev_crit(wdt->dev, "Triggered - Reboot ignored\n");
 		/* Clear the interrupt on the watchdog */
 		writel(1, wdt->base + TWD_WDOG_INTSTAT);
 		return IRQ_HANDLED;
@@ -123,7 +122,7 @@ static void mpcore_wdt_stop(struct mpcore_wdt *wdt)
 
 static void mpcore_wdt_start(struct mpcore_wdt *wdt)
 {
-	dev_printk(KERN_INFO, wdt->dev, "enabling watchdog.\n");
+	dev_info(wdt->dev, "enabling watchdog\n");
 
 	/* This loads the count register but does NOT start the count yet */
 	mpcore_wdt_keepalive(wdt);
@@ -180,8 +179,8 @@ static int mpcore_wdt_release(struct inode *inode, struct file *file)
 	if (wdt->expect_close == 42)
 		mpcore_wdt_stop(wdt);
 	else {
-		dev_printk(KERN_CRIT, wdt->dev,
-				"unexpected close, not stopping watchdog!\n");
+		dev_crit(wdt->dev,
+			 "unexpected close, not stopping watchdog!\n");
 		mpcore_wdt_keepalive(wdt);
 	}
 	clear_bit(0, &wdt->timer_alive);
@@ -351,9 +350,9 @@ static int __devinit mpcore_wdt_probe(struct platform_device *pdev)
 		ret = devm_request_irq(wdt->dev, wdt->irq, mpcore_wdt_fire, 0,
 				"mpcore_wdt", wdt);
 		if (ret) {
-			dev_printk(KERN_ERR, wdt->dev,
-					"cannot register IRQ%d for watchdog\n",
-					wdt->irq);
+			dev_err(wdt->dev,
+				"cannot register IRQ%d for watchdog\n",
+				wdt->irq);
 			return ret;
 		}
 	}
@@ -365,9 +364,9 @@ static int __devinit mpcore_wdt_probe(struct platform_device *pdev)
 	mpcore_wdt_miscdev.parent = &pdev->dev;
 	ret = misc_register(&mpcore_wdt_miscdev);
 	if (ret) {
-		dev_printk(KERN_ERR, wdt->dev,
+		dev_err(wdt->dev,
 			"cannot register miscdev on minor=%d (err=%d)\n",
-							WATCHDOG_MINOR, ret);
+			WATCHDOG_MINOR, ret);
 		return ret;
 	}
 
-- 
1.7.8.112.g3fd21


  parent reply	other threads:[~2012-10-28  8:10 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-28  8:05 [PATCH 00/16] treewide: " Joe Perches
2012-10-28  8:05 ` [PATCH 01/16] tile: " Joe Perches
2012-10-28 12:54   ` Chris Metcalf
2012-10-28  8:05 ` [PATCH 02/16] ata: " Joe Perches
2012-11-28 17:42   ` Jeff Garzik
2012-10-28  8:05 ` [PATCH 03/16] drivers: base: " Joe Perches
2012-10-28  8:05 ` [PATCH 04/16] block: " Joe Perches
2012-10-28  8:05 ` [PATCH 05/16] pcmcia: " Joe Perches
2012-10-28  8:05 ` [PATCH 06/16] dma: " Joe Perches
2012-10-29  5:54   ` Vinod Koul
2012-10-28  8:05 ` [PATCH 07/16] gpu: " Joe Perches
2012-10-28  8:05 ` [PATCH 08/16] i2c: " Joe Perches
2012-10-28 11:45   ` Jean Delvare
2012-10-28  8:05 ` [PATCH 09/16] wireless: " Joe Perches
2012-10-28  8:05 ` [PATCH 10/16] ethernet: " Joe Perches
2012-11-03  2:00   ` David Miller
2012-10-28  8:05 ` [PATCH 11/16] pci: " Joe Perches
2012-11-05 22:28   ` Bjorn Helgaas
2012-10-28  8:05 ` [PATCH 12/16] scsi: " Joe Perches
2012-10-28  8:05 ` [PATCH 13/16] usb: " Joe Perches
2012-10-28  8:05 ` [PATCH 14/16] virtio: " Joe Perches
2012-10-31 23:54   ` Rusty Russell
2012-10-28  8:05 ` Joe Perches [this message]
2012-10-28  8:05 ` [PATCH 16/16] sound: " Joe Perches
2012-10-28  8:59   ` Takashi Iwai
2012-10-28 10:54 ` [PATCH 00/16] treewide: " Sergei Shtylyov
2012-10-28 12:12   ` Joe Perches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e77e06add16c9cb82fd359b68f63d7b9f4597ed3.1351411048.git.joe@perches.com \
    --to=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=wim@iguana.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®