[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110314145356.GI333@e-circ.dyndns.org>
Date: Mon, 14 Mar 2011 15:53:56 +0100
From: Kurt Van Dijck <kurt.van.dijck@....be>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: socketcan-core@...ts.berlios.de, netdev@...r.kernel.org
Subject: Re: [RFC v3 1/6] can: extend sockaddr_can to include j1939 members
On Mon, Mar 14, 2011 at 03:15:00PM +0100, Eric Dumazet wrote:
> > +/*
> > + * required_size
> > + * macro to find the minimum size of a struct
> > + * that includes a requested member
> > + */
> > +#define required_size(member, struct_type) \
> > + (offsetof(typeof(struct_type), member) + \
> > + sizeof(((typeof(struct_type) *)(0))->member))
> > +
>
> Hmm, most similar macros reverse arguments.
>
> (For example : offsetof())
I had 'list_entry' in mind.
>
> What about
>
> #define required_size(TYPE, MEMBER) ...
I'm not against that ...
If I receive no complaint for that, I can alter this in the next series.
>
>
Thanks,
Kurt
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists