public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] Fix warnings if compiling with IDE support.
@ 2008-07-23  5:30 Heiko Schocher
  2008-07-24  2:30 ` [U-Boot-Users] unassigned-patches/5: " u-boot at bugs.denx.de
  2008-07-29 22:30 ` [U-Boot-Users] " Wolfgang Denk
  0 siblings, 2 replies; 3+ messages in thread
From: Heiko Schocher @ 2008-07-23  5:30 UTC (permalink / raw)
  To: u-boot

Hello,

this patch fixes the following warnings, if compiling
u-boot with ide support.

[hs at pollux u-boot]$ make -s all
cmd_ide.c:827: Warnung: weak declaration of `ide_outb' after first use results in unspecified behavior
cmd_ide.c:839: Warnung: weak declaration of `ide_inb' after first use results in unspecified behavior
[hs at pollux u-boot]$

Signed-off-by: Heiko Schocher <hs@denx.de>
---
 common/cmd_ide.c |   46 ++++++++++++++++++++++------------------------
 1 files changed, 22 insertions(+), 24 deletions(-)

diff --git a/common/cmd_ide.c b/common/cmd_ide.c
index 6560702..948a9d2 100644
--- a/common/cmd_ide.c
+++ b/common/cmd_ide.c
@@ -161,8 +161,6 @@ static uchar ide_wait  (int dev, ulong t);

 #define IDE_SPIN_UP_TIME_OUT 5000 /* 5 sec spin-up timeout */

-void inline ide_outb(int dev, int port, unsigned char val);
-unsigned char inline ide_inb(int dev, int port);
 static void input_data(int dev, ulong *sect_buf, int words);
 static void output_data(int dev, ulong *sect_buf, int words);
 static void ident_cpy (unsigned char *dest, unsigned char *src, unsigned int len);
@@ -522,6 +520,28 @@ int do_diskboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])

 /* ------------------------------------------------------------------------- */

+void inline
+__ide_outb(int dev, int port, unsigned char val)
+{
+	debug ("ide_outb (dev= %d, port= 0x%x, val= 0x%02x) : @ 0x%08lx\n",
+		dev, port, val, (ATA_CURR_BASE(dev)+CFG_ATA_PORT_ADDR(port)));
+	outb(val, (ATA_CURR_BASE(dev)+CFG_ATA_PORT_ADDR(port)));
+}
+void inline ide_outb (int dev, int port, unsigned char val)
+		__attribute__((weak, alias("__ide_outb")));
+
+unsigned char inline
+__ide_inb(int dev, int port)
+{
+	uchar val;
+	val = inb((ATA_CURR_BASE(dev)+CFG_ATA_PORT_ADDR(port)));
+	debug ("ide_inb (dev= %d, port= 0x%x) : @ 0x%08lx -> 0x%02x\n",
+		dev, port, (ATA_CURR_BASE(dev)+CFG_ATA_PORT_ADDR(port)), val);
+	return val;
+}
+unsigned char inline ide_inb(int dev, int port)
+			__attribute__((weak, alias("__ide_inb")));
+
 void ide_init (void)
 {

@@ -816,28 +836,6 @@ set_pcmcia_timing (int pmode)

 /* ------------------------------------------------------------------------- */

-void inline
-__ide_outb(int dev, int port, unsigned char val)
-{
-	debug ("ide_outb (dev= %d, port= 0x%x, val= 0x%02x) : @ 0x%08lx\n",
-		dev, port, val, (ATA_CURR_BASE(dev)+CFG_ATA_PORT_ADDR(port)));
-	outb(val, (ATA_CURR_BASE(dev)+CFG_ATA_PORT_ADDR(port)));
-}
-void inline ide_outb (int dev, int port, unsigned char val)
-		__attribute__((weak, alias("__ide_outb")));
-
-unsigned char inline
-__ide_inb(int dev, int port)
-{
-	uchar val;
-	val = inb((ATA_CURR_BASE(dev)+CFG_ATA_PORT_ADDR(port)));
-	debug ("ide_inb (dev= %d, port= 0x%x) : @ 0x%08lx -> 0x%02x\n",
-		dev, port, (ATA_CURR_BASE(dev)+CFG_ATA_PORT_ADDR(port)), val);
-	return val;
-}
-unsigned char inline ide_inb(int dev, int port)
-			__attribute__((weak, alias("__ide_inb")));
-
 #ifdef __PPC__
 # ifdef CONFIG_AMIGAONEG3SE
 static void
-- 
1.5.6.1


-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot-Users] unassigned-patches/5: [PATCH] Fix warnings if compiling with IDE support.
  2008-07-23  5:30 [U-Boot-Users] [PATCH] Fix warnings if compiling with IDE support Heiko Schocher
@ 2008-07-24  2:30 ` u-boot at bugs.denx.de
  2008-07-29 22:30 ` [U-Boot-Users] " Wolfgang Denk
  1 sibling, 0 replies; 3+ messages in thread
From: u-boot at bugs.denx.de @ 2008-07-24  2:30 UTC (permalink / raw)
  To: u-boot

Hello,

this patch fixes the following warnings, if compiling
u-boot with ide support.

[hs at pollux u-boot]$ make -s all
cmd_ide.c:827: Warnung: weak declaration of `ide_outb' after first use results in unspecified behavior
cmd_ide.c:839: Warnung: weak declaration of `ide_inb' after first use results in unspecified behavior
[hs at pollux u-boot]$

Signed-off-by: Heiko Schocher <hs@denx.de>

---
Added to GNATS database as unassigned-patches/5
>Responsible:    patch-coord
>Message-Id:     <4886C206.8040608@denx.de>
>In-Reply-To:    
>References:     
>Patch-Date:     Wed Jul 23 07:30:46 +0200 2008
---
 common/cmd_ide.c |   46 ++++++++++++++++++++++------------------------
 1 files changed, 22 insertions(+), 24 deletions(-)

diff --git a/common/cmd_ide.c b/common/cmd_ide.c
index 6560702..948a9d2 100644
--- a/common/cmd_ide.c
+++ b/common/cmd_ide.c
@@ -161,8 +161,6 @@ static uchar ide_wait  (int dev, ulong t);

 #define IDE_SPIN_UP_TIME_OUT 5000 /* 5 sec spin-up timeout */

-void inline ide_outb(int dev, int port, unsigned char val);
-unsigned char inline ide_inb(int dev, int port);
 static void input_data(int dev, ulong *sect_buf, int words);
 static void output_data(int dev, ulong *sect_buf, int words);
 static void ident_cpy (unsigned char *dest, unsigned char *src, unsigned int len);
@@ -522,6 +520,28 @@ int do_diskboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])

 /* ------------------------------------------------------------------------- */

+void inline
+__ide_outb(int dev, int port, unsigned char val)
+{
+	debug ("ide_outb (dev= %d, port= 0x%x, val= 0x%02x) : @ 0x%08lx\n",
+		dev, port, val, (ATA_CURR_BASE(dev)+CFG_ATA_PORT_ADDR(port)));
+	outb(val, (ATA_CURR_BASE(dev)+CFG_ATA_PORT_ADDR(port)));
+}
+void inline ide_outb (int dev, int port, unsigned char val)
+		__attribute__((weak, alias("__ide_outb")));
+
+unsigned char inline
+__ide_inb(int dev, int port)
+{
+	uchar val;
+	val = inb((ATA_CURR_BASE(dev)+CFG_ATA_PORT_ADDR(port)));
+	debug ("ide_inb (dev= %d, port= 0x%x) : @ 0x%08lx -> 0x%02x\n",
+		dev, port, (ATA_CURR_BASE(dev)+CFG_ATA_PORT_ADDR(port)), val);
+	return val;
+}
+unsigned char inline ide_inb(int dev, int port)
+			__attribute__((weak, alias("__ide_inb")));
+
 void ide_init (void)
 {

@@ -816,28 +836,6 @@ set_pcmcia_timing (int pmode)

 /* ------------------------------------------------------------------------- */

-void inline
-__ide_outb(int dev, int port, unsigned char val)
-{
-	debug ("ide_outb (dev= %d, port= 0x%x, val= 0x%02x) : @ 0x%08lx\n",
-		dev, port, val, (ATA_CURR_BASE(dev)+CFG_ATA_PORT_ADDR(port)));
-	outb(val, (ATA_CURR_BASE(dev)+CFG_ATA_PORT_ADDR(port)));
-}
-void inline ide_outb (int dev, int port, unsigned char val)
-		__attribute__((weak, alias("__ide_outb")));
-
-unsigned char inline
-__ide_inb(int dev, int port)
-{
-	uchar val;
-	val = inb((ATA_CURR_BASE(dev)+CFG_ATA_PORT_ADDR(port)));
-	debug ("ide_inb (dev= %d, port= 0x%x) : @ 0x%08lx -> 0x%02x\n",
-		dev, port, (ATA_CURR_BASE(dev)+CFG_ATA_PORT_ADDR(port)), val);
-	return val;
-}
-unsigned char inline ide_inb(int dev, int port)
-			__attribute__((weak, alias("__ide_inb")));
-
 #ifdef __PPC__
 # ifdef CONFIG_AMIGAONEG3SE
 static void
-- 
1.5.6.1


-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot-Users] [PATCH] Fix warnings if compiling with IDE support.
  2008-07-23  5:30 [U-Boot-Users] [PATCH] Fix warnings if compiling with IDE support Heiko Schocher
  2008-07-24  2:30 ` [U-Boot-Users] unassigned-patches/5: " u-boot at bugs.denx.de
@ 2008-07-29 22:30 ` Wolfgang Denk
  1 sibling, 0 replies; 3+ messages in thread
From: Wolfgang Denk @ 2008-07-29 22:30 UTC (permalink / raw)
  To: u-boot

In message <4886C206.8040608@denx.de> you wrote:
> Hello,
> 
> this patch fixes the following warnings, if compiling
> u-boot with ide support.
> 
> [hs at pollux u-boot]$ make -s all
> cmd_ide.c:827: Warnung: weak declaration of `ide_outb' after first use results in unspecified behavior
> cmd_ide.c:839: Warnung: weak declaration of `ide_inb' after first use results in unspecified behavior
> [hs at pollux u-boot]$
> 
> Signed-off-by: Heiko Schocher <hs@denx.de>
> ---
>  common/cmd_ide.c |   46 ++++++++++++++++++++++------------------------
>  1 files changed, 22 insertions(+), 24 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
If today is the first day of the rest of your life, what the hell was
yesterday?

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-07-29 22:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-23  5:30 [U-Boot-Users] [PATCH] Fix warnings if compiling with IDE support Heiko Schocher
2008-07-24  2:30 ` [U-Boot-Users] unassigned-patches/5: " u-boot at bugs.denx.de
2008-07-29 22:30 ` [U-Boot-Users] " Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox