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]
Message-ID: <20210402125127.GB1420@agape.jhs>
Date:   Fri, 2 Apr 2021 14:51:28 +0200
From:   Fabio Aiuto <fabioaiuto83@...il.com>
To:     Joe Perches <joe@...ches.com>
Cc:     gregkh@...uxfoundation.org, dan.carpenter@...cle.com,
        linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 14/16] staging: rtl8723bs: remove all RT_TRACE logs in
 core/rtw_wlan_util.c

On Fri, Apr 02, 2021 at 03:37:57AM -0700, Joe Perches wrote:
> On Fri, 2021-04-02 at 12:01 +0200, Fabio Aiuto wrote:
> > remove all RT_TRACE logs
> > 
> > fix patch-related checkpatch issues
> > 
> > Signed-off-by: Fabio Aiuto <fabioaiuto83@...il.com>
> > ---
> >  .../staging/rtl8723bs/core/rtw_wlan_util.c    | 26 +++++--------------
> >  1 file changed, 6 insertions(+), 20 deletions(-)
> > 
> > diff --git a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c
> []
> > @@ -1382,25 +1374,19 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pframe, u32 packet_len)
> >  	if (encryp_protocol == ENCRYP_PROTOCOL_WPA || encryp_protocol == ENCRYP_PROTOCOL_WPA2) {
> >  		pbuf = rtw_get_wpa_ie(&bssid->IEs[12], &wpa_ielen, bssid->IELength-12);
> >  		if (pbuf && (wpa_ielen > 0)) {
> > -			if (_SUCCESS == rtw_parse_wpa_ie(pbuf, wpa_ielen+2, &group_cipher, &pairwise_cipher, &is_8021x)) {
> > -				RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_,
> > -						("%s pnetwork->pairwise_cipher: %d, group_cipher is %d, is_8021x is %d\n", __func__,
> > -						 pairwise_cipher, group_cipher, is_8021x));
> > -			}
> > +			if (rtw_parse_wpa_ie(pbuf, wpa_ielen + 2, &group_cipher,
> > +					     &pairwise_cipher, &is_8021x) == _SUCCESS)
> > +				;
> 
> 		This sort of if is a bit silly.
> 		Better would be to remove the test and just use:
> 
> 			rtw_parse_wpa_ie(pbuf, wpa_ielen + 2, &group_cipher,
> 					 &pairwise_cipher, &is_8021x);
> 
> >  		} else {
> >  			pbuf = rtw_get_wpa2_ie(&bssid->IEs[12], &wpa_ielen, bssid->IELength-12);
> >  
> > 
> >  			if (pbuf && (wpa_ielen > 0)) {
> > -				if (_SUCCESS == rtw_parse_wpa2_ie(pbuf, wpa_ielen+2, &group_cipher, &pairwise_cipher, &is_8021x)) {
> > -					RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_,
> > -							("%s pnetwork->pairwise_cipher: %d, pnetwork->group_cipher is %d, is_802x is %d\n",
> > -							 __func__, pairwise_cipher, group_cipher, is_8021x));
> > -				}
> > +				if (rtw_parse_wpa2_ie(pbuf, wpa_ielen + 2, &group_cipher,
> > +						      &pairwise_cipher, &is_8021x) == _SUCCESS)
> > +					;
> 
> 				rtw_parse_wpa2_ie(pbuf, wpa_ielen + 2, &group_cipher,
> 						  &pairwise_cipher, &is_8021x);
> 
> etc...
> 
> Lastly, another suggestion would be to just submit a single patch
> removing _ALL_ the RT_TRACE uses not intermixing various other cleanups
> with the series and then do those other cleanups.
> 
> Using a coccinelle script like:
> 
> $ cat RT_TRACE.cocci
> @@
> expression a, b, c;
> @@
> 
> -	RT_TRACE(a, b, (c));
> 
> $ spatch -sp-file RT_TRACE.cocci drivers/staging/rtl8723bs/
> 
> And then clean up the various bits you think are inappropriately done.
> 
> 

thank you Joe, I tried with (RT_TRACE.cocci in parent folder)

user@...t:~/src/git/kernels/staging$ spatch -sp-file ../RT_TRACE.cocci drivers/staging/rtl8723bs/
init_defs_builtins: /usr/local/bin/../lib/coccinelle/standard.h
0 files match

i don't know what's wrong... I run on a Debian Buster

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ