From: YAMANE Toshiaki <yamanetoshi@gmail.com>
To: Greg Kroah-Hartman <greg@kroah.com>
Cc: Ian Abbott <abbotti@mev.co.uk>,
Frank Mori Hess <fmhess@users.sourceforge.net>,
linux-kernel@vger.kernel.org,
YAMANE Toshiaki <yamanetoshi@gmail.com>
Subject: [PATCH v2] staging/comedi: Use pr_ or dev_ printks in drivers/serial2002.c
Date: Thu, 25 Oct 2012 09:16:49 +0900 [thread overview]
Message-ID: <1351124209-5338-1-git-send-email-yamanetoshi@gmail.com> (raw)
In-Reply-To: <20121022195156.GC8567@kroah.com>
fixed below checkpatch warning.
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ...
and added pr_fmt.
Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
---
drivers/staging/comedi/drivers/serial2002.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/comedi/drivers/serial2002.c b/drivers/staging/comedi/drivers/serial2002.c
index 5bf84cf..91fb8b1 100644
--- a/drivers/staging/comedi/drivers/serial2002.c
+++ b/drivers/staging/comedi/drivers/serial2002.c
@@ -31,6 +31,8 @@ Status: in development
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include "../comedidev.h"
#include <linux/delay.h>
@@ -282,7 +284,7 @@ static struct serial_data serial_read(struct file *f, int timeout)
length++;
if (data < 0) {
- printk(KERN_ERR "serial2002 error\n");
+ pr_err("Failed to read serial.\n");
break;
} else if (data & 0x80) {
result.value = (result.value << 7) | (data & 0x7f);
@@ -355,7 +357,7 @@ static int serial_2002_open(struct comedi_device *dev)
devpriv->tty = filp_open(port, O_RDWR, 0);
if (IS_ERR(devpriv->tty)) {
result = (int)PTR_ERR(devpriv->tty);
- printk(KERN_ERR "serial_2002: file open error = %d\n", result);
+ dev_err(dev->class_dev, "file open error = %d\n", result);
} else {
struct config_t {
--
1.7.9.5
prev parent reply other threads:[~2012-10-25 0:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-10 12:20 [PATCH] " YAMANE Toshiaki
2012-10-22 19:51 ` Greg Kroah-Hartman
2012-10-25 0:16 ` YAMANE Toshiaki [this message]
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=1351124209-5338-1-git-send-email-yamanetoshi@gmail.com \
--to=yamanetoshi@gmail.com \
--cc=abbotti@mev.co.uk \
--cc=fmhess@users.sourceforge.net \
--cc=greg@kroah.com \
--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