lkml.org 
[lkml]   [2017]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] mac80211: Create ieee80211_if_process_skb from ieee80211_iface_work
From
Date
On Fri, 2017-05-05 at 11:06 +0200, Johannes Berg wrote:
> > o Use explicit casts to proper types instead of casts to (void *)
> >   and have the compiler do the implicit cast
>
> I see no advantage in this, why? All it does is make the code longer,
> and if anything changes, you have to change it in multiple places now.

It makes use of the casted to types consistent within net/mac80211

Here are the current uses. I changed iface .c to match the others.

$ grep -P --include=*.[ch] "\((\w++\s*){1,2}\s*\*\).*skb->cb" net/mac80211
net/mac80211/iface.c: ra_tid = (void *)&skb->cb;
net/mac80211/iface.c: ra_tid = (void *)&skb->cb;
net/mac80211/iface.c: rx_agg = (void *)&skb->cb;
net/mac80211/iface.c: rx_agg = (void *)&skb->cb;
net/mac80211/agg-tx.c: ra_tid = (struct ieee80211_ra_tid *) &skb->cb;
net/mac80211/agg-tx.c: ra_tid = (struct ieee80211_ra_tid *) &skb->cb;
net/mac80211/mlme.c: struct ieee80211_rx_status *rx_status = (void *) skb->cb;
net/mac80211/mlme.c: rx_status = (struct ieee80211_rx_status *) skb->cb;
net/mac80211/agg-rx.c: rx_agg = (struct ieee80211_rx_agg *) &skb->cb;

\
 
 \ /
  Last update: 2017-05-05 11:35    [W:2.339 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site