Re: drivers/base/core.c broken for non-CONFIG_HOTPLUG

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 20 Jul 2007 14:06:19 +0200 Kay Sievers <[email protected]> wrote:

> On Fri, 2007-07-20 at 00:59 -0700, Andrew Morton wrote:
> > On Fri, 20 Jul 2007 09:01:06 +0200 Robert Schwebel <[email protected]> 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux