mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Cohen <david.a.cohen@linux.intel.com>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: sathyanarayanan kuppuswamy 
	<sathyanarayanan.kuppuswamy@linux.intel.com>,
	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>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"x86@kernel.org" <x86@kernel.org>
Subject: Re: [PATCH v1 02/10] x86, intel-mid: Remove "weak" from function declarations
Date: Mon, 20 Oct 2014 10:55:52 -0700	[thread overview]
Message-ID: <20141020175552.GF4529@psi-dev26.jf.intel.com> (raw)
In-Reply-To: <CAErSpo4L=A5wE_UxwQea5ZHbPWOj8WWkaXJO7gXqvKb=Cc5VZg@mail.gmail.com>

On Mon, Oct 20, 2014 at 10:15:17AM -0600, Bjorn Helgaas wrote:
> On Thu, Oct 16, 2014 at 7:41 PM, David Cohen
> <david.a.cohen@linux.intel.com> wrote:
> > Hi Bjorn and Sathya,
> >
> > On Thu, Oct 16, 2014 at 05:42:11PM -0700, sathyanarayanan kuppuswamy wrote:
> >> Hi Bjorn,
> >>
> >> On 10/15/2014 04:26 PM, Bjorn Helgaas wrote:
> >> >[+cc David, Kuppuswamy, x86; sorry, I botched my "stg mail" so you
> >> >weren't included the first time]
> >> >
> >> >On Wed, Oct 15, 2014 at 11:05 AM, Bjorn Helgaas <bhelgaas@google.com> wrote:
> >> >>For the following interfaces:
> >> >>
> >> >>   get_penwell_ops()
> >> >>   get_cloverview_ops()
> >> >>   get_tangier_ops()
> >> >>
> >> >>there is only one implementation, so they do not need to be marked "weak".
> >> >>
> >> >>Remove the "weak" attribute from their declarations.
> >> >>
> >> >>Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
> >> >>CC: David Cohen <david.a.cohen@linux.intel.com>
> >> >>CC: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
> >> >>CC: x86@kernel.org
> >> >>---
> >> >>  arch/x86/platform/intel-mid/intel_mid_weak_decls.h |    7 +++----
> >> >>  1 file changed, 3 insertions(+), 4 deletions(-)
> >> >>
> >> >>diff --git a/arch/x86/platform/intel-mid/intel_mid_weak_decls.h b/arch/x86/platform/intel-mid/intel_mid_weak_decls.h
> >> >>index 46aa25c8ce06..3c1c3866d82b 100644
> >> >>--- a/arch/x86/platform/intel-mid/intel_mid_weak_decls.h
> >> Please remove this file and move the contents to asm/intel-mid.h.
> 
> I don't know or care enough about intel-mid to do this myself.  Right
> now, I'm just trying to remove unnecessary and incorrect usage of
> "weak" in header files.
> 
> > I partially agree :)
> >
> > Historically, this file was created because we could not build all intel
> > mid variants at once. So we have to select only one during compilation
> > time, which was fixed already.
> >
> > But we don't need to expose those functions outside intel-mid's
> > directory, which means asm/intel-mid.h isn't the best option IMHO.
> >
> > If you want, I can send a small re-work instead: we get rid of this
> > header file completely and simplify a bit what is exposed by
> > asm/intel-mid.h. Or you can keep this patch and then I send the re-work
> > on top of it. Anyway I'm fine.
> 
> It's fine with me if you want to rework this to remove the header
> completely.  When I pointed this out in January [1], you mentioned
> plans for that.  But I think we should merge this patch in the interim
> to remove the use of "weak" in a header file.  If we leave bad
> examples in the tree, they just proliferate.
> 
> [1] http://lkml.kernel.org/r/20140128013013.GA31626@psi-dev26.jf.intel.com

Yeah, a lot late :(
Please, go ahead with this patch and I send something on top of it.

BR, David

> 
> 
> >> >>+++ b/arch/x86/platform/intel-mid/intel_mid_weak_decls.h
> >> >>@@ -10,10 +10,9 @@
> >> >>   */
> >> >>
> >> >>
> >> >>-/* __attribute__((weak)) makes these declarations overridable */
> >> >>  /* For every CPU addition a new get_<cpuname>_ops interface needs
> >> >>   * to be added.
> >> >>   */
> >> >>-extern void *get_penwell_ops(void) __attribute__((weak));
> >> >>-extern void *get_cloverview_ops(void) __attribute__((weak));
> >> >>-extern void *get_tangier_ops(void) __attribute__((weak));
> >> >>+extern void *get_penwell_ops(void);
> >> >>+extern void *get_cloverview_ops(void);
> >> >>+extern void *get_tangier_ops(void);
> >> >>
> >>
> >> --
> >> Sathyanarayanan Kuppuswamy
> >> Android kernel developer
> >>

  reply	other threads:[~2014-10-20 17:55 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 " 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 [this message]
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
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=20141020175552.GF4529@psi-dev26.jf.intel.com \
    --to=david.a.cohen@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=bhelgaas@google.com \
    --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=mingo@redhat.com \
    --cc=ralf@linux-mips.org \
    --cc=sathyanarayanan.kuppuswamy@linux.intel.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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