From: Dan Carpenter <dan.carpenter@oracle.com>
To: Johannes Thumshirn <morbidrsa@googlemail.com>
Cc: gregkh@suse.de, abbotti@mev.co.uk, fmhess@users.sourceforge.net,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: comedi: Added log subjects to printk()s in pcmmio
Date: Tue, 27 Sep 2011 17:13:27 +0300 [thread overview]
Message-ID: <20110927141326.GG10999@longonot.mountain> (raw)
In-Reply-To: <1316926152-7258-1-git-send-email-morbidrsa@googlemail.com>
On Sun, Sep 25, 2011 at 06:49:12AM +0200, Johannes Thumshirn wrote:
> - printk("comedi%d: %s: io: %lx ", dev->minor, driver.driver_name,
> + printk(KERN_INFO "comedi%d: %s: io: %lx ", dev->minor, driver.driver_name,
> iobase);
>
> dev->iobase = iobase;
> @@ -379,7 +379,7 @@ static int pcmmio_attach(struct comedi_device *dev, struct comedi_devconfig *it)
> if (!iobase || !request_region(iobase,
> thisboard->total_iosize,
> driver.driver_name)) {
> - printk("I/O port conflict\n");
> + printk(KERN_ERR "I/O port conflict\n");
The KERN_ERR stuff is only supposed to be used at the start of the
line of output. (The previous KERN_INFO printk didn't have a new
line at the end).
All this code needs to be rewritten so each printk() only prints
one line. Otherwise you could get messages printed out in the
middle of other messages and it looks like crap.
This code is trickier than it looks. Quite a few newbies have run
into trouble here. My advice is to start with something that looks
tricky so at least if you mess up, you were doing something awesome.
:)
regards,
dan carpenter
next prev parent reply other threads:[~2011-09-27 14:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-25 4:49 [PATCH] staging: comedi: Added log subjects to printk()s in pcmmio Johannes Thumshirn
2011-09-27 14:13 ` Dan Carpenter [this message]
2011-09-27 15:40 ` morbid-rsa
2011-09-30 10:31 ` Johannes Thumshirn
2011-10-17 22:10 ` Greg KH
2011-10-24 17:52 ` [PATCH] staging: comedi: Unbreak output of " Johannes Thumshirn
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=20110927141326.GG10999@longonot.mountain \
--to=dan.carpenter@oracle.com \
--cc=abbotti@mev.co.uk \
--cc=devel@driverdev.osuosl.org \
--cc=fmhess@users.sourceforge.net \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=morbidrsa@googlemail.com \
/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