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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sun, 21 Aug 2016 17:35:35 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Claudiu Beznea <claudiu.beznea@...il.com>
Cc:     devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Staging: wlan-ng: improved code in p80211req.c file

On Sat, Aug 20, 2016 at 06:20:00PM +0300, Claudiu Beznea wrote:
> This patch improves code from p80211req.c file by removing
> duplicate code, by keeping count of returning code of
> the called functions and also aesthetically.
> 
> Signed-off-by: Claudiu Beznea <claudiu.beznea@...il.com>
> ---
>  drivers/staging/wlan-ng/p80211req.c | 163 +++++++++++++++++++-----------------
>  1 file changed, 84 insertions(+), 79 deletions(-)
> 
> diff --git a/drivers/staging/wlan-ng/p80211req.c b/drivers/staging/wlan-ng/p80211req.c
> index 4b84b56..900635e 100644
> --- a/drivers/staging/wlan-ng/p80211req.c
> +++ b/drivers/staging/wlan-ng/p80211req.c
> @@ -72,10 +72,12 @@
>  #include "p80211metastruct.h"
>  #include "p80211req.h"
>  
> -static void p80211req_handlemsg(wlandevice_t *wlandev, struct p80211msg *msg);
> -static void p80211req_mibset_mibget(wlandevice_t *wlandev,
> +static int p80211req_handlemsg(wlandevice_t *wlandev, struct p80211msg *msg);
> +static int p80211req_mibset_mibget(wlandevice_t *wlandev,
>  				   struct p80211msg_dot11req_mibget *mib_msg,
>  				   int isget);
> +static void p80211req_handle_action(struct wlandevice *wlandev, u32 *data,
> +				    int isget, u32 flag);
>  
>  /*----------------------------------------------------------------
>  * p80211req_dorequest
> @@ -96,6 +98,7 @@ static void p80211req_mibset_mibget(wlandevice_t *wlandev,
>  int p80211req_dorequest(wlandevice_t *wlandev, u8 *msgbuf)
>  {
>  	struct p80211msg *msg = (struct p80211msg *) msgbuf;
> +	int rc = 0;
>  
>  	/* Check to make sure the MSD is running */
>  	if (!((wlandev->msdstate == WLAN_MSD_HWPRESENT &&
> @@ -107,7 +110,7 @@ int p80211req_dorequest(wlandevice_t *wlandev, u8 *msgbuf)
>  
>  	/* Check Permissions */
>  	if (!capable(CAP_NET_ADMIN) &&
> -	(msg->msgcode != DIDmsg_dot11req_mibget)) {
> +	    (msg->msgcode != DIDmsg_dot11req_mibget)) {
>  		netdev_err(wlandev->netdev,

This is a fine change, but you are trying to do too many different
things in this patch.

Remember, only do one type of thing per patch please.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ