lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 30 Oct 2014 15:49:14 +0100
From:	Jes Sorensen <Jes.Sorensen@...hat.com>
To:	"Sharma\, Sanjeev" <Sanjeev_Sharma@...tor.com>
Cc:	"Larry.Finger\@lwfinger.net" <Larry.Finger@...inger.net>,
	"gregkh\@linuxfoundation.org" <gregkh@...uxfoundation.org>,
	"linux-wireless\@vger.kernel.org" <linux-wireless@...r.kernel.org>,
	"devel\@driverdev.osuosl.org" <devel@...verdev.osuosl.org>,
	"linux-kernel\@vger.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] staging:rtl8723au: core: Fix error reported by checkpatch.

"Sharma, Sanjeev" <Sanjeev_Sharma@...tor.com> writes:
> -----Original Message-----
> From: Jes Sorensen [mailto:Jes.Sorensen@...hat.com] 
> Sent: Monday, October 27, 2014 2:13 PM
> To: Sharma, Sanjeev
> Cc: Larry.Finger@...inger.net; gregkh@...uxfoundation.org;
> linux-wireless@...r.kernel.org; devel@...verdev.osuosl.org;
> linux-kernel@...r.kernel.org
> Subject: Re: [PATCH] staging:rtl8723au: core: Fix error reported by checkpatch.
>
> Sanjeev Sharma <sanjeev_sharma@...tor.com> writes:
>> This is a patch to the rtw_cmd.c file that fixes Error reported by 
>> checkpatch.
>>
>> Signed-off-by: Sanjeev Sharma <Sanjeev_Sharma@...tor.com>
>> ---
>>  drivers/staging/rtl8723au/core/rtw_cmd.c | 83 
>> +++++++++++++++-----------------
>>  1 file changed, 40 insertions(+), 43 deletions(-)
>>
>> diff --git a/drivers/staging/rtl8723au/core/rtw_cmd.c 
>> b/drivers/staging/rtl8723au/core/rtw_cmd.c
>> index 4eaa502..c1f6254 100644
>> --- a/drivers/staging/rtl8723au/core/rtw_cmd.c
>> +++ b/drivers/staging/rtl8723au/core/rtw_cmd.c
>> @@ -957,7 +957,7 @@ static void traffic_status_watchdog(struct rtw_adapter *padapter)
>>  		/*  check traffic for  powersaving. */
>>  			if (((pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod +
>>  			      pmlmepriv->LinkDetectInfo.NumTxOkInPeriod) > 8) ||
>> -			    pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod >2)
>> +			    pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod > 2)
>>  				bEnterPS = false;
>>  			else
>>  				bEnterPS = true;
>
> This makes the line longer than 80 characters, that is worse than the 'problem' you are fixing.
>
> Jes
>
> Hello jes,
>
> How it can be worse because checkpatch treating this as an Error and
> line longer than 80 character is warning reported by checkpatch and I
> could see that in entire staging directory, 
> every maintainer most of the time ignore the 80 column limit and give
> priority to Error. 
>
> Please let me know your comment .
>
> Sanjeev Sharma 

checkpatch has it's ideas, doesn't mean it's blindly right at all
times. In this particular case it keeps the code more readable to keep
it below 80 characters than it does to add those two blanks and make the
line longer.

I agree the long variable names are nasty, and it doesn't help they were
done in StUdLyCaPs. If you want to attack it from that front, please go
ahead.

However, on formatting, please respond with proper email using proper
quoting when replying.

Thanks,
Jes
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ