public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <matthew@wil.cx>
To: Greg Kroah-Hartman <gregkh@suse.de>
Cc: linux-pci@atrey.karlin.mff.cuni.cz,
	Michael Ellerman <michael@ellerman.id.au>,
	linux-kernel@vger.kernel.org, Linus Torvalds <torvalds@osdl.org>
Subject: Re: [PATCH 05/34] PCI: Use a weak symbol for the empty version of pcibios_add_platform_entries()
Date: Wed, 11 Jul 2007 17:49:22 -0600	[thread overview]
Message-ID: <20070711234922.GW9704@parisc-linux.org> (raw)
In-Reply-To: <11841967361726-git-send-email-gregkh@suse.de>

On Wed, Jul 11, 2007 at 04:31:19PM -0700, Greg Kroah-Hartman wrote:
> I'm not sure if this is going to fly, weak symbols work on the compilers I'm
> using, but whether they work for all of the affected architectures I can't say.
> I've cc'ed as many arch maintainers/lists as I could find.
> 
> But assuming they do, we can use a weak empty definition of
> pcibios_add_platform_entries() to avoid having an empty definition on every
> arch.

This seems like a regression.  We go from having an empty inline
function that gets optimised away to 0 to having a function call to a
trivial function.  And on any architecture that *does* define this,
(unless I misunderstand the GCC manual), we still include the weak
definition, thus wasting space.

I don't think this is a good use of weak functions.  It's perfectly
normal to have header files filled with empty functions.  They're even
good documentation for what an architecture might want to fill in,
rather than invent their own mechanism for doing something.

-- 
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."

  parent reply	other threads:[~2007-07-12  0:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-11 23:30 [GIT PATCH] PCI patches for 2.6.22 Greg KH
     [not found] ` <11841967082916-git-send-email-gregkh@suse.de>
     [not found]   ` <1184196712526-git-send-email-gregkh@suse.de>
     [not found]     ` <11841967172946-git-send-email-gregkh@suse.de>
     [not found]       ` <11841967322884-git-send-email-gregkh@suse.de>
     [not found]         ` <11841967361726-git-send-email-gregkh@suse.de>
2007-07-11 23:49           ` Matthew Wilcox [this message]
2007-07-12  0:39             ` [PATCH 05/34] PCI: Use a weak symbol for the empty version of pcibios_add_platform_entries() Greg KH
2007-07-12  0:54               ` Matthew Wilcox
2007-07-12  1:53                 ` Michael Ellerman

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=20070711234922.GW9704@parisc-linux.org \
    --to=matthew@wil.cx \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@atrey.karlin.mff.cuni.cz \
    --cc=michael@ellerman.id.au \
    --cc=torvalds@osdl.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