[PATCH 05/42] staging: unisys: visorinput: visorinput.c: Adjust whitespace usage
Dan Carpenter
dan.carpenter at oracle.com
Tue Jul 18 08:33:51 UTC 2017
> @@ -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
More information about the devel
mailing list