Re: [PATCH 28/28] Staging: comedi: fix print(k) coding style issue in aio_aio12_8.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/08/2010 02:13 PM, Maurice Dawson wrote:
> This is a patch to the aio_aio12_8.c that fixes up print(k) warnings found by the checkpatch.pl tool
> 
> Signed-off-by: Maurice Dawson <mauricedawson2699@xxxxxxxxxxxxxx>
> ---
>  drivers/staging/comedi/drivers/aio_aio12_8.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/comedi/drivers/aio_aio12_8.c b/drivers/staging/comedi/drivers/aio_aio12_8.c
> index c4cac66..7a1c636 100644
> --- a/drivers/staging/comedi/drivers/aio_aio12_8.c
> +++ b/drivers/staging/comedi/drivers/aio_aio12_8.c
> @@ -110,7 +110,7 @@ static int aio_aio12_8_ai_read(struct comedi_device *dev,
>  		while (timeout &&
>  		       !(inb(dev->iobase + AIO12_8_STATUS) & STATUS_ADC_EOC)) {
>  			timeout--;
> -			printk("timeout %d\n", timeout);
> +			printk(KERN_ERR "timeout %d\n", timeout);

This is:
a) useless output, you don't know anything from "timeout <number>"
b) in a loop, so that it will spam klog

So if you can really fix that, add there at least >>"%s", __func__<< and
ratelimit that.

> @@ -172,7 +172,7 @@ static int aio_aio12_8_attach(struct comedi_device *dev,
>  
>  	iobase = it->options[0];
>  	if (!request_region(iobase, 24, "aio_aio12_8")) {
> -		printk("I/O port conflict");
> +		printk(KERN_ERR "I/O port conflict");

Again, add there at least __func__.

-- 
js
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux