From: Linus Torvalds <torvalds@linux-foundation.org>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: linux-arch@vger.kernel.org,
Parisc List <linux-parisc@vger.kernel.org>,
linux-ia64@vger.kernel.org, linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] Correct printk %pF to work on all architectures
Date: Wed, 3 Sep 2008 15:54:43 -0700 (PDT) [thread overview]
Message-ID: <alpine.LFD.1.10.0809031546310.3515@nehalem.linux-foundation.org> (raw)
In-Reply-To: <1220481754.3254.42.camel@localhost.localdomain>
On Wed, 3 Sep 2008, James Bottomley wrote:
>
> Is that finally final? because the last time I tried to do the above
> for a voyager override I was told weak functions were the preferred
> method ...
Weak functions are fine IF THEY DO SOMETHING REAL AND SHOULD BE FUNCTIONS
IN THE FIRST PLACE!
IOW, if the default behaviour is actually something that should be a
function, then a weak function is the simplest and most appropriate way of
doing thigns.
But if the default behaviour is to not do anything at all, then a weak
function simply doesn't work - because it will always generate that stupid
and useless function call. And then you have to have per-architecture
inline functions.
And in order to avoid having all 99 architectures that don't care at all
add an empty inline function, then you essentially have to use a #define
to allow us to detect at compile-time that no function existed.
> Anyway, it's easy to do (if a slightly larger diff) ... I have to move
> the prototype from include/kernel.h to include/module.h because I need
> an assured asm/xxx include before it to get the override.
I don't really see what this has to do with module.h, though.
Why do this in <linux/module.h>? Why not just do it in lib/vsptintf.c
which is the only place that cares? None of this needs to pollute the
generic header files that simply don't care.
Linus
WARNING: multiple messages have this Message-ID (diff)
From: Linus Torvalds <torvalds@linux-foundation.org>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: linux-arch@vger.kernel.org,
Parisc List <linux-parisc@vger.kernel.org>,
linux-ia64@vger.kernel.org, linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] Correct printk %pF to work on all architectures
Date: Wed, 03 Sep 2008 22:54:43 +0000 [thread overview]
Message-ID: <alpine.LFD.1.10.0809031546310.3515@nehalem.linux-foundation.org> (raw)
In-Reply-To: <1220481754.3254.42.camel@localhost.localdomain>
On Wed, 3 Sep 2008, James Bottomley wrote:
>
> Is that finally final? because the last time I tried to do the above
> for a voyager override I was told weak functions were the preferred
> method ...
Weak functions are fine IF THEY DO SOMETHING REAL AND SHOULD BE FUNCTIONS
IN THE FIRST PLACE!
IOW, if the default behaviour is actually something that should be a
function, then a weak function is the simplest and most appropriate way of
doing thigns.
But if the default behaviour is to not do anything at all, then a weak
function simply doesn't work - because it will always generate that stupid
and useless function call. And then you have to have per-architecture
inline functions.
And in order to avoid having all 99 architectures that don't care at all
add an empty inline function, then you essentially have to use a #define
to allow us to detect at compile-time that no function existed.
> Anyway, it's easy to do (if a slightly larger diff) ... I have to move
> the prototype from include/kernel.h to include/module.h because I need
> an assured asm/xxx include before it to get the override.
I don't really see what this has to do with module.h, though.
Why do this in <linux/module.h>? Why not just do it in lib/vsptintf.c
which is the only place that cares? None of this needs to pollute the
generic header files that simply don't care.
Linus
WARNING: multiple messages have this Message-ID (diff)
From: Linus Torvalds <torvalds@linux-foundation.org>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: linux-arch@vger.kernel.org, linuxppc-dev@ozlabs.org,
linux-ia64@vger.kernel.org,
Parisc List <linux-parisc@vger.kernel.org>
Subject: Re: [PATCH] Correct printk %pF to work on all architectures
Date: Wed, 3 Sep 2008 15:54:43 -0700 (PDT) [thread overview]
Message-ID: <alpine.LFD.1.10.0809031546310.3515@nehalem.linux-foundation.org> (raw)
In-Reply-To: <1220481754.3254.42.camel@localhost.localdomain>
On Wed, 3 Sep 2008, James Bottomley wrote:
>
> Is that finally final? because the last time I tried to do the above
> for a voyager override I was told weak functions were the preferred
> method ...
Weak functions are fine IF THEY DO SOMETHING REAL AND SHOULD BE FUNCTIONS
IN THE FIRST PLACE!
IOW, if the default behaviour is actually something that should be a
function, then a weak function is the simplest and most appropriate way of
doing thigns.
But if the default behaviour is to not do anything at all, then a weak
function simply doesn't work - because it will always generate that stupid
and useless function call. And then you have to have per-architecture
inline functions.
And in order to avoid having all 99 architectures that don't care at all
add an empty inline function, then you essentially have to use a #define
to allow us to detect at compile-time that no function existed.
> Anyway, it's easy to do (if a slightly larger diff) ... I have to move
> the prototype from include/kernel.h to include/module.h because I need
> an assured asm/xxx include before it to get the override.
I don't really see what this has to do with module.h, though.
Why do this in <linux/module.h>? Why not just do it in lib/vsptintf.c
which is the only place that cares? None of this needs to pollute the
generic header files that simply don't care.
Linus
next prev parent reply other threads:[~2008-09-03 22:54 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-03 20:18 [PATCH] Correct printk %pF to work on all architectures James Bottomley
2008-09-03 20:18 ` James Bottomley
2008-09-03 20:18 ` James Bottomley
2008-09-03 21:22 ` Linus Torvalds
2008-09-03 21:22 ` Linus Torvalds
2008-09-03 21:22 ` Linus Torvalds
2008-09-03 22:42 ` James Bottomley
2008-09-03 22:42 ` James Bottomley
2008-09-03 22:42 ` James Bottomley
2008-09-03 22:42 ` James Bottomley
2008-09-03 22:54 ` Linus Torvalds [this message]
2008-09-03 22:54 ` Linus Torvalds
2008-09-03 22:54 ` Linus Torvalds
2008-09-03 23:00 ` James Bottomley
2008-09-03 23:00 ` James Bottomley
2008-09-03 23:00 ` James Bottomley
2008-09-03 23:15 ` Linus Torvalds
2008-09-03 23:15 ` Linus Torvalds
2008-09-03 23:15 ` Linus Torvalds
2008-09-03 23:33 ` James Bottomley
2008-09-03 23:33 ` James Bottomley
2008-09-03 23:33 ` James Bottomley
2008-09-04 0:01 ` Linus Torvalds
2008-09-04 0:01 ` Linus Torvalds
2008-09-04 0:01 ` Linus Torvalds
2008-09-04 1:43 ` James Bottomley
2008-09-04 1:43 ` James Bottomley
2008-09-04 1:43 ` James Bottomley
2008-09-04 22:36 ` Benjamin Herrenschmidt
2008-09-04 22:36 ` Benjamin Herrenschmidt
2008-09-04 22:36 ` Benjamin Herrenschmidt
2008-09-04 23:07 ` Luck, Tony
2008-09-04 23:07 ` Luck, Tony
2008-09-04 23:07 ` Luck, Tony
2008-09-09 14:12 ` James Bottomley
2008-09-09 14:12 ` James Bottomley
2008-09-09 14:12 ` James Bottomley
2008-09-09 18:08 ` Kyle McMartin
2008-09-09 18:08 ` Kyle McMartin
2008-09-09 18:08 ` Kyle McMartin
2008-09-09 22:05 ` Benjamin Herrenschmidt
2008-09-09 22:05 ` Benjamin Herrenschmidt
2008-09-09 22:05 ` Benjamin Herrenschmidt
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=alpine.LFD.1.10.0809031546310.3515@nehalem.linux-foundation.org \
--to=torvalds@linux-foundation.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-parisc@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.