RE: [PATCH 7/9] staging: comedi: das08: Remove thisboard and devpriv macros

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

 



On Wednesday, May 23, 2012 9:50 AM, Ian Abbott wrote:
> The 'thisboard' and 'devpriv' macros rely on a local variable having a
> specific name and yield pointers derived from that local variable.
> Replace the macros with local variables wherever they occur.
>
> Signed-off-by: Ian Abbott <abbotti@xxxxxxxxx>
> ---

<snip>

> @@ -379,6 +381,7 @@ static int das08jr_ao_winsn(struct comedi_device *dev,
>  	int n;
>  	int lsb, msb;
>  	int chan;
> +	struct das08_private_struct *devpriv = dev->private;

The devpriv variable is only referenced in the #if 0'ed out part of this
function. As this is right now you will get a "warning: unused variable ..."
during the compile.
 
> @@ -416,6 +419,7 @@ static int das08ao_ao_winsn(struct comedi_device *dev,
>  	int n;
>  	int lsb, msb;
>  	int chan;
> +	struct das08_private_struct *devpriv = dev->private;

Same here.

Also, minor nit, ignore it you wish... ;-)

Could you move all the devpriv and thisboard lines before the other
uninitalized local variables? Putting them after makes my head hurt.

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