mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yury Norov <ynorov@caviumnetworks.com>
To: Kien Ha <kienha9922@gmail.com>
Cc: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org,
	Yury Norov <ynorov@caviumnetworks.com>
Subject: Re: [PATCH] Fix line too long warning
Date: Sun, 29 Oct 2017 18:54:09 +0300	[thread overview]
Message-ID: <20171029155409.5pntisfklykssda4@yury-thinkpad> (raw)
In-Reply-To: <1509245173.3669.5.camel@gmail.com>

Hi Kien,

On Sat, Oct 28, 2017 at 10:46:13PM -0400, Kien Ha wrote:
> >From fc52a98aca0c033f2c03fdc7e8f83ae49625675a Mon Sep 17 00:00:00 2001
> From: Kien Ha <kienha9922@gmail.com>
> Date: Fri, 27 Oct 2017 14:07:55 -0400
> Subject: [PATCH] Fix line too long warning
> 
> Signed-off-by: Kien Ha <kienha9922@gmail.com>
> ---
>  drivers/staging/rtlwifi/base.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/rtlwifi/base.c b/drivers/staging/rtlwifi/base.c
> index b88b0e8edd3d..bbc80f976e12 100644
> --- a/drivers/staging/rtlwifi/base.c
> +++ b/drivers/staging/rtlwifi/base.c
> @@ -1283,7 +1283,8 @@ void rtl_get_tcb_desc(struct ieee80211_hw *hw,
>  				} else {
>  					if (rtlmac->mode == WIRELESS_MODE_B) {
>  						tcb_desc->hw_rate =
> -						    rtlpriv->cfg->maps[RTL_RC_CCK_RATE11M];
> +						    rtlpriv->cfg->maps[
> +						    RTL_RC_CCK_RATE11M];

At first, if you fix this, you should also fix similar problem 3 lines
below, right?

>  					} else {
>  						tcb_desc->hw_rate =
>  						    rtlpriv->cfg->maps[RTL_RC_OFDM_RATE54M];

At second, and most important, refer Documentation/process/coding-style.rst:
Now, some people will claim that having 8-character indentations makes
the code move too far to the right, and makes it hard to read on a 
80-character terminal screen.  The answer to that is that if you need 
more than 3 levels of indentation, you're screwed anyway, and should fix
your program.

The real problem here is not "line too long", but "indentation level too
big" - 5. And it worth to address real problem.

Yury

  parent reply	other threads:[~2017-10-29 15:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-29  2:46 Kien Ha
2017-10-29 15:19 ` Joe Perches
2017-10-29 15:54 ` Yury Norov [this message]
2017-10-29 16:29   ` Yury Norov
2017-10-29 17:22   ` Kien Ha
2017-10-29 17:28   ` Joe Perches
2017-10-29 18:34     ` Yury Norov

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=20171029155409.5pntisfklykssda4@yury-thinkpad \
    --to=ynorov@caviumnetworks.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=kienha9922@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®