Re: [patch] add private data to notifier_block

From: Jes Sorensen
Date: Thu Mar 23 2006 - 05:04:43 EST


>>>>> "Kristen" == Kristen Accardi <kristen.c.accardi@xxxxxxxxx> writes:

Kristen> On Wed, 2006-03-22 at 14:04 -0500, Alan Stern wrote:
>> I still think this isn't really needed. The same effect can be
>> accomplished by embedding a notifier_block struct within a larger
>> structure that also contains the data pointer.

Kristen> I thought of this, but felt it would make for less easy to
Kristen> read code. But, that's just my personal style.

I'd have to vote for Alan's side here. Thats why we have the
containerof() stuff. It also means you can embed more than just a
pointer with the notifier block and it will generate more efficient
code when doing so.

Cheers,
Jes
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/