* Re: [PATCH] mac80211: Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...))
2013-10-08 0:09 [PATCH] mac80211: Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)) djduanjiong-Re5JQEeQqe8AvxtiuMwx3w
@ 2013-10-07 16:16 ` Johannes Berg
2013-10-08 8:33 ` David Laight
1 sibling, 0 replies; 4+ messages in thread
From: Johannes Berg @ 2013-10-07 16:16 UTC (permalink / raw)
To: djduanjiong
Cc: John W. Linville, David S. Miller, linux-wireless, netdev, Duan Jiong
On Mon, 2013-10-07 at 17:09 -0700, djduanjiong@gmail.com wrote:
> if (IS_ERR(key))
> - return ERR_PTR(PTR_ERR(key));
> + return ERR_CAST(key);
I already have this patch in my tree.
johannes
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] mac80211: Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...))
@ 2013-10-08 0:09 djduanjiong-Re5JQEeQqe8AvxtiuMwx3w
2013-10-07 16:16 ` Johannes Berg
2013-10-08 8:33 ` David Laight
0 siblings, 2 replies; 4+ messages in thread
From: djduanjiong-Re5JQEeQqe8AvxtiuMwx3w @ 2013-10-08 0:09 UTC (permalink / raw)
To: Johannes Berg, John W. Linville, David S. Miller
Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA, Duan Jiong
From: Duan Jiong <duanj.fnst-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
Signed-off-by: Duan Jiong <duanj.fnst-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
---
net/mac80211/key.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/mac80211/key.c b/net/mac80211/key.c
index 620677e..3e51dd7 100644
--- a/net/mac80211/key.c
+++ b/net/mac80211/key.c
@@ -879,7 +879,7 @@ ieee80211_gtk_rekey_add(struct ieee80211_vif *vif,
keyconf->keylen, keyconf->key,
0, NULL);
if (IS_ERR(key))
- return ERR_PTR(PTR_ERR(key));
+ return ERR_CAST(key);
if (sdata->u.mgd.mfp != IEEE80211_MFP_DISABLED)
key->conf.flags |= IEEE80211_KEY_FLAG_RX_MGMT;
--
1.7.7.6
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [PATCH] mac80211: Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...))
2013-10-08 0:09 [PATCH] mac80211: Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)) djduanjiong-Re5JQEeQqe8AvxtiuMwx3w
2013-10-07 16:16 ` Johannes Berg
@ 2013-10-08 8:33 ` David Laight
[not found] ` <AE90C24D6B3A694183C094C60CF0A2F6026B7379-CgBM+Bx2aUAnGFn1LkZF6NBPR1lH4CV8@public.gmane.org>
1 sibling, 1 reply; 4+ messages in thread
From: David Laight @ 2013-10-08 8:33 UTC (permalink / raw)
To: djduanjiong, Johannes Berg, John W. Linville, David S. Miller
Cc: linux-wireless, netdev, Duan Jiong
> Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>
> ---
> net/mac80211/key.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/net/mac80211/key.c b/net/mac80211/key.c
> index 620677e..3e51dd7 100644
> --- a/net/mac80211/key.c
> +++ b/net/mac80211/key.c
> @@ -879,7 +879,7 @@ ieee80211_gtk_rekey_add(struct ieee80211_vif *vif,
> keyconf->keylen, keyconf->key,
> 0, NULL);
> if (IS_ERR(key))
> - return ERR_PTR(PTR_ERR(key));
> + return ERR_CAST(key);
I suspect the old code is a deliberate attempt to indicate that it
the error value that is being returned rather than the pointer.
Looking higher up that file there seems to be a fubar when setting
up the TKIP key.
It seems to put the same 6 bytes into every TID.
(I'm sure seq_len shouldn't be ignored either.0
David
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mac80211: Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...))
[not found] ` <AE90C24D6B3A694183C094C60CF0A2F6026B7379-CgBM+Bx2aUAnGFn1LkZF6NBPR1lH4CV8@public.gmane.org>
@ 2013-10-08 8:37 ` Johannes Berg
0 siblings, 0 replies; 4+ messages in thread
From: Johannes Berg @ 2013-10-08 8:37 UTC (permalink / raw)
To: David Laight
Cc: djduanjiong-Re5JQEeQqe8AvxtiuMwx3w, John W. Linville,
David S. Miller, linux-wireless-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA, Duan Jiong
On Tue, 2013-10-08 at 09:33 +0100, David Laight wrote:
> > if (IS_ERR(key))
> > - return ERR_PTR(PTR_ERR(key));
> > + return ERR_CAST(key);
>
> I suspect the old code is a deliberate attempt to indicate that it
> the error value that is being returned rather than the pointer.
I was under the impression that's what ERR_CAST means.
> Looking higher up that file there seems to be a fubar when setting
> up the TKIP key.
> It seems to put the same 6 bytes into every TID.
> (I'm sure seq_len shouldn't be ignored either.0
Both are fine.
johannes
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-10-08 8:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-08 0:09 [PATCH] mac80211: Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)) djduanjiong-Re5JQEeQqe8AvxtiuMwx3w
2013-10-07 16:16 ` Johannes Berg
2013-10-08 8:33 ` David Laight
[not found] ` <AE90C24D6B3A694183C094C60CF0A2F6026B7379-CgBM+Bx2aUAnGFn1LkZF6NBPR1lH4CV8@public.gmane.org>
2013-10-08 8:37 ` Johannes Berg
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).