From: Julia Lawall <julia.lawall-L2FTfq7BK8M@public.gmane.org>
To: Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
Cc: Julia Lawall <julia.lawall-L2FTfq7BK8M@public.gmane.org>,
Ben Greear <greearb-my8/4N5VtI7c+919tysfdA@public.gmane.org>,
Joe Perches <joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>,
Henrique de Moraes Holschuh
<hmh-N3TV7GIv+o9fyO9Q7EP/yw@public.gmane.org>,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Emmanuel Grumbach
<emmanuel.grumbach-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Intel Linux Wireless
<ilw-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
"John W. Linville"
<linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>,
linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 4/11] use ether_addr_equal_64bits
Date: Mon, 6 Jan 2014 10:09:20 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.10.1401061007160.2079@hadrien> (raw)
In-Reply-To: <1388999147.5891.2.camel-8Nb76shvtaUJvtFkdXX2HixXY32XiHfO@public.gmane.org>
On Mon, 6 Jan 2014, Johannes Berg wrote:
> On Tue, 2013-12-31 at 17:40 +0100, Julia Lawall wrote:
>
> > > If nothing else, then some run-time code that calculates the offset off
> > > and asserts if it is broken in module initialization or similar might
> > > be good enough.
> >
> > Could be OK. Something right in or after the structure declaration would
> > be nicest.
>
> I don't think you can put a BUILD_BUG_ON() into the structure
> declaration (it's code, not declarations), but I think you could just
> put
>
> BUILD_BUG_ON(sizeof(struct foo) - offsetof(struct foo, addr) < 8);
>
> with the user(s?) and that should catch the scenario I was worrying
> about?
OK, thanks. That is what I had in mind. But I was hoping to be able to
put it with the structure. Perhaps there is a way to make a macro that
expands to a dummy function that contains the BUILD_BUG_ON? But I guess
that would waste space?
I think that 8 should be 16?
julia
--
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
next prev parent reply other threads:[~2014-01-06 9:09 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-30 18:14 [PATCH 0/11] use ether_addr_equal_64bits Julia Lawall
2013-12-30 18:14 ` [PATCH 1/11] rt2x00: " Julia Lawall
2013-12-31 16:44 ` Gertjan van Wingerde
2013-12-30 18:14 ` [PATCH 2/11] ath5k: " Julia Lawall
2013-12-30 18:14 ` [PATCH 3/11] mac80211: " Julia Lawall
2013-12-30 18:10 ` Christian Lamparter
2013-12-30 18:15 ` [PATCH 4/11] " Julia Lawall
2013-12-30 18:56 ` Johannes Berg
2013-12-30 19:58 ` Julia Lawall
2013-12-30 21:25 ` Johannes Berg
2013-12-30 21:57 ` Henrique de Moraes Holschuh
[not found] ` <20131230215701.GA4938-ZGHd14iZgfaRjzvQDGKj+xxZW9W5cXbT@public.gmane.org>
2013-12-30 23:13 ` Johannes Berg
2013-12-30 23:17 ` Joe Perches
2013-12-31 6:32 ` Julia Lawall
[not found] ` <alpine.DEB.2.02.1312310726540.1930-bi+AKbBUZKagILUCTcTcHdKyNwTtLsGr@public.gmane.org>
2013-12-31 15:54 ` Ben Greear
2013-12-31 16:09 ` Julia Lawall
2013-12-31 16:27 ` Ben Greear
2013-12-31 16:40 ` Julia Lawall
2014-01-06 9:05 ` Johannes Berg
[not found] ` <1388999147.5891.2.camel-8Nb76shvtaUJvtFkdXX2HixXY32XiHfO@public.gmane.org>
2014-01-06 9:09 ` Julia Lawall [this message]
2014-01-06 10:17 ` Johannes Berg
2014-01-06 8:48 ` Julia Lawall
2014-01-06 8:59 ` Joe Perches
2014-01-06 9:04 ` Julia Lawall
2014-01-06 9:07 ` Johannes Berg
2014-01-06 9:20 ` Julia Lawall
2013-12-31 6:26 ` Emmanuel Grumbach
2014-01-06 9:24 ` Geert Uytterhoeven
2014-01-06 9:35 ` Julia Lawall
2014-01-06 15:18 ` Eric Dumazet
2014-01-06 10:48 ` Dan Carpenter
2014-01-17 10:18 ` Dan Carpenter
2013-12-30 18:15 ` [PATCH 5/11] mwl8k: " Julia Lawall
2013-12-30 18:15 ` [PATCH 6/11] rtlwifi: " Julia Lawall
2013-12-30 21:08 ` Larry Finger
2013-12-30 18:15 ` [PATCH 7/11] iwlegacy: " Julia Lawall
2013-12-30 18:15 ` [PATCH 8/11] " Julia Lawall
2013-12-30 18:15 ` [PATCH 9/11] ipw2x00: " Julia Lawall
2013-12-30 18:15 ` [PATCH 10/11] at76c50x-usb: " Julia Lawall
2013-12-30 18:15 ` [PATCH 11/11] carl9170: " Julia Lawall
2013-12-30 18:10 ` Christian Lamparter
2014-01-17 21:24 ` [PATCH 0/11] " Pavel Machek
2014-01-17 22:02 ` Oleksij Rempel
2014-01-17 22:43 ` Pavel Machek
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=alpine.DEB.2.10.1401061007160.2079@hadrien \
--to=julia.lawall-l2ftfq7bk8m@public.gmane.org \
--cc=emmanuel.grumbach-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=greearb-my8/4N5VtI7c+919tysfdA@public.gmane.org \
--cc=hmh-N3TV7GIv+o9fyO9Q7EP/yw@public.gmane.org \
--cc=ilw-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
--cc=joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org \
--cc=johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org \
--cc=kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.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