linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bhelgaas@google.com>
To: Jason Wessel <jason.wessel@windriver.com>,
	Ralf Baechle <ralf@linux-mips.org>,
	Ingo Molnar <mingo@redhat.com>,
	John Stultz <john.stultz@linaro.org>,
	Eric Paris <eparis@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-mips@linux-mips.org" <linux-mips@linux-mips.org>,
	Stephen Rothwell <sfr@canb.auug.org.au>
Subject: Re: [PATCH v1 05/10] MIPS: MT: Move "weak" from vpe_run() declaration to definition
Date: Tue, 21 Oct 2014 14:05:10 -0600	[thread overview]
Message-ID: <CAErSpo7D_vHMebzhTfGKyyX=dtg+H0GiJV3fw2VaMTfdkDfa8g@mail.gmail.com> (raw)
In-Reply-To: <CAErSpo6978-uGD6Mq+tESXVZsmZSLWCuAwyBzO9pKHg_foNZPg@mail.gmail.com>

On Thu, Oct 16, 2014 at 7:49 AM, Bjorn Helgaas <bhelgaas@google.com> wrote:
> [+cc Stephen]
>
> On Wed, Oct 15, 2014 at 5:28 PM, Bjorn Helgaas <bhelgaas@google.com> wrote:
>> [+cc linux-mips]
>>
>> On Wed, Oct 15, 2014 at 11:06 AM, Bjorn Helgaas <bhelgaas@google.com> wrote:
>>> When the "weak" attribute is on a declaration in a header file, every
>>> definition where the header is included becomes weak, and the linker
>>> chooses one definition based on link order (see 10629d711ed7 ("PCI: Remove
>>> __weak annotation from pcibios_get_phb_of_node decl")).
>>>
>>> Move the "weak" attribute from the declaration to the default definition so
>>> we always prefer a non-weak definition over the weak one, independent of
>>> link order.
>>>
>>> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
>>> CC: linux-mips@linux-mips.org

Dropping this permanently since I haven't heard from any MIPS folks.

>>> ---
>>>  arch/mips/include/asm/vpe.h |    2 +-
>>>  arch/mips/kernel/vpe-mt.c   |    2 +-
>>>  2 files changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/arch/mips/include/asm/vpe.h b/arch/mips/include/asm/vpe.h
>>> index 7849f3978fea..80e70dbd1f64 100644
>>> --- a/arch/mips/include/asm/vpe.h
>>> +++ b/arch/mips/include/asm/vpe.h
>>> @@ -122,7 +122,7 @@ void release_vpe(struct vpe *v);
>>>  void *alloc_progmem(unsigned long len);
>>>  void release_progmem(void *ptr);
>>>
>>> -int __weak vpe_run(struct vpe *v);
>>> +int vpe_run(struct vpe *v);
>>>  void cleanup_tc(struct tc *tc);
>>>
>>>  int __init vpe_module_init(void);
>>> diff --git a/arch/mips/kernel/vpe-mt.c b/arch/mips/kernel/vpe-mt.c
>>> index 2e003b11a098..0e5899a2cd96 100644
>>> --- a/arch/mips/kernel/vpe-mt.c
>>> +++ b/arch/mips/kernel/vpe-mt.c
>>> @@ -23,7 +23,7 @@ static int major;
>>>  static int hw_tcs, hw_vpes;
>>>
>>>  /* We are prepared so configure and start the VPE... */
>>> -int vpe_run(struct vpe *v)
>>> +int __weak vpe_run(struct vpe *v)
>>>  {
>>>         unsigned long flags, val, dmt_flag;
>>>         struct vpe_notifications *notifier;
>>>
>
> Just FYI, this patch was in linux-next today, but I dropped it
> temporarily because Fengguang's auto-builder found the following issue
> with it:
>
> All error/warnings:
>
>    arch/mips/kernel/vpe.c: In function 'vpe_release':
>>> arch/mips/kernel/vpe.c:830:29: error: the address of 'vpe_run' will always evaluate as 'true' [-Werror=address]
>       if ((vpe_elfload(v) >= 0) && vpe_run) {
>                                 ^
>    cc1: all warnings being treated as errors

  reply	other threads:[~2014-10-21 20:05 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-15 17:05 [PATCH v1 00/10] Remove weak function declarations Bjorn Helgaas
2014-10-15 17:05 ` [PATCH v1 01/10] audit: Remove "weak" from audit_classify_compat_syscall() declaration Bjorn Helgaas
2014-10-15 23:25   ` Bjorn Helgaas
2014-10-16 17:02     ` Richard Guy Briggs
2014-10-15 17:05 ` [PATCH v1 02/10] x86, intel-mid: Remove "weak" from function declarations Bjorn Helgaas
2014-10-15 23:26   ` Bjorn Helgaas
2014-10-17  0:42     ` sathyanarayanan kuppuswamy
2014-10-17  1:41       ` David Cohen
2014-10-20 16:15         ` Bjorn Helgaas
2014-10-20 17:55           ` David Cohen
2014-10-16  5:09   ` Ingo Molnar
2014-10-15 17:06 ` [PATCH v1 03/10] MIPS: CPC: Make mips_cpc_phys_base() static Bjorn Helgaas
2014-10-15 23:27   ` Bjorn Helgaas
2014-10-15 23:28     ` Bjorn Helgaas
2014-10-21 20:03       ` Bjorn Helgaas
2014-10-15 17:06 ` [PATCH v1 04/10] MIPS: Remove "weak" from platform_maar_init() declaration Bjorn Helgaas
2014-10-15 23:27   ` Bjorn Helgaas
2014-10-21 20:04     ` Bjorn Helgaas
2014-10-15 17:06 ` [PATCH v1 05/10] MIPS: MT: Move "weak" from vpe_run() declaration to definition Bjorn Helgaas
2014-10-15 23:28   ` Bjorn Helgaas
2014-10-16 13:49     ` Bjorn Helgaas
2014-10-21 20:05       ` Bjorn Helgaas [this message]
2014-10-15 17:06 ` [PATCH v1 06/10] clocksource: Remove "weak" from clocksource_default_clock() declaration Bjorn Helgaas
2014-10-15 17:36   ` John Stultz
2014-10-15 23:30   ` Bjorn Helgaas
2014-10-16  7:22     ` Martin Schwidefsky
2014-10-16 13:40       ` Bjorn Helgaas
2014-10-16 13:45         ` Martin Schwidefsky
2014-10-16  5:10   ` Ingo Molnar
2014-10-15 17:06 ` [PATCH v1 07/10] vmcore: Remove "weak" from function declarations Bjorn Helgaas
2014-10-15 23:31   ` Bjorn Helgaas
2014-10-15 23:44     ` Bjorn Helgaas
2014-10-16  7:23       ` Martin Schwidefsky
2014-10-16 20:11       ` Vivek Goyal
2014-10-15 17:06 ` [PATCH v1 08/10] kgdb: Remove "weak" from kgdb_arch_pc() declaration Bjorn Helgaas
2014-10-15 23:35   ` Bjorn Helgaas
2014-10-16 13:38     ` Vineet Gupta
2014-10-17  7:59       ` Vineet Gupta
2014-10-20 16:20         ` Bjorn Helgaas
2014-10-16  0:07   ` Harvey Harrison
2014-10-15 17:06 ` [PATCH v1 09/10] memory-hotplug: Remove "weak" from memory_block_size_bytes() declaration Bjorn Helgaas
2014-10-15 23:38   ` Bjorn Helgaas
2014-10-16  7:23     ` Martin Schwidefsky
2014-10-15 17:06 ` [PATCH v1 10/10] uprobes: Remove "weak" from function declarations Bjorn Helgaas
2014-10-15 23:42   ` Bjorn Helgaas
2014-10-16  5:10   ` Ingo Molnar
2014-10-16  5:57   ` Srikar Dronamraju
2014-10-15 18:27 ` [PATCH v1 00/10] Remove weak " Andrew Morton

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='CAErSpo7D_vHMebzhTfGKyyX=dtg+H0GiJV3fw2VaMTfdkDfa8g@mail.gmail.com' \
    --to=bhelgaas@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=eparis@redhat.com \
    --cc=hpa@zytor.com \
    --cc=jason.wessel@windriver.com \
    --cc=john.stultz@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=mingo@redhat.com \
    --cc=ralf@linux-mips.org \
    --cc=sfr@canb.auug.org.au \
    --cc=tglx@linutronix.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;
as well as URLs for NNTP newsgroup(s).