Messages in this thread | | | Date | Fri, 20 Jul 2007 09:30:18 -0700 | From | Andrew Morton <> | Subject | Re: drivers/base/core.c broken for non-CONFIG_HOTPLUG |
| |
On Fri, 20 Jul 2007 14:06:19 +0200 Kay Sievers <kay.sievers@vrfy.org> wrote:
> On Fri, 2007-07-20 at 00:59 -0700, Andrew Morton wrote: > > On Fri, 20 Jul 2007 09:01:06 +0200 Robert Schwebel <r.schwebel@pengutronix.de> wrote: > > > > > You add and use > > > > > > extern const char *kobject_actions[]; > > > > Added it in a .c file, too. Even checkpatch.pl knows that > > was wrong. > > The kernel is doing that all over the place for global symbols that are > not meant to be used out of a "private" context or where a "private" > header file of a subsystem doesn't exist.
Whatever the reason, it's still wrong, because the problem remains: lack of typechecking between the definition and its users.
It's defensible in one situation: where the definition is in assembly language. And even then the symbol can be declared in a header, if only because a second user may be added.
> I can change that, if this isn't the way to do it?
Please. Let's find a reasonably-relevant header for it. If there isn't one, let's add it; there are quite possibly other things which should be in that header so choose with care, with that possibility in mind. - 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/
| |