Re: [PATCH] Staging: comedi: mpc82860: fixed a brace coding style issue

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

 



I dropped "linuc-kernel@xxxxxxxxxxxxxxx" from the CC list because
of the typo.

On Sat, May 26, 2012 at 11:16:54AM -0400, Michael Dabydeen wrote:
> Fixed a coding style issue
> 

You actually changed 3 things but only describe one.

> Signed-off-by: Michael Dabydeen<mdabydeen@xxxxxxxxx>
> ---

You didn't compile this.  It turns out that it doesn't build, but
you should have written that it doesn't compile here below the "---"
line. 

>  drivers/staging/comedi/drivers/mpc8260cpm.c |    8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/staging/comedi/drivers/mpc8260cpm.c b/drivers/staging/comedi/drivers/mpc8260cpm.c
> index 364470e..6d291b7 100644
> --- a/drivers/staging/comedi/drivers/mpc8260cpm.c
> +++ b/drivers/staging/comedi/drivers/mpc8260cpm.c
> @@ -36,7 +36,7 @@ It is apparently missing some code.
>  
>  #include "../comedidev.h"
>  
> -extern unsigned long mpc8260_dio_reserved[4];
> +unsigned long mpc8260_dio_reserved[4];

Why would you do this?

It would have broken the build if mpc8260_dio_reserved were used.
Feel free to delete it.

>  
>  struct mpc8260cpm_private {
>  
> @@ -71,10 +71,8 @@ static int mpc8260cpm_dio_config(struct comedi_device *dev,
>  
>  	port = (int)s->private;
>  	mask = 1 << CR_CHAN(insn->chanspec);
> -	if (mask & cpm_reserved_bits[port]) {
> +	if (mask & cpm_reserved_bits[port])
>  		return -EINVAL;
> -	}
> -

Don't remove the extra blank line.  The blank line was nice.

>  	switch (data[0]) {
>  	case INSN_CONFIG_DIO_OUTPUT:
>  		s->io_bits |= mask;
> @@ -122,7 +120,7 @@ static int mpc8260cpm_attach(struct comedi_device *dev,
>  	struct comedi_subdevice *s;
>  	int i;
>  
> -	printk("comedi%d: mpc8260cpm: ", dev->minor);
> +	printk(KERN_ERROR , "comedi%d: mpc8260cpm: ", dev->minor);

KERN_ERROR is the wrong thing here.  KERN_INFO is correct.  The
comma breaks the build.  Best to use dev_info() anyway.

regards,
dan carpenter


_______________________________________________
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