From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751511AbdJ2RWy (ORCPT ); Sun, 29 Oct 2017 13:22:54 -0400 Received: from mail-io0-f196.google.com ([209.85.223.196]:46571 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751366AbdJ2RWx (ORCPT ); Sun, 29 Oct 2017 13:22:53 -0400 X-Google-Smtp-Source: ABhQp+T0oa09oHL7m8djNXE5XK3iIgZEy3Qva5gmdwoaLf0b1W5AkGAmYQcJhKv321gA22ROSZZFKQ== Message-ID: <1509297766.4894.14.camel@gmail.com> Subject: Re: [PATCH] Fix line too long warning From: Kien Ha To: Yury Norov Cc: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org Date: Sun, 29 Oct 2017 13:22:46 -0400 In-Reply-To: <20171029155409.5pntisfklykssda4@yury-thinkpad> References: <1509245173.3669.5.camel@gmail.com> <20171029155409.5pntisfklykssda4@yury-thinkpad> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2017-10-29 at 18:54 +0300, Yury Norov wrote: > 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 > > Date: Fri, 27 Oct 2017 14:07:55 -0400 > > Subject: [PATCH] Fix line too long warning > > > > Signed-off-by: Kien Ha > > --- > > 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_RAT > > E11M]; > > 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 Thank you for taking some of your time to review my patch, providing valuable feedback and pointing me in the right direction Joe and Yury. I submitted another patch with improved code based on your suggestions.