Re: [U-Boot] [RFC][PATCH] Code Clean-up (weak functions)

2008-12-25 Thread Shinya Kuribayashi
Joakim Tjernlund wrote: > Checking for NULL before invocation won't work unless you fix the relocation > routine not to relocate NULL values. That is what I have been trying to say > several times now. That fix should be performed regardless so no nasty > surprises will happen in the future. Perhap

Re: [U-Boot] [RFC][PATCH] Code Clean-up (weak functions)

2008-12-25 Thread Joakim Tjernlund
> -Original Message- > From: Shinya Kuribayashi [mailto:skuri...@ruby.dti.ne.jp] > Sent: den 24 december 2008 17:55 > To: Joakim Tjernlund > Cc: 'Shinya Kuribayashi'; 'Graeme Russ'; u-boot@lists.denx.de > Subject: Re: [U-Boot] [RFC][PATCH] Code

Re: [U-Boot] [RFC][PATCH] Code Clean-up (weak functions)

2008-12-25 Thread Graeme Russ
On Thu, Dec 25, 2008 at 11:56 AM, Shinya Kuribayashi wrote: > Remy Bohmer wrote: >> Create a default fallback routine that can be used if there is no >> strong implementation: >> --- >> __attribute__((weak)) un

Re: [U-Boot] [RFC][PATCH] Code Clean-up (weak functions)

2008-12-25 Thread Graeme Russ
On Wed, Dec 24, 2008 at 12:14 PM, Shinya Kuribayashi wrote: > Graeme Russ wrote: >> [Snip] >> - All weak functions are declared as __function() in the source file with >> funtion() __attribute__((weak, alias("function"))); on the line >> immediately >> after the closing brace of __function(

Re: [U-Boot] [RFC][PATCH] Code Clean-up (weak functions)

2008-12-24 Thread Shinya Kuribayashi
Remy Bohmer wrote: > Create a default fallback routine that can be used if there is no > strong implementation: > --- > __attribute__((weak)) unsigned long long printk_clock(void) > { > return sched_cloc

Re: [U-Boot] [RFC][PATCH] Code Clean-up (weak functions)

2008-12-24 Thread Remy Bohmer
Hello All, All instances have been replaced by empty functions with an alias. e.g. void __do_something (args) {} do_something(args) __atttribute__((weak, alias("__do_something"))); > Good to know. This doc also helps: > http://docs.sun.com/app/docs/doc/817-1984/chapter2

Re: [U-Boot] [RFC][PATCH] Code Clean-up (weak functions)

2008-12-24 Thread Shinya Kuribayashi
Joakim Tjernlund wrote: >>> - There is no purely weak functions and therfore no longer code like: >>> if (do_something) >>> do_somthing(); >>> All instances have been replaced by empty functions with an alias. e.g. >>> void __do_something (args) {} >>> do_something(args) __att

Re: [U-Boot] [RFC][PATCH] Code Clean-up (weak functions)

2008-12-24 Thread Joakim Tjernlund
> > > - There is no purely weak functions and therfore no longer code like: > > if (do_something) > > do_somthing(); > > All instances have been replaced by empty functions with an alias. e.g. > > void __do_something (args) {} > > do_something(args) __atttribute__((weak, alia

Re: [U-Boot] [RFC][PATCH] Code Clean-up (weak functions)

2008-12-23 Thread Shinya Kuribayashi
Graeme Russ wrote: > This patch makes all definitions, declarations and usages of weak functions > consistent. > > Signed-off-by: Graeme Russ > --- > > WARNING: This patch hits a _lot_ of arches - Please > > The following patch applies the following rules: > > - All functions are defined with

Re: [U-Boot] [RFC][PATCH] Code Clean-up (weak functions)

2008-12-22 Thread Mike Frysinger
On Monday 22 December 2008 06:20:27 Graeme Russ wrote: > On Mon, Dec 22, 2008 at 10:44 PM, Mike Frysinger wrote: > > On Monday 22 December 2008 04:16:33 Graeme Russ wrote: > >> On Mon, Dec 22, 2008 at 8:05 PM, Mike Frysinger wrote: > >> > On Saturday 13 December 2008 00:26:26 Graeme Russ wrote: >

Re: [U-Boot] [RFC][PATCH] Code Clean-up (weak functions)

2008-12-22 Thread Graeme Russ
On Mon, Dec 22, 2008 at 10:44 PM, Mike Frysinger wrote: > On Monday 22 December 2008 04:16:33 Graeme Russ wrote: >> On Mon, Dec 22, 2008 at 8:05 PM, Mike Frysinger wrote: >> > On Saturday 13 December 2008 00:26:26 Graeme Russ wrote: >> >> This patch makes all definitions, declarations and usages o

Re: [U-Boot] [RFC][PATCH] Code Clean-up (weak functions)

2008-12-22 Thread Mike Frysinger
On Monday 22 December 2008 04:16:33 Graeme Russ wrote: > On Mon, Dec 22, 2008 at 8:05 PM, Mike Frysinger wrote: > > On Saturday 13 December 2008 00:26:26 Graeme Russ wrote: > >> This patch makes all definitions, declarations and usages of weak > >> functions consistent. > > > > a quick glance shows

Re: [U-Boot] [RFC][PATCH] Code Clean-up (weak functions)

2008-12-22 Thread Graeme Russ
Mike, On Mon, Dec 22, 2008 at 8:05 PM, Mike Frysinger wrote: > On Saturday 13 December 2008 00:26:26 Graeme Russ wrote: >> This patch makes all definitions, declarations and usages of weak functions >> consistent. > > a quick glance shows that it breaks things (the ELF and Blackfin stuff > certai

Re: [U-Boot] [RFC][PATCH] Code Clean-up (weak functions)

2008-12-22 Thread Mike Frysinger
On Saturday 13 December 2008 00:26:26 Graeme Russ wrote: > This patch makes all definitions, declarations and usages of weak functions > consistent. a quick glance shows that it breaks things (the ELF and Blackfin stuff certainly appears to be wrong). i'm guessing you focused on style for the RF

Re: [U-Boot] [RFC][PATCH] Code Clean-up (weak functions)

2008-12-14 Thread Graeme Russ
Remy Bohmer wrote: > Hello Graeme, > > 2008/12/13 Graeme Russ : >> This patch makes all definitions, declarations and usages of weak functions >> consistent. >> >> Signed-off-by: Graeme Russ > > Just curious: > What is the relation of this patch to the problem discussed earlier: > http://www.mai

Re: [U-Boot] [RFC][PATCH] Code Clean-up (weak functions)

2008-12-13 Thread Remy Bohmer
Hello Graeme, 2008/12/13 Graeme Russ : > This patch makes all definitions, declarations and usages of weak functions > consistent. > > Signed-off-by: Graeme Russ Just curious: What is the relation of this patch to the problem discussed earlier: http://www.mail-archive.com/u-boot@lists.denx.de/ms

[U-Boot] [RFC][PATCH] Code Clean-up (weak functions)

2008-12-12 Thread Graeme Russ
This patch makes all definitions, declarations and usages of weak functions consistent. Signed-off-by: Graeme Russ --- WARNING: This patch hits a _lot_ of arches - Please The following patch applies the following rules: - All functions are defined without __attribute__((weak)) in header files