All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] PATCH: Fixed PPC4xx compilation warning in 4xx_enet.c
@ 2009-06-17 16:37 Alessio Centazzo
  2009-06-23  8:32 ` Stefan Roese
  0 siblings, 1 reply; 2+ messages in thread
From: Alessio Centazzo @ 2009-06-17 16:37 UTC (permalink / raw)
  To: u-boot


This patch fixes a compilation warning for some Ethernet PHY-less PPC4xx platforms (440SPE based ones) and a potential compilation error for 440SP platforms (use of undefined 'ethgroup' variable).  In the original code and in case of 440SPE platforms, 'ethgroup' is initialized to -1 and never modified.  Later in the function, within an #ifdef statement, an 'if statement' executes code only if 'ethgroup' is set to 4, therefore it is harmless to avoid executing the 'if statement' by removing the CONFIG_440SPE from the affected #ifdefs.  In case of 440SP platforms  with on-board Ethernet PHY, 'ethgroup' is undefined but used (there are not such platforms in the repository yet). All other architectures are not affected by this
change.
This is the current warning message with a Ethernet PHY-less 440SPE platform build (there is not such platform in the repository yet):

4xx_enet.c: In function 'ppc_4xx_eth_init':
4xx_enet.c:880: warning: unused variable 'ethgroup'

Signed-off-by: Alessio Centazzo acpatin {AT} yahoo {DOT} com

diff -Nau u-boot-2009.06/drivers/net/4xx_enet.c.orig u-boot-2009.06/drivers/net/4xx_enet.c
--- u-boot-2009.06/drivers/net/4xx_enet.c.orig    2009-06-14 12:30:39.000000000 -0700
+++ u-boot-2009.06/drivers/net/4xx_enet.c    2009-06-17 08:34:54.000000000 -0700
@@ -873,7 +873,7 @@
     defined(CONFIG_405EX)
     u32 opbfreq;
     sys_info_t sysinfo;
-#if defined(CONFIG_440GX) || defined(CONFIG_440SPE) || \
+#if defined(CONFIG_440GX) || \
     defined(CONFIG_440EPX) || defined(CONFIG_440GRX) || \
     defined(CONFIG_460EX) || defined(CONFIG_460GT) || \
     defined(CONFIG_405EX)
@@ -1122,7 +1122,6 @@
 
 #if defined(CONFIG_440GX) || \
     defined(CONFIG_440EPX) || defined(CONFIG_440GRX) || \
-    defined(CONFIG_440SP) || defined(CONFIG_440SPE) || \
     defined(CONFIG_460EX) || defined(CONFIG_460GT) || \
     defined(CONFIG_405EX)


      

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

* [U-Boot] PATCH: Fixed PPC4xx compilation warning in 4xx_enet.c
  2009-06-17 16:37 [U-Boot] PATCH: Fixed PPC4xx compilation warning in 4xx_enet.c Alessio Centazzo
@ 2009-06-23  8:32 ` Stefan Roese
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Roese @ 2009-06-23  8:32 UTC (permalink / raw)
  To: u-boot

Hi Alessio,

same comment to this patch as in my previous review. Please use git tools to 
create and send patches. Patch doesn't apply:

[stefan at stefan-desktop u-boot-ppc4xx (master)]$ git am patches_misc/PATCH\:\ 
Fixed\ PPC4xx\ compilation\ warning\ in\ 4xx_enet.mbox
Applying: PATCH: Fixed PPC4xx compilation warning in 4xx_enet.c
error: patch failed: drivers/net/4xx_enet.c:873
error: drivers/net/4xx_enet.c: patch does not apply
Patch failed at 0001 PATCH: Fixed PPC4xx compilation warning in 4xx_enet.c
When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip".
To restore the original branch and stop patching run "git am --abort".

Please fix and resubmit. Thanks.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================

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

end of thread, other threads:[~2009-06-23  8:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-17 16:37 [U-Boot] PATCH: Fixed PPC4xx compilation warning in 4xx_enet.c Alessio Centazzo
2009-06-23  8:32 ` Stefan Roese

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.