diff mbox

[U-Boot,2/2] am33xx: CONFIG_REVISION_TAG ifdef check for get_board_rev

Message ID 1437052221-11040-2-git-send-email-contact@paulk.fr
State Changes Requested
Delegated to: Tom Rini
Headers show

Commit Message

Paul Kocialkowski July 16, 2015, 1:10 p.m. UTC
Despite being defined with __weak, this declaration of get_board_rev will
conflict with the fallback one when ONFIG_REVISION_TAG is not defined.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
---
 arch/arm/cpu/armv7/am33xx/sys_info.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Tom Rini July 16, 2015, 1:20 p.m. UTC | #1
On Thu, Jul 16, 2015 at 03:10:21PM +0200, Paul Kocialkowski wrote:

> Despite being defined with __weak, this declaration of get_board_rev will
> conflict with the fallback one when ONFIG_REVISION_TAG is not defined.
> 
> Signed-off-by: Paul Kocialkowski <contact@paulk.fr>

There is no support for am33xx boards and Linux-kernel board-file kernels
so lets just drop this weak default one and let boards that must have
this for various reasons implement a real one.
Paul Kocialkowski July 16, 2015, 1:31 p.m. UTC | #2
Le jeudi 16 juillet 2015 à 09:20 -0400, Tom Rini a écrit :
> On Thu, Jul 16, 2015 at 03:10:21PM +0200, Paul Kocialkowski wrote:
> 
> > Despite being defined with __weak, this declaration of get_board_rev will
> > conflict with the fallback one when ONFIG_REVISION_TAG is not defined.
> > 
> > Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
> 
> There is no support for am33xx boards and Linux-kernel board-file kernels
> so lets just drop this weak default one and let boards that must have
> this for various reasons implement a real one.

That's right, we can actually simply remove the whole function. If
that's okay, I'll just send another patch that replaces 2/2 and 1/2
should still be good for merging without another iteration.

Thanks for the review!
diff mbox

Patch

diff --git a/arch/arm/cpu/armv7/am33xx/sys_info.c b/arch/arm/cpu/armv7/am33xx/sys_info.c
index 781d83f..9d5a5d3 100644
--- a/arch/arm/cpu/armv7/am33xx/sys_info.c
+++ b/arch/arm/cpu/armv7/am33xx/sys_info.c
@@ -54,10 +54,12 @@  u32 get_cpu_type(void)
  * get_board_rev() - setup to pass kernel board revision information
  * returns: 0 for the ATAG REVISION tag value.
  */
+#ifdef CONFIG_REVISION_TAG
 u32 __weak get_board_rev(void)
 {
 	return 0;
 }
+#endif
 
 /**
  * get_device_type(): tell if GP/HS/EMU/TST