From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: ahern.michael.t@gmail.com
Cc: gregkh@suse.de, julia@diku.dk, nikai@nikai.net,
morgan.gatti@gmail.com, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Coding style in serial2002
Date: Fri, 14 Jan 2011 08:47:23 +0100 [thread overview]
Message-ID: <20110114074723.GA24920@pengutronix.de> (raw)
In-Reply-To: <1294967694-4840-1-git-send-email-ahern.michael.t@gmail.com>
Hello,
On Fri, Jan 14, 2011 at 12:14:54PM +1100, ahern.michael.t@gmail.com wrote:
> @@ -329,7 +332,7 @@ static struct serial_data serial_read(struct file *f, int timeout)
>
> length++;
> if (data < 0) {
> - printk("serial2002 error\n");
> + printk(KERN_ERR "serial2002 error\n");
better use pr_err
> break;
> } else if (data & 0x80) {
> result.value = (result.value << 7) | (data & 0x7f);
> @@ -402,7 +405,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("serial_2002: file open error = %d\n", result);
> + printk(KERN_ERR "serial_2002: file open error = %d\n", result);
> } else {
> struct config_t {
>
> @@ -434,7 +437,7 @@ static int serial_2002_open(struct comedi_device *dev)
> }
>
> tty_setspeed(devpriv->tty, devpriv->speed);
> - poll_channel(devpriv->tty, 31); /* Start reading configuration */
> + poll_channel(devpriv->tty, 31); /* Start reading config */
> while (1) {
> struct serial_data data;
>
> @@ -451,23 +454,23 @@ static int serial_2002_open(struct comedi_device *dev)
> command = (data.value >> 8) & 0x3;
> switch (kind) {
> case 1:{
IMHO these braces can go away, too.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
next prev parent reply other threads:[~2011-01-14 7:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-14 1:14 [PATCH] Coding style in serial2002 ahern.michael.t
2011-01-14 7:47 ` Uwe Kleine-König [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-01-20 7:50 ahern.michael.t
2011-01-20 7:53 ` Felipe Balbi
2011-01-20 7:56 ` Uwe Kleine-König
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=20110114074723.GA24920@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=ahern.michael.t@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@suse.de \
--cc=julia@diku.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=morgan.gatti@gmail.com \
--cc=nikai@nikai.net \
/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