Re: [PATCH 1/2] drivers/staging/nvec/nvec_kbd.c: Fix checkpatch warnings

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

 



Hi Marcos,

thanks for checking. I posted an updated version back in August which has most
coding style stuff fixed (see: http://www.spinics.net/lists/linux-driver-
devel/msg17501.html).

We will send a huge update for inclusion to kernel 3.3 in the near future. After 
that you may check again if you can still find such warnings.

Thanks 

Marc

P.S. please cc me next time ;-)

> Was fixed some checkpatch warning, like spaces before if statements and
> others.
> 
> Signed-off-by: Marcos Paulo de Souza <marcos.mage@xxxxxxxxx>
> ---
>  drivers/staging/nvec/nvec_kbd.c |   22 +++++++++++-----------
>  1 files changed, 11 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/staging/nvec/nvec_kbd.c
> b/drivers/staging/nvec/nvec_kbd.c index 9a98507..04bd285 100644
> --- a/drivers/staging/nvec/nvec_kbd.c
> +++ b/drivers/staging/nvec/nvec_kbd.c
> @@ -4,7 +4,7 @@
>  #include "nvec-keytable.h"
>  #include "nvec.h"
> 
> -#define ACK_KBD_EVENT {'\x05','\xed','\x01'}
> +#define ACK_KBD_EVENT {'\x05', '\xed', '\x01'}
> 
>  static unsigned char keycodes[ARRAY_SIZE(code_tab_102us)
>  			+ ARRAY_SIZE(extcode_tab_us102)];
> @@ -27,10 +27,10 @@ static int nvec_keys_notifier(struct notifier_block
> *nb, nvec_size _size = (msg[0] & (3 << 5)) >> 5;
> 
>  /* power on/off button */
> -		if(_size == NVEC_VAR_SIZE)
> +		if (_size == NVEC_VAR_SIZE)
>  			return NOTIFY_STOP;
> 
> -		if(_size == NVEC_3BYTES)
> +		if (_size == NVEC_3BYTES)
>  			msg++;
> 
>  		code = msg[1] & 0x7f;
> @@ -51,13 +51,13 @@ static int nvec_kbd_event(struct input_dev *dev,
> unsigned int type, unsigned char buf[] = ACK_KBD_EVENT;
>  	struct nvec_chip *nvec = keys_dev.nvec;
> 
> -	if(type==EV_REP)
> +	if (type == EV_REP)
>  		return 0;
> 
> -	if(type!=EV_LED)
> +	if (type != EV_LED)
>  		return -1;
> 
> -	if(code!=LED_CAPSL)
> +	if (code != LED_CAPSL)
>  		return -1;
> 
>  	buf[2] = !!value;
> @@ -73,11 +73,11 @@ int __init nvec_kbd_init(struct nvec_chip *nvec)
> 
>  	j = 0;
> 
> -	for(i = 0; i < ARRAY_SIZE(code_tab_102us); ++i)
> +	for (i = 0; i < ARRAY_SIZE(code_tab_102us); ++i)
>  		keycodes[j++] = code_tab_102us[i];
> 
> -	for(i = 0; i < ARRAY_SIZE(extcode_tab_us102); ++i)
> -		keycodes[j++]=extcode_tab_us102[i];
> +	for (i = 0; i < ARRAY_SIZE(extcode_tab_us102); ++i)
> +		keycodes[j++] = extcode_tab_us102[i];
> 
>  	idev = input_allocate_device();
>  	idev->name = "Tegra nvec keyboard";
> @@ -89,12 +89,12 @@ int __init nvec_kbd_init(struct nvec_chip *nvec)
>  	idev->keycodesize = sizeof(unsigned char);
>  	idev->keycodemax = ARRAY_SIZE(keycodes);
> 
> -	for( i = 0; i < ARRAY_SIZE(keycodes); ++i)
> +	for (i = 0; i < ARRAY_SIZE(keycodes); ++i)
>  		set_bit(keycodes[i], idev->keybit);
> 
>  	clear_bit(0, idev->keybit);
>  	err = input_register_device(idev);
> -	if(err)
> +	if (err)
>  		goto fail;
> 
>  	keys_dev.input = idev;
-- 
Dipl. Phys. Marc Dietrich
Institut für Angewandte Physik
- AG Kleinkühler -
Justus-Liebig-Universität Gießen
Heinrich-Buff-Ring 16
D-35392 Gießen
Germany

Tel. +49 641 99 33462
Fax. +49 641 99 33409
email: marc.dietrich@xxxxxxxxxxxxxxxxxxxxxxxx
www: http://www.uni-giessen.de/cms/iap/
_______________________________________________
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