Messages in this thread | | | Date | Thu, 19 Dec 2013 19:31:37 +0300 | From | Dan Carpenter <> | Subject | Re: [PATCH 1/2] vt6656: Make checkpatch happier |
| |
On Thu, Dec 19, 2013 at 04:27:05PM +0100, Sebastian Rachuj wrote: > From: Simon Schuster <linux@rationality.eu> > > 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@studium.uni-erlangen.de> > Signed-off-by: Simon Schuster <linux@rationality.eu> > ---
> + 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
| |