From: Joe Perches <joe@perches.com>
To: Yousof El-Sayed <yousof.el-sayed@elastichosts.com>,
gregkh@linuxfoundation.org, mateusz.kulikowski@gmail.com,
gdhanapa@visteon.com, amitoj1606@gmail.com
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Staging: rtl8192e: fix line length coding style issue in rtllib_softmac.c
Date: Fri, 18 Mar 2016 11:04:02 -0700 [thread overview]
Message-ID: <1458324242.26915.19.camel@perches.com> (raw)
In-Reply-To: <20160318174801.GA15191@Work-Laptop>
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.
next prev parent reply other threads:[~2016-03-18 18:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-18 17:48 [PATCH] Staging: rtl8192e: fix line length coding style issue in rtllib_softmac.c Yousof El-Sayed
2016-03-18 18:04 ` Joe Perches [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-03-18 10:54 Yousof El-Sayed
2016-03-18 17:31 ` Greg KH
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=1458324242.26915.19.camel@perches.com \
--to=joe@perches.com \
--cc=amitoj1606@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gdhanapa@visteon.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mateusz.kulikowski@gmail.com \
--cc=yousof.el-sayed@elastichosts.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