Re: [2.6 patch] unexport insert_resource

Christoph Hellwig
2005-04-24T09:52:28Z

On Sat, Apr 23, 2005 at 04:44:11PM -0700, Andrew Morton wrote:
> Adrian Bunk <bunk@stusta.de> wrote:
> >
> > I didn't find any possible modular usage in the kernel.
> >
>
> True, but this looks like something which out-of-tree code could possibly
> be using. I'd prefer to see this one get the deprecated_for_modules
> twelve-month treatment.

Don't you think twelve month is damn long? Two kernel releases seem
like a better policy - extremly long deprecation periods only encourage
people to never look at mainline kernels but just ad vendor trees.

> Or we just leave it as-is. It depends whether insert_resource is a
> sensible part of the resource management API (I think it is). If so,
> then we should just leave it exported, whether or not any in-kernel moduels
> happen to be using it at this point in time.

It makes sense for plattforms or bus implementations. So for typical drivers
it doesn't make sense at all. It might make sense for bus providers, and in
case a modular one that wants this symbol appears we could re-export it
as _GPL, clearly marking it internal.

Note that you're not really helping driver authors by exporting random
kernel symbols - that way we can never guarantee a semi-stable API as
random internals are exported. Compare that with e.g. the scsi subsystem
where we're trying to make sure to only export sensible primitives that
operate on higher-level object to the driver and make sure they're moving
off old and ill-specified APIs.