From: Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public•gmane.org>
To: Julian Calaby <julian.calaby-Re5JQEeQqe8AvxtiuMwx3w@public•gmane.org>
Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public•gmane.org,
linux-wireless-u79uwXL29TY76Z2rM5mHXA@public•gmane.org,
tgraf-G/eBtMaohhA@public•gmane.org
Subject: Re: [RFC 1/2] genetlink: introduce pre_doit/post_doit hooks
Date: Fri, 01 Oct 2010 00:55:52 +0200 [thread overview]
Message-ID: <1285887352.5137.34.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <AANLkTimVMGHNkK=o650qzZfvUp3mWRAG_=60etVbEBxh-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Fri, 2010-10-01 at 08:51 +1000, Julian Calaby wrote:
> > Come to think of it -- I could get away with a single pointer, since, if
> > both are assigned,
> >
> > user_ptr[0] == wiphy_to_rdev(((netdev *)user_ptr[1])->ieee80211_ptr->wiphy)
> >
> > but that's a lot of pointy things, and some functions only have the rdev
> > so it gets more complex. I think allowing two private pointers is a
> > decent compromise.
>
> Come to think of it -- if someone wanted to have a massive structure
> with 10 pointers and a set of random data structures, then they could
> easily create their priv struct and assign it to user_ptr[0], hence
> rendering my argument null and void.
Oh, well, I thought your argument was that it was arbitrary and not
really necessary :-)
Also, this rather cheap, it just needs a bit more stack space in a place
that isn't typically deeply nested. So if some protocol came around and
needed three pointers, I'd probably advocate just bumping it to three.
At some point I might draw a line (10 is probably too much).
But you're right, of course, they can just use the first one and put
something dynamically allocated into that, if really needed.
johannes
--
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:[~2010-09-30 22:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-30 21:10 [RFC 0/2] generic netlink doit generalisation Johannes Berg
2010-09-30 21:10 ` [RFC 1/2] genetlink: introduce pre_doit/post_doit hooks Johannes Berg
[not found] ` <20100930211131.021309930-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2010-09-30 22:41 ` Julian Calaby
2010-09-30 22:44 ` Johannes Berg
2010-09-30 22:47 ` Johannes Berg
2010-09-30 22:49 ` Johannes Berg
2010-09-30 22:51 ` Julian Calaby
[not found] ` <AANLkTimVMGHNkK=o650qzZfvUp3mWRAG_=60etVbEBxh-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-09-30 22:55 ` Johannes Berg [this message]
[not found] ` <1285887352.5137.34.camel-8upI4CBIZJIJvtFkdXX2HixXY32XiHfO@public.gmane.org>
2010-09-30 23:14 ` Julian Calaby
2010-09-30 21:10 ` [RFC 2/2] nl80211: use the new genetlink pre/post_doit hooks Johannes Berg
[not found] ` <20100930211013.472957770-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2010-09-30 22:39 ` [RFC 0/2] generic netlink doit generalisation 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=1285887352.5137.34.camel@jlt3.sipsolutions.net \
--to=johannes-cdvu00un1vgdhxzaddlk8q@public$(echo .)gmane.org \
--cc=julian.calaby-Re5JQEeQqe8AvxtiuMwx3w@public$(echo .)gmane.org \
--cc=linux-wireless-u79uwXL29TY76Z2rM5mHXA@public$(echo .)gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public$(echo .)gmane.org \
--cc=tgraf-G/eBtMaohhA@public$(echo .)gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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