RE: [PATCH 5/9] staging: comedi: das08: Remove forward function declarations.

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

 



On Wednesday, May 23, 2012 9:50 AM, Ian Abbott wrote:
> 
> Moved some functions to avoid forward declarations.  Moved a few other
> bits at the same time to keep EXPORT_SYMBOL{,_GPL}() close to the symbol
> being exported, and PCI table close to the code that refers to it.
>
> Signed-off-by: Ian Abbott <abbotti@xxxxxxxxx>
> ---

Something strange going on here...

<snip>

> -#define devpriv ((struct das08_private_struct *)dev->private)
> -#define thisboard ((const struct das08_board_struct *)dev->board_ptr)
> +#define devpriv ((struct das08_private_struct *)dev->private)
> +#define thisboard ((const struct das08_board_struct *)dev->board_ptr)

Starting from here there are changes in the patch that don't
actually change anything. Then the patch finally gets back in
sync.  The patch actually works it just has more changes in it
that are necessary for some reason.

<snip>

> +#ifdef DO_COMEDI_DRIVER_REGISTER
> +static const struct das08_board_struct das08_boards[] = {
> +#if IS_ENABLED(CONFIG_COMEDI_DAS08_ISA)
> +	{
> +	 .name = "isa-das08",	/*  cio-das08.pdf */
> +	 .bustype = isa,
> +	 .ai = das08_ai_rinsn,
> +	 .ai_nbits = 12,
> +	 .ai_pg = das08_pg_none,
> +	 .ai_encoding = das08_encode12,
> +	 .ao = NULL,
> +	 .ao_nbits = 12,
> +	 .di = das08_di_rbits,
> +	 .do_ = das08_do_wbits,
> +	 .do_nchan = 4,
> +	 .i8255_offset = 8,
> +	 .i8254_offset = 4,
> +	 .iosize = 16,		/*  unchecked */
> +	 },

Since your already moving this block, you might want to tab
align it. It makes the code a bit easier to read.

	{
		.name		= "isa-das08",	/*  cio-das08.pdf */
		.bustype	= isa,
		.ai		= das08_ai_rinsn,

Etc.

Similar with the other struct's you are moving.

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