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

H Hartley Sweeten hartleys at visionengravers.com
Wed May 23 17:48:20 UTC 2012


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 at mev.co.uk>
> ---

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




More information about the devel mailing list