Re: [PATCH 1/2] vt6656: Make checkpatch happier
From: Dan Carpenter
Date: Thu Dec 19 2013 - 11:32:14 EST
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/