Re: [U-Boot] [PATCH] ppc4xx: Add Sequoia RAM-booting target

2009-05-08 Thread Detlev Zundel
Hi Stefan, So what should I do now? Should I revert to another #ifdef in the variable declaration? Or is the current version ok? I'm not too sure myself. What really tickles me, and what speaks against using this attribute, is the fact that the unused attribute is itself not part of an

Re: [U-Boot] [PATCH] ppc4xx: Add Sequoia RAM-booting target

2009-05-07 Thread Detlev Zundel
Hi Stefan, This patch adds another build target for the AMCC Sequoia PPC440EPx eval board. This RAM-booting version is targeted for boards without NOR FLASH (NAND booting) which need a possibility to initially program their NAND FLASH. Using a JTAG debugger (e.g. BDI2000/3000) configured to

Re: [U-Boot] [PATCH] ppc4xx: Add Sequoia RAM-booting target

2009-05-07 Thread Stefan Roese
Hi Detlev, On Thursday 07 May 2009, Detlev Zundel wrote: int misc_init_r(void) { - uint pbcr; - int size_val = 0; - u32 reg; + __attribute__((unused)) uint pbcr; + __attribute__((unused)) int size_val = 0; + __attribute__((unused)) u32 reg; Am I correct to assume

Re: [U-Boot] [PATCH] ppc4xx: Add Sequoia RAM-booting target

2009-05-07 Thread Detlev Zundel
Hi Stefan, Hi Detlev, On Thursday 07 May 2009, Detlev Zundel wrote: int misc_init_r(void) { - uint pbcr; - int size_val = 0; - u32 reg; + __attribute__((unused)) uint pbcr; + __attribute__((unused)) int size_val = 0; + __attribute__((unused)) u32 reg; Am I correct to

Re: [U-Boot] [PATCH] ppc4xx: Add Sequoia RAM-booting target

2009-05-07 Thread Stefan Roese
On Thursday 07 May 2009, Detlev Zundel wrote: If so, it still seems to be a somewhat rude way to do it. How long will it take the gcc maintainers to produce a warning: unused variable is used warning? ;) I prefer to do it this way instead of encasing the variable declaration into

Re: [U-Boot] [PATCH] ppc4xx: Add Sequoia RAM-booting target

2009-05-07 Thread Wolfgang Denk
Dear Stefan, In message 200905071530.43940...@denx.de you wrote: On Thursday 07 May 2009, Detlev Zundel wrote: int misc_init_r(void) { - uint pbcr; - int size_val = 0; - u32 reg; + __attribute__((unused)) uint pbcr; + __attribute__((unused)) int size_val = 0; +

Re: [U-Boot] [PATCH] ppc4xx: Add Sequoia RAM-booting target

2009-05-07 Thread Wolfgang Denk
Dear Stefan, in message 200905071739.56301...@denx.de you wrote: Linux kernel btw. Here the macro __maybe_unsed is defined to __attribute__((unused)). In many cases? a rgrep on a recent kernel counts 84 incantations, which is not much for the Linux kernel, I believe. Perhaps it's

Re: [U-Boot] [PATCH] ppc4xx: Add Sequoia RAM-booting target

2009-05-07 Thread Scott Wood
Wolfgang Denk wrote: Dear Stefan, in message 200905071739.56301...@denx.de you wrote: Linux kernel btw. Here the macro __maybe_unsed is defined to __attribute__((unused)). In many cases? a rgrep on a recent kernel counts 84 incantations, which is not much for the Linux kernel, I believe.

Re: [U-Boot] [PATCH] ppc4xx: Add Sequoia RAM-booting target

2009-05-07 Thread Stefan Roese
Hi Wolfgang, On Thursday 07 May 2009, Wolfgang Denk wrote: Perhaps it's quite new to the Linux kernel. I just spotted it the first time a few weeks ago and thought: What a nice way to remove some of the ugly #ifdef's in U-Boot!. :) My understanding was that this is (only?) intended