Re: [PATCH 05/42] staging: unisys: visorinput: visorinput.c: Adjust whitespace usage

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

 



> @@ -324,11 +322,10 @@ setup_client_keyboard(void *devdata,  /* opaque on purpose */
>  static struct input_dev *
>  setup_client_mouse(void *devdata /* opaque on purpose */)
>  {
> -	struct input_dev *visorinput_dev = NULL;
>  	int xres, yres;
>  	struct fb_info *fb0;
> +	struct input_dev *visorinput_dev = input_allocate_device();
>  
> -	visorinput_dev = input_allocate_device();
>  	if (!visorinput_dev)
>  		return NULL;
>  

So far these patches are pretty annoying.  You seem to be using
Christmas tree ordering:

short
medium
loooooong

Instead of reverse Christmas tree:

loooooong
medium
short

Nobody else does that...  People either use reverse Christmas tree or
they don't care.  Also putting alloc functions in the declarations is a
common source of bugs.  Empirically, from reviewing thousands of static
checker bugs, I can say that declarations get reviewed worse than normal
code.

regards,
dan carpenter

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-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