From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752957AbcCRSEJ (ORCPT ); Fri, 18 Mar 2016 14:04:09 -0400 Received: from smtprelay0082.hostedemail.com ([216.40.44.82]:35625 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751030AbcCRSEH (ORCPT ); Fri, 18 Mar 2016 14:04:07 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::,RULES_HIT:41:355:379:541:599:968:973:982:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3871:3872:3874:4250:4321:5007:6261:7903:10004:10400:10848:11026:11232:11658:11783:11914:12043:12048:12296:12517:12519:12740:13069:13255:13311:13357:13439:13894:14659:14721:21080:30012:30029:30030:30054:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: mask52_238732cf81c22 X-Filterd-Recvd-Size: 2560 Message-ID: <1458324242.26915.19.camel@perches.com> Subject: Re: [PATCH] Staging: rtl8192e: fix line length coding style issue in rtllib_softmac.c From: Joe Perches To: Yousof El-Sayed , gregkh@linuxfoundation.org, mateusz.kulikowski@gmail.com, gdhanapa@visteon.com, amitoj1606@gmail.com Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Date: Fri, 18 Mar 2016 11:04:02 -0700 In-Reply-To: <20160318174801.GA15191@Work-Laptop> References: <20160318174801.GA15191@Work-Laptop> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1-1ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2016-03-18 at 17:48 +0000, Yousof El-Sayed wrote: > This is a patch to the rtllib_softmac.c file that fixes up all instances of >  the 'line over 80 characters' warnings found by the checkpatch.pl tool. [] > diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c [] > @@ -389,7 +389,8 @@ static void rtllib_send_beacon(struct rtllib_device *ieee) >   >   if (ieee->beacon_txing && ieee->ieee_up) >   mod_timer(&ieee->beacon_timer, jiffies + > -   (msecs_to_jiffies(ieee->current_network.beacon_interval - 5))); > +   (msecs_to_jiffies > +    (ieee->current_network.beacon_interval - 5))); Long identifier names like "current_network.beacon_interval", which is 31 chars long, make the 80 column limit somewhat silly. It's OK to ignore checkpatch warnings when changing the code is less readable. Most all of these are less nice than the original. For instance, if this were to be changed (and it doesn't need to be) perhaps: >   if (ieee->beacon_txing && ieee->ieee_up) >   mod_timer(&ieee->beacon_timer, jiffies + > -   (msecs_to_jiffies(ieee->current_network.beacon_interval - 5))); > +   (msecs_to_jiffies > +    (ieee->current_network.beacon_interval - 5))); mod_timer(&ieee->beacon_timer, jiffies + msecs_to_jiffies(ieee->current_network.beacon_interval - 5)); which is still > 80 columns, but it removes an unnecessary set of parentheses. Breaking the msecs_to_jiffies() at the function name is otherwise rather unsightly. Always strive for readability and clarity over serving some mindless script.