[PATCH 06/28] staging: comedi: rti800: remove board attach kernel noise
Ian Abbott
abbotti at mev.co.uk
Tue Apr 9 19:29:59 UTC 2013
On 09/04/2013 17:47, H Hartley Sweeten wrote:
> On Tuesday, April 09, 2013 2:39 AM, Ian Abbott wrote:
>> On 2013-04-09 02:15, H Hartley Sweeten wrote:
>>> The printk's during the bard attach are just added noise. Remove
>>> them.
>>>
>>> Signed-off-by: H Hartley Sweeten <hsweeten at visionengravers.com>
>>> Cc: Ian Abbott <abbotti at mev.co.uk>
>>> Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
>>> ---
>>> drivers/staging/comedi/drivers/rti800.c | 12 ++----------
>>> 1 file changed, 2 insertions(+), 10 deletions(-)
>>>
>>> diff --git a/drivers/staging/comedi/drivers/rti800.c b/drivers/staging/comedi/drivers/rti800.c
>>> index 1d8cc34..fdfbf41 100644
>>> --- a/drivers/staging/comedi/drivers/rti800.c
>>> +++ b/drivers/staging/comedi/drivers/rti800.c
>>> @@ -309,11 +309,8 @@ static int rti800_attach(struct comedi_device *dev, struct comedi_devconfig *it)
>>> struct comedi_subdevice *s;
>>>
>>> iobase = it->options[0];
>>> - printk(KERN_INFO "comedi%d: rti800: 0x%04lx\n", dev->minor, iobase);
>>> - if (!request_region(iobase, RTI800_SIZE, "rti800")) {
>>> - printk(KERN_WARNING "I/O port conflict\n");
>>> + if (!request_region(iobase, RTI800_SIZE, "rti800"))
>>> return -EIO;
>>> - }
>>> dev->iobase = iobase;
>>>
>>> outb(0, dev->iobase + RTI800_CSR);
>>> @@ -322,15 +319,10 @@ static int rti800_attach(struct comedi_device *dev, struct comedi_devconfig *it)
>>>
>>> irq = it->options[1];
>>> if (irq) {
>>> - printk(KERN_INFO "( irq = %u )\n", irq);
>>> ret = request_irq(irq, rti800_interrupt, 0, "rti800", dev);
>>> - if (ret < 0) {
>>> - printk(KERN_WARNING " Failed to allocate IRQ\n");
>>> + if (ret < 0)
>>> return ret;
>>> - }
>>> dev->irq = irq;
>>> - } else {
>>> - printk(KERN_INFO "( no irq )\n");
>>> }
>>>
>>> dev->board_name = board->name;
>>
>> The error messages are useful diagnostics for legacy devices configured
>> with the "comedi_config" program, so I wouldn't remove them.
>
> Fair enough.
>
> The KERN_INFO messages are just added noise. How about taking this patch
> series, and the acl7225b series, as-is and I will follow up with a patch adding
> sensible dev_warn() messages for the errors?
Sounds like a plan. Even better if the dev_warn() indicates what port
address or irq it failed to request.
--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti at mev.co.uk> )=-
-=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=-
More information about the devel
mailing list