linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Claudiu Beznea <claudiu.beznea@gmail.com>
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Staging: wlan-ng: improved code in p80211req.c file
Date: Sun, 21 Aug 2016 17:35:35 +0200	[thread overview]
Message-ID: <20160821153535.GC31704@kroah.com> (raw)
In-Reply-To: <1471706400-13264-1-git-send-email-claudiu.beznea@gmail.com>

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@gmail.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

      reply	other threads:[~2016-08-21 21:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-20 15:20 [PATCH] Staging: wlan-ng: improved code in p80211req.c file Claudiu Beznea
2016-08-21 15:35 ` Greg KH [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160821153535.GC31704@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=claudiu.beznea@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).