From: Andrew Morton <akpm@linux-foundation.org>
To: Kay Sievers <kay.sievers@vrfy.org>
Cc: Robert Schwebel <r.schwebel@pengutronix.de>,
Greg Kroah-Hartman <gregkh@suse.de>,
linux-kernel@vger.kernel.org
Subject: Re: drivers/base/core.c broken for non-CONFIG_HOTPLUG
Date: Fri, 20 Jul 2007 09:30:18 -0700 [thread overview]
Message-ID: <20070720093018.8260fc0c.akpm@linux-foundation.org> (raw)
In-Reply-To: <1184933179.3545.12.camel@lov.localdomain>
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.
prev parent reply other threads:[~2007-07-20 16:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-20 7:01 Robert Schwebel
2007-07-20 7:10 ` Greg KH
2007-07-20 7:59 ` Andrew Morton
2007-07-20 12:06 ` Kay Sievers
2007-07-20 16:30 ` Andrew Morton [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070720093018.8260fc0c.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=gregkh@suse.de \
--cc=kay.sievers@vrfy.org \
--cc=linux-kernel@vger.kernel.org \
--cc=r.schwebel@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome