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] [day] [month] [year] [list]
Date:	Sat, 27 Dec 2014 09:26:47 -0800
From:	Joe Perches <joe@...ches.com>
To:	Matthew Emerson <emersonmde@...il.com>
Cc:	gregkh@...uxfoundation.org, Jes.Sorensen@...hat.com,
	linux-wireless@...r.kernel.org, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: rtl8723au: Fixed multiple space issues

On Sat, 2014-12-27 at 03:42 -0500, Matthew Emerson wrote:
> Fixed multiple space issues found by checkpatch.pl in
> drivers/staging/rtl8723au/core/rtw_ap.c

Hello.

Please strive for more than simple robotic like
adherence to checkpatch messages.

A lot of the time, there is a better way.

> diff --git a/drivers/staging/rtl8723au/core/rtw_ap.c b/drivers/staging/rtl8723au/core/rtw_ap.c
[]
> @@ -897,7 +897,7 @@ int rtw_check_beacon_data23a(struct rtw_adapter *padapter,
>  	pairwise_cipher = 0;
>  	psecuritypriv->wpa_group_cipher = 0;
>  	psecuritypriv->wpa_pairwise_cipher = 0;
> -	for (p = ie; ;p += (ie_len + 2)) {
> +	for (p = ie; ; p += (ie_len + 2)) {

While it's arguably true that the ; is misplaced,
the loop control logic is probably better rewritten
for clarity here instead.

[]

> @@ -1871,7 +1871,7 @@ void stop_ap_mode23a(struct rtw_adapter *padapter)
>  	pmlmeext->bstart_bss = false;
>  
>  	/* reset and init security priv , this can refine with rtw_reset_securitypriv23a */
> -	memset((unsigned char *)&padapter->securitypriv, 0, sizeof (struct security_priv));
> +	memset((unsigned char *)&padapter->securitypriv, 0, sizeof(struct security_priv));

unnecessary cast too.

More likely this style would be nicer:

	memset(&adapter->securitypriv, 0, sizeof(adapter->securitypriv));

You could also use a compound literal.


--
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