netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Jiri Benc <jbenc@redhat.com>,
	linux-wireless <linux-wireless@vger.kernel.org>,
	netdev <netdev@vger.kernel.org>
Subject: Re: ieee80211_i.h: shouldn't struct ps_data.tim be aligned unsigned long?
Date: Wed, 18 Dec 2013 01:23:05 -0800	[thread overview]
Message-ID: <1387358585.13593.40.camel@joe-AO722> (raw)
In-Reply-To: <1387358347.4694.2.camel@jlt4.sipsolutions.net>

On Wed, 2013-12-18 at 10:19 +0100, Johannes Berg wrote:
> On Wed, 2013-12-18 at 00:16 -0800, Joe Perches wrote:
> 
> > Perhaps the
> > 	u8 tim[sizeof...]
> > member should be marked
> > 	__aligned(sizeof(unsigned long))
> > so that the cast to ulong when bitmap_empty
> > is actually forced to be ulong aligned?
> 
> yeah, I suppose that's true.
> 
> > diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
> > index ed5bf8b..e5a9c51 100644
> > --- a/net/mac80211/ieee80211_i.h
> > +++ b/net/mac80211/ieee80211_i.h
> > @@ -245,7 +245,8 @@ struct ps_data {
> >  	/* yes, this looks ugly, but guarantees that we can later use
> >  	 * bitmap_empty :)
> >  	 * NB: don't touch this bitmap, use sta_info_{set,clear}_tim_bit */
> > -	u8 tim[sizeof(unsigned long) * BITS_TO_LONGS(IEEE80211_MAX_AID + 1)];
> > +	u8 tim[sizeof(unsigned long) * BITS_TO_LONGS(IEEE80211_MAX_AID + 1)]
> > +			__aligned(sizeof(unsigned long));
> 
> Care to send a proper patch? Otherwise I'll just re-do it and pick it up
> that way ...

Hi Johannes.

You can redo it easier than applying a patch
from me.

I just noticed it when the reformatting
patch went by.

No need to give a credit or anything.
It's just a nit.

cheers, Joe

  reply	other threads:[~2013-12-18  9:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-18  8:16 ieee80211_i.h: shouldn't struct ps_data.tim be aligned unsigned long? Joe Perches
2013-12-18  9:19 ` Johannes Berg
2013-12-18  9:23   ` Joe Perches [this message]
2013-12-19  0:52   ` [PATCH] ieee80211_i.h: Align struct ps_data.tim to unsigned long Joe Perches
2013-12-19  8:19     ` 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=1387358585.13593.40.camel@joe-AO722 \
    --to=joe@perches.com \
    --cc=jbenc@redhat.com \
    --cc=johannes@sipsolutions.net \
    --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 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).