All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: "David S. Miller" <davem@davemloft.net>,
	linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mac80211: Create ieee80211_if_process_skb from ieee80211_iface_work
Date: Fri, 05 May 2017 02:34:33 -0700	[thread overview]
Message-ID: <1493976873.31950.15.camel@perches.com> (raw)
In-Reply-To: <1493975178.2500.0.camel@sipsolutions.net>

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;

  reply	other threads:[~2017-05-05  9:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-04 17:30 [PATCH] mac80211: Create ieee80211_if_process_skb from ieee80211_iface_work Joe Perches
2017-05-05  9:06 ` Johannes Berg
2017-05-05  9:34   ` Joe Perches [this message]
2017-05-05  9:39     ` Johannes Berg
2017-05-05  9:47       ` Joe Perches

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=1493976873.31950.15.camel@perches.com \
    --to=joe@perches.com \
    --cc=davem@davemloft.net \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --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.