Messages in this thread | | | Date | Mon, 07 Apr 2003 22:27:28 -0400 | From | Jeff Garzik <> | Subject | Re: SET_MODULE_OWNER? |
| |
Rusty Russell wrote: > In message <3E91C398.9070400@pobox.com> you write: > >>Rusty Russell wrote: >> >>>I thought it was completely useless, hence deprecated. >>> >>>Anyone have any reason to defend it? >> >> >>It's used to allow source compatibility with all kernels, old or new. >> >>Thus it is in active use, and should not be removed. > > > Inside individual drivers, or a set of compat macros, it makes sense. > But as a general module.h primitive it doesn't. > > Imagine a structure adds an owner field in 2.5. This macro doesn't > help you, you need a specific compat macro for that struct.
no, SET_MODULE_OWNER is quite intentionally independent of the struct. It only requires a consisnent naming in the source, between structures that may use the macro.
That's a feature.
> ie. AFAICT it only buys you 2.2 compatibility, and even then only if > you #define it at the top of your driver.
no, farther back than that, to infinity and beyond :) The idea of the macro is that on earlier kernels, it is simply a no-op, and module refcounting is handled by other means.
> I still don't understand: please demonstrate a use in existing source.
demonstrate? grep for it. It's used quite a bit. Removal of SET_MODULE_OWNER looks to me to be pointless churn for negative gain. If if you wish to pointedly ignore the old-source compatibility angle, it is a nice convenience macro.
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/
| |