Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1636276

Re: [PATCH] mac80211: Create ieee80211_if_process_skb from ieee80211_iface_work

From Joe Perches <joe@perches.com>
Newsgroups linux.kernel
Subject Re: [PATCH] mac80211: Create ieee80211_if_process_skb from ieee80211_iface_work
Date 2017-05-05 11:50 +0200
Message-ID <tDI26-8l5-7@gated-at.bofh.it> (permalink)
References <tDsTo-6G6-21@gated-at.bofh.it> <tDHpn-877-1@gated-at.bofh.it> <tDHSp-8hz-5@gated-at.bofh.it> <tDHSp-8hz-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, 2017-05-05 at 11:39 +0200, Johannes Berg wrote:
> On Fri, 2017-05-05 at 02:34 -0700, Joe Perches wrote:
> > 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.
> 
> Well, OK. I'd rather change the others I guess, don't really see the
> point.
> 
> > $ 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/agg-rx.c:	rx_agg = (struct ieee80211_rx_agg *) &skb->cb;
> 
> It's really just these three that are related to the iface.c ones
> anyway.
> 
> > 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;
> > 
> 
> These should be using IEEE80211_SKB_RXCB(skb) :)

patches welcome... :)

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] mac80211: Create ieee80211_if_process_skb from ieee80211_iface_work Joe Perches <joe@perches.com> - 2017-05-04 19:40 +0200
  Re: [PATCH] mac80211: Create ieee80211_if_process_skb from  ieee80211_iface_work Johannes Berg <johannes@sipsolutions.net> - 2017-05-05 11:10 +0200
    Re: [PATCH] mac80211: Create ieee80211_if_process_skb from  ieee80211_iface_work Johannes Berg <johannes@sipsolutions.net> - 2017-05-05 11:40 +0200
      Re: [PATCH] mac80211: Create ieee80211_if_process_skb from  ieee80211_iface_work Joe Perches <joe@perches.com> - 2017-05-05 11:50 +0200
    Re: [PATCH] mac80211: Create ieee80211_if_process_skb from  ieee80211_iface_work Joe Perches <joe@perches.com> - 2017-05-05 11:40 +0200

csiph-web