* [PATCH 1/2] alchemy: fix warnings in db1x00/pb1000/pb1550 board setup code
@ 2009-10-18 14:04 Florian Fainelli
2009-10-19 11:12 ` Manuel Lauss
0 siblings, 1 reply; 7+ messages in thread
From: Florian Fainelli @ 2009-10-18 14:04 UTC (permalink / raw)
To: Ralf Baechle; +Cc: linux-mips, Manuel Lauss
This patch fixes warnings due to potentially unused
variables in board setup code or mixed variables
declaration and code (forbidden by ISO C90).
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
diff --git a/arch/mips/alchemy/devboards/db1x00/board_setup.c b/arch/mips/alchemy/devboards/db1x00/board_setup.c
index 64eb26f..7aee14d 100644
--- a/arch/mips/alchemy/devboards/db1x00/board_setup.c
+++ b/arch/mips/alchemy/devboards/db1x00/board_setup.c
@@ -85,12 +85,14 @@ void board_reset(void)
void __init board_setup(void)
{
unsigned long bcsr1, bcsr2;
- u32 pin_func = 0;
+ u32 pin_func;
char *argptr;
bcsr1 = DB1000_BCSR_PHYS_ADDR;
bcsr2 = DB1000_BCSR_PHYS_ADDR + DB1000_BCSR_HEXLED_OFS;
+ pin_func = 0;
+
#ifdef CONFIG_MIPS_DB1000
printk(KERN_INFO "AMD Alchemy Au1000/Db1000 Board\n");
#endif
diff --git a/arch/mips/alchemy/devboards/pb1000/board_setup.c b/arch/mips/alchemy/devboards/pb1000/board_setup.c
index 287d661..50fff50 100644
--- a/arch/mips/alchemy/devboards/pb1000/board_setup.c
+++ b/arch/mips/alchemy/devboards/pb1000/board_setup.c
@@ -46,9 +46,13 @@ void __init board_setup(void)
u32 pin_func, static_cfg0;
u32 sys_freqctrl, sys_clksrc;
u32 prid = read_c0_prid();
+ char *argptr;
+
+ sys_freqctrl = 0;
+ sys_clksrc = 0;
+ argptr = prom_getcmdline();
#ifdef CONFIG_SERIAL_8250_CONSOLE
- char *argptr = prom_getcmdline();
argptr = strstr(argptr, "console=");
if (argptr == NULL) {
argptr = prom_getcmdline();
diff --git a/arch/mips/alchemy/devboards/pb1550/board_setup.c b/arch/mips/alchemy/devboards/pb1550/board_setup.c
index bb41740..0d060c3 100644
--- a/arch/mips/alchemy/devboards/pb1550/board_setup.c
+++ b/arch/mips/alchemy/devboards/pb1550/board_setup.c
@@ -56,14 +56,13 @@ void board_reset(void)
void __init board_setup(void)
{
u32 pin_func;
+ char *argptr;
bcsr_init(PB1550_BCSR_PHYS_ADDR,
PB1550_BCSR_PHYS_ADDR + PB1550_BCSR_HEXLED_OFS);
-
-#ifdef CONFIG_SERIAL_8250_CONSOLE
- char *argptr;
argptr = prom_getcmdline();
+#ifdef CONFIG_SERIAL_8250_CONSOLE
argptr = strstr(argptr, "console=");
if (argptr == NULL) {
argptr = prom_getcmdline();
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] alchemy: fix warnings in db1x00/pb1000/pb1550 board setup code
2009-10-18 14:04 [PATCH 1/2] alchemy: fix warnings in db1x00/pb1000/pb1550 board setup code Florian Fainelli
@ 2009-10-19 11:12 ` Manuel Lauss
2009-10-19 11:12 ` Manuel Lauss
2009-11-02 11:29 ` Ralf Baechle
0 siblings, 2 replies; 7+ messages in thread
From: Manuel Lauss @ 2009-10-19 11:12 UTC (permalink / raw)
To: Florian Fainelli; +Cc: Ralf Baechle, linux-mips
[-- Attachment #1: Type: text/plain, Size: 38 bytes --]
I like it, thank you!
Manuel
[-- Attachment #2: Type: text/html, Size: 49 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] alchemy: fix warnings in db1x00/pb1000/pb1550 board setup code
2009-10-19 11:12 ` Manuel Lauss
@ 2009-10-19 11:12 ` Manuel Lauss
2009-11-02 11:29 ` Ralf Baechle
1 sibling, 0 replies; 7+ messages in thread
From: Manuel Lauss @ 2009-10-19 11:12 UTC (permalink / raw)
To: Florian Fainelli; +Cc: Ralf Baechle, linux-mips
[-- Attachment #1: Type: text/plain, Size: 38 bytes --]
I like it, thank you!
Manuel
[-- Attachment #2: Type: text/html, Size: 49 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] alchemy: fix warnings in db1x00/pb1000/pb1550 board setup code
2009-10-19 11:12 ` Manuel Lauss
2009-10-19 11:12 ` Manuel Lauss
@ 2009-11-02 11:29 ` Ralf Baechle
2009-11-02 11:43 ` Manuel Lauss
1 sibling, 1 reply; 7+ messages in thread
From: Ralf Baechle @ 2009-11-02 11:29 UTC (permalink / raw)
To: Manuel Lauss; +Cc: Florian Fainelli, linux-mips
On Mon, Oct 19, 2009 at 01:12:15PM +0200, Manuel Lauss wrote:
> I like it, thank you!
Except that it a) does things the comments don't mention and b) doesn't
apply on top of master or -queue ...
Ralf
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] alchemy: fix warnings in db1x00/pb1000/pb1550 board setup code
2009-11-02 11:29 ` Ralf Baechle
@ 2009-11-02 11:43 ` Manuel Lauss
2009-11-02 11:43 ` Manuel Lauss
2009-11-02 13:01 ` Ralf Baechle
0 siblings, 2 replies; 7+ messages in thread
From: Manuel Lauss @ 2009-11-02 11:43 UTC (permalink / raw)
To: Ralf Baechle; +Cc: Florian Fainelli, linux-mips
On Mon, Nov 2, 2009 at 12:29 PM, Ralf Baechle <ralf@linux-mips.org> wrote:
> On Mon, Oct 19, 2009 at 01:12:15PM +0200, Manuel Lauss wrote:
>
>> I like it, thank you!
>
> Except that it a) does things the comments don't mention and b) doesn't
It does eliminate all the "variable may be unused"-type warnings...
> apply on top of master or -queue ...
It did apply against -queue when Floarian initally sent it. If he doesn't
resurface in the next few days I'll send an update version.
Manuel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] alchemy: fix warnings in db1x00/pb1000/pb1550 board setup code
2009-11-02 11:43 ` Manuel Lauss
@ 2009-11-02 11:43 ` Manuel Lauss
2009-11-02 13:01 ` Ralf Baechle
1 sibling, 0 replies; 7+ messages in thread
From: Manuel Lauss @ 2009-11-02 11:43 UTC (permalink / raw)
To: Ralf Baechle; +Cc: Florian Fainelli, linux-mips
On Mon, Nov 2, 2009 at 12:29 PM, Ralf Baechle <ralf@linux-mips.org> wrote:
> On Mon, Oct 19, 2009 at 01:12:15PM +0200, Manuel Lauss wrote:
>
>> I like it, thank you!
>
> Except that it a) does things the comments don't mention and b) doesn't
It does eliminate all the "variable may be unused"-type warnings...
> apply on top of master or -queue ...
It did apply against -queue when Floarian initally sent it. If he doesn't
resurface in the next few days I'll send an update version.
Manuel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] alchemy: fix warnings in db1x00/pb1000/pb1550 board setup code
2009-11-02 11:43 ` Manuel Lauss
2009-11-02 11:43 ` Manuel Lauss
@ 2009-11-02 13:01 ` Ralf Baechle
1 sibling, 0 replies; 7+ messages in thread
From: Ralf Baechle @ 2009-11-02 13:01 UTC (permalink / raw)
To: Manuel Lauss; +Cc: Florian Fainelli, linux-mips
On Mon, Nov 02, 2009 at 12:43:20PM +0100, Manuel Lauss wrote:
> On Mon, Nov 2, 2009 at 12:29 PM, Ralf Baechle <ralf@linux-mips.org> wrote:
> > On Mon, Oct 19, 2009 at 01:12:15PM +0200, Manuel Lauss wrote:
> >
> >> I like it, thank you!
> >
> > Except that it a) does things the comments don't mention and b) doesn't
>
> It does eliminate all the "variable may be unused"-type warnings...
>
>
> > apply on top of master or -queue ...
>
> It did apply against -queue when Floarian initally sent it. If he doesn't
> resurface in the next few days I'll send an update version.
My bad. Applied now.
Ralf
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-11-02 12:59 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-18 14:04 [PATCH 1/2] alchemy: fix warnings in db1x00/pb1000/pb1550 board setup code Florian Fainelli
2009-10-19 11:12 ` Manuel Lauss
2009-10-19 11:12 ` Manuel Lauss
2009-11-02 11:29 ` Ralf Baechle
2009-11-02 11:43 ` Manuel Lauss
2009-11-02 11:43 ` Manuel Lauss
2009-11-02 13:01 ` Ralf Baechle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).