mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Sebastian Rachuj <sebastian.rachuj@studium.uni-erlangen.de>
Cc: linux@rationality.eu, devel@driverdev.osuosl.org,
	linux-kernel@i4.cs.fau.de, tvboxspy@gmail.com,
	gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
	forest@alittletooquiet.net, more.andres@gmail.com
Subject: Re: [PATCH 1/2] vt6656: Make checkpatch happier
Date: Thu, 19 Dec 2013 19:31:37 +0300	[thread overview]
Message-ID: <20131219163136.GJ28413@mwanda> (raw)
In-Reply-To: <1387466826-2410-2-git-send-email-sebastian.rachuj@studium.uni-erlangen.de>

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

  reply	other threads:[~2013-12-19 16:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-19 15:27 [PATCH 0/2] vt6656: Cleanup of checkpatch problems in bssdb.c Sebastian Rachuj
2013-12-19 15:27 ` [PATCH 1/2] vt6656: Make checkpatch happier Sebastian Rachuj
2013-12-19 16:31   ` Dan Carpenter [this message]
2013-12-19 15:27 ` [PATCH 2/2] vt6656: Combined nested conditions Sebastian Rachuj

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131219163136.GJ28413@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=forest@alittletooquiet.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@i4.cs.fau.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rationality.eu \
    --cc=more.andres@gmail.com \
    --cc=sebastian.rachuj@studium.uni-erlangen.de \
    --cc=tvboxspy@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome