From: YAMANE Toshiaki <yamanetoshi@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
YAMANE Toshiaki <yamanetoshi@gmail.com>
Subject: [PATCH 2/3] staging/sbe-2t3e3: Use netdev_ or dev_ or pr_ printks in module.c
Date: Thu, 27 Sep 2012 22:59:10 +0900 [thread overview]
Message-ID: <1348754350-5022-1-git-send-email-yamanetoshi@gmail.com> (raw)
In-Reply-To: <1348754271-4987-1-git-send-email-yamanetoshi@gmail.com>
fixed below checkpatch warning.
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ...
and add pr_fmt.
Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
---
drivers/staging/sbe-2t3e3/module.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/sbe-2t3e3/module.c b/drivers/staging/sbe-2t3e3/module.c
index cd778b3..4547137 100644
--- a/drivers/staging/sbe-2t3e3/module.c
+++ b/drivers/staging/sbe-2t3e3/module.c
@@ -10,6 +10,8 @@
* This code is based on a driver written by SBE Inc.
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/delay.h>
@@ -66,7 +68,7 @@ static int __devinit t3e3_init_channel(struct channel *channel, struct pci_dev *
dev = alloc_hdlcdev(channel);
if (!dev) {
- printk(KERN_ERR "SBE 2T3E3" ": Out of memory\n");
+ pr_err("SBE 2T3E3" ": Out of memory\n");
goto free_regions;
}
@@ -93,7 +95,8 @@ static int __devinit t3e3_init_channel(struct channel *channel, struct pci_dev *
t3e3_init(channel);
if (request_irq(dev->irq, &t3e3_intr, IRQF_SHARED, dev->name, dev)) {
- printk(KERN_WARNING "%s: could not get irq: %d\n", dev->name, dev->irq);
+ netdev_warn(channel->dev, "%s: could not get irq: %d\n",
+ dev->name, dev->irq);
goto free_regions;
}
@@ -137,7 +140,8 @@ static int __devinit t3e3_init_card(struct pci_dev *pdev, const struct pci_devic
break; /* found the second channel */
if (!pdev1) {
- printk(KERN_ERR "SBE 2T3E3" ": Can't find the second channel\n");
+ dev_err(&pdev->dev,
+ "SBE 2T3E3" ": Can't find the second channel\n");
return -EFAULT;
}
channels = 2;
@@ -146,7 +150,7 @@ static int __devinit t3e3_init_card(struct pci_dev *pdev, const struct pci_devic
card = kzalloc(sizeof(struct card) + channels * sizeof(struct channel), GFP_KERNEL);
if (!card) {
- printk(KERN_ERR "SBE 2T3E3" ": Out of memory\n");
+ dev_err(&pdev->dev, "SBE 2T3E3" ": Out of memory\n");
return -ENOBUFS;
}
--
1.7.9.5
next prev parent reply other threads:[~2012-09-27 13:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-27 13:57 [PATCH 1/3] staging/sbe-2t3e3: Use netdev_ printks in main.c YAMANE Toshiaki
2012-09-27 13:59 ` YAMANE Toshiaki [this message]
2012-10-19 19:09 ` [PATCH 2/3] staging/sbe-2t3e3: Use netdev_ or dev_ or pr_ printks in module.c Greg Kroah-Hartman
2012-10-24 2:52 ` YAMANE Toshiaki
2012-09-27 13:59 ` [PATCH 3/3] staging/sbe-2t3e3: Use netdev_ printks in cpld.c YAMANE Toshiaki
2012-10-19 19:10 ` [PATCH 1/3] staging/sbe-2t3e3: Use netdev_ printks in main.c Greg Kroah-Hartman
2012-10-24 3:05 ` YAMANE Toshiaki
2012-10-24 4:15 ` Greg Kroah-Hartman
2012-10-24 5:38 ` Toshiaki Yamane
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=1348754350-5022-1-git-send-email-yamanetoshi@gmail.com \
--to=yamanetoshi@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
/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
Powered by JetHome