Re: SET_MODULE_OWNER?

Jeff Garzik (jgarzik@pobox.com)
Tue, 08 Apr 2003 23:48:12 -0400


Rusty Russell wrote:
> In message <3E937144.9090105@pobox.com> you write:
>
>>Why don't you just let the maintainers apply the driver "cleanups" if
>>they wish, or do not wish, like DaveM did. Only when that is
>>accomplished is it reasonable to consider moving SET_MODULE_OWNER -- and
>>only then if other people do not need it's obvious utility.
>
>
> The please define when it should and should not be used, so everyone
> knows.

Use with structures that have an owner field, if you care about
cross-version kernel source compatibility.

> Currently it seems to be:
>
> /* This macro should be used on structures which had the owner field
> added between 2.2 and 2.4, and not others. */
>
> Is that correct?

No. SET_MODULE_OWNER is useful regardless of kernel version, not just
the restrictive set you define here. Different vendors may implement
SET_MODULE_OWNER with a different range of kernel versions, if they so
choose. It's not restricted at all to when struct net_device gained an
'owner' field.

Maybe think of it this way: a source code hook whose implementation is
free to change, as long as it functionally produces the desired result.
The in-kernel definition of the macro is only one of N implementations.

Jeff

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