mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org, pj@sgi.com,
	rth@twiddle.net, davej@redhat.com, zwane@arm.linux.org.uk,
	ak@suse.de, ashok.raj@intel.com
Subject: Re: [PATCH] move pm_power_off and pm_idle declaration to common code
Date: Mon, 12 Dec 2005 07:36:05 -0700	[thread overview]
Message-ID: <m1lkyq9ycq.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <E1Elof7-0005j7-00@dorka.pomaz.szeredi.hu> (Miklos Szeredi's message of "Mon, 12 Dec 2005 15:28:21 +0100")

Miklos Szeredi <miklos@szeredi.hu> writes:

>> > So move declaration of pm_power_off (and with it pm_idle) from the
>> > archs that do define it to kernel/sys.c.  This should fix the link
>> > problem, and at the same time remove some duplication.
>> 
>> Sounds sane.  
>> 
>> Does powerpc still build?  A key question is how do we handle architectures
>> that always want to want to call machine_power_off.
>
> I didn't (and can't) check, but it should.  IIRC multiple declaration
> of a variable is OK, as long as at most one has an initializer.

It should be easy enough to put that declaration on an architecture
you can build and check that way.

Multiple declaration of a variable with only one having an initializer
work because the variable gets put into the common section as I recall.
I don't believe this is portable to all C implementations. but the
important question is does this construct work in the kernel.

If it doesn't work as is we should be able to get similar behavior
from weak symbols.

Could you test that part of your patch please?

Eric

  reply	other threads:[~2005-12-12 14:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-12 14:02 Miklos Szeredi
2005-12-12 14:20 ` Eric W. Biederman
2005-12-12 14:28   ` Miklos Szeredi
2005-12-12 14:36     ` Eric W. Biederman [this message]
2005-12-12 14:39     ` Andreas Schwab
2005-12-12 14:46       ` Miklos Szeredi
2005-12-12 14:54         ` Eric W. Biederman
2005-12-12 15:58   ` Paul Jackson
2005-12-12 15:26 ` [PATCH] uml: fix pm_power_off link failure Miklos Szeredi

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=m1lkyq9ycq.fsf@ebiederm.dsl.xmission.com \
    --to=ebiederm@xmission.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=ashok.raj@intel.com \
    --cc=davej@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=pj@sgi.com \
    --cc=rth@twiddle.net \
    --cc=zwane@arm.linux.org.uk \
    /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

all inboxes | Powered by JetHome®