Re: [PATCH 1/2] vt6656: Make checkpatch happier

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

 



On Thu, Dec 19, 2013 at 04:27:05PM +0100, Sebastian Rachuj wrote:
> From: Simon Schuster <linux@xxxxxxxxxxxxxx>
> 
> This patch reformats bssdb.c of the vt6656 driver (in staging) to
> conform to the linux coding guidelines.
> 
> The indentation is adjusted to use tabs, the argument lists and
> conditions are aligned to reduce line lengths and preserve
> readability. Curly braces around one-line blocks are removed and
> the C99-style comments are converted to C89-style ones. Previously
> commented code is removed.
> 

Too many changes at once.  This is like an automatic rejection before I
even read the patch.  Sorry.  Each item in this list should be a
separate patch.

> Unfortunately these measures do not satisfy checkpatch completely
> since the code contains too many nested blocks which do not allow to
> keep the lines below 80 characters. Nevertheless the file should be
> more readable after applying this patch.
> 
> Signed-off-by: Sebastian Rachuj <sebastian.rachuj@xxxxxxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Simon Schuster <linux@xxxxxxxxxxxxxx>
> ---


> +		if ((!is_broadcast_ether_addr(pbyDesireBSSID))
> +		    && (memcmp(pbyDesireBSSID, ZeroBSSID, 6) != 0))

In the original it was written like this:

		if ((!is_broadcast_ether_addr(pbyDesireBSSID)) &&
		    (memcmp(pbyDesireBSSID, ZeroBSSID, 6) != 0))

That's actually better kernel style to do it that way.  (The original
didn't actually look exactly like I said, it looked like garbage, but
you understand what I mean about the position of the "&&" characters.)

Btw, really it should be:

		if (is_valid_ether_addr(pbyDesireBSSID))

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