[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1458324242.26915.19.camel@perches.com>
Date: Fri, 18 Mar 2016 11:04:02 -0700
From: Joe Perches <joe@...ches.com>
To: Yousof El-Sayed <yousof.el-sayed@...stichosts.com>,
gregkh@...uxfoundation.org, mateusz.kulikowski@...il.com,
gdhanapa@...teon.com, amitoj1606@...il.com
Cc: devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Staging: rtl8192e: fix line length coding style issue
in rtllib_softmac.c
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.
Powered by blists - more mailing lists