RE: [PATCH 6/9] staging: comedi: das08: Replace printk calls

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

 



On Wednesday, May 23, 2012 9:50 AM, Ian Abbott wrote:
> Replace the printk calls with dev_info, dev_err, etc.  Some of the
> printk strings were missing newlines on the end.
>
> Signed-off-by: Ian Abbott <abbotti@xxxxxxxxx>
> ---

A couple nits..

> @@ -530,11 +530,9 @@ static int das08_counter_read(struct comedi_device *dev,
>  			      struct comedi_insn *insn, unsigned int *data)
>  {
>  	int chan = insn->chanspec;
> -

You might want to leave the white space here.

> -	/* printk("Reading counter channel %d ",chan); */
>  	data[0] = i8254_read_channel(&devpriv->i8254, chan);
> -	/* printk("=> 0x%08X\n",data[0]); */
> -
> +	/* dev_dbg(dev->class_dev, "Read counter channel %d => 0x%08X\n",
> +		   chan, data[0]); */

Is it really necessary to leave this commented out message in the code?

>  	return 1;
>  }
>  
> @@ -544,7 +542,8 @@ static int das08_counter_write(struct comedi_device *dev,
>  {
>  	int chan = insn->chanspec;
>  
> -	/* printk("Writing counter channel %d with 0x%04X\n",chan,data[0]); */
> +	/* dev_dbg(dev->class_dev, "Writing counter channel %d with 0x%04X\n",
> +	           chan,data[0]); */

Same with this one.

>  	i8254_write_channel(&devpriv->i8254, chan, data[0]);
>  
>  	return 1;
> @@ -839,10 +838,10 @@ int das08_common_attach(struct comedi_device *dev, unsigned long iobase)
>  	case isa:
>  	case pc104:
>  		/*  allocate ioports for ISA (and PC/104) boards */
> -		printk(KERN_INFO " iobase 0x%lx\n", iobase);
> +		dev_info(dev->class_dev, "iobase 0x%lx\n", iobase);
>  		if (!request_region(iobase, thisboard->iosize,
>  				    dev->driver->driver_name)) {
> -			printk(KERN_ERR " I/O port conflict\n");
> +			dev_err(dev->class_dev "I/O port conflict\n");

Missing a comma after class_dev.

>  			return -EIO;
>  		}
>  		break;

Regards,
Hartley

_______________________________________________
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