All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Julia Lawall <julia@diku.dk>
Cc: kernel-janitors@vger.kernel.org,
	"John W. Linville" <linville@tuxdriver.com>,
	"David S. Miller" <davem@davemloft.net>,
	linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] net/wireless/nl80211.c: Avoid call to
Date: Fri, 28 Jan 2011 14:01:07 +0000	[thread overview]
Message-ID: <1296223267.5118.7.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <1296224232-8115-1-git-send-email-julia@diku.dk>

On Fri, 2011-01-28 at 15:17 +0100, Julia Lawall wrote:

> diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
> index 9b62710..864ddfb 100644
> --- a/net/wireless/nl80211.c
> +++ b/net/wireless/nl80211.c
> @@ -2718,7 +2718,7 @@ static int nl80211_get_mesh_config(struct sk_buff *skb,
>  	hdr = nl80211hdr_put(msg, info->snd_pid, info->snd_seq, 0,
>  			     NL80211_CMD_GET_MESH_CONFIG);
>  	if (!hdr)
> -		goto nla_put_failure;
> +		goto out;


> @@ -2954,7 +2955,7 @@ static int nl80211_get_reg(struct sk_buff *skb, struct genl_info *info)
>  	hdr = nl80211hdr_put(msg, info->snd_pid, info->snd_seq, 0,
>  			     NL80211_CMD_GET_REG);
>  	if (!hdr)
> -		goto nla_put_failure;
> +		goto put_failure;
>  
>  	NLA_PUT_STRING(msg, NL80211_ATTR_REG_ALPHA2,
>  		cfg80211_regdomain->alpha2);

Seems fine. Actually, since the message is freed anyhow, the call to
genlmsg_cancel is *completely* unnecessary, I just put it in to make it
nest better and not rely on it not having side effects.

But why did you call the label differently? :)

johannes


WARNING: multiple messages have this Message-ID (diff)
From: Johannes Berg <johannes@sipsolutions.net>
To: Julia Lawall <julia@diku.dk>
Cc: kernel-janitors@vger.kernel.org,
	"John W. Linville" <linville@tuxdriver.com>,
	"David S. Miller" <davem@davemloft.net>,
	linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] net/wireless/nl80211.c: Avoid call to genlmsg_cancel
Date: Fri, 28 Jan 2011 15:01:07 +0100	[thread overview]
Message-ID: <1296223267.5118.7.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <1296224232-8115-1-git-send-email-julia@diku.dk>

On Fri, 2011-01-28 at 15:17 +0100, Julia Lawall wrote:

> diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
> index 9b62710..864ddfb 100644
> --- a/net/wireless/nl80211.c
> +++ b/net/wireless/nl80211.c
> @@ -2718,7 +2718,7 @@ static int nl80211_get_mesh_config(struct sk_buff *skb,
>  	hdr = nl80211hdr_put(msg, info->snd_pid, info->snd_seq, 0,
>  			     NL80211_CMD_GET_MESH_CONFIG);
>  	if (!hdr)
> -		goto nla_put_failure;
> +		goto out;


> @@ -2954,7 +2955,7 @@ static int nl80211_get_reg(struct sk_buff *skb, struct genl_info *info)
>  	hdr = nl80211hdr_put(msg, info->snd_pid, info->snd_seq, 0,
>  			     NL80211_CMD_GET_REG);
>  	if (!hdr)
> -		goto nla_put_failure;
> +		goto put_failure;
>  
>  	NLA_PUT_STRING(msg, NL80211_ATTR_REG_ALPHA2,
>  		cfg80211_regdomain->alpha2);

Seems fine. Actually, since the message is freed anyhow, the call to
genlmsg_cancel is *completely* unnecessary, I just put it in to make it
nest better and not rely on it not having side effects.

But why did you call the label differently? :)

johannes


  reply	other threads:[~2011-01-28 14:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-28 13:57 [PATCH 1/2] net/wireless/nl80211.c: Avoid call to genlmsg_cancel Julia Lawall
2011-01-28 14:17 ` Julia Lawall
2011-01-28 14:01 ` Johannes Berg [this message]
2011-01-28 14:01   ` Johannes Berg
2011-01-28 14:16   ` Julia Lawall
2011-01-28 14:16     ` Julia Lawall
2011-01-28 14:20     ` [PATCH 1/2] net/wireless/nl80211.c: Avoid call to Johannes Berg
2011-01-28 14:20       ` [PATCH 1/2] net/wireless/nl80211.c: Avoid call to genlmsg_cancel Johannes Berg
2011-01-28 14:20       ` Johannes Berg

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=1296223267.5118.7.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=davem@davemloft.net \
    --cc=julia@diku.dk \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=netdev@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.