arm/tegra: Fix build error with tegra_assert_system_reset
Subsystems (3)
PATCH 1/1 arm/tegra: Fix build error with tegra_assert_system_reset
Build error:
error: static declaration of 'tegra_assert_system_reset' follows non-static declaration
Fix:
Remove the non-static declaration; the function should be local now.
--- arch/arm/mach-tegra/board.h | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)
arch/arm/mach-tegra/board.h +0 -2
@@ -23,8 +23,6 @@#include <linux/types.h> -void tegra_assert_system_reset (char mode,const char *cmd); -void __init tegra_init_early (void );void __init tegra_map_common_io (void );void __init tegra_init_irq (void );
Signature · 1 line
1.7.0.4
PATCH 1/1 arm/tegra: Fix build error with tegra_assert_system_reset
Quoted 10 lines · Stephen Warren
Build error:
error: static declaration of '
tegra_assert_system_reset' follows non-static declarationFix:
Remove the non-static declaration; the function should be local now.
Signed-off-by Stephen Warren <[email protected]>
Thanks Stephen. I'd prefer to fix this a different way, moving tegra to use the .restart method instead. So, I'm about to merge this into the commit which created your error.
arch/arm/mach-tegra/board-dt.c +1 -0
@@ -134,5 +134,6 @@ DT_MACHINE_START(TEGRA_DT, "nVidia Tegra (Flattened Device Tree)") .handle_irq = gic_handle_irq, .timer = &tegra_timer, .init_machine = tegra_dt_init, + .restart = tegra_assert_system_reset, .dt_compat = tegra_dt_board_compat,MACHINE_END
arch/arm/mach-tegra/board-harmony.c +1 -0
@@ -191,4 +191,5 @@ MACHINE_START(HARMONY, "harmony") .handle_irq = gic_handle_irq, .timer = &tegra_timer, .init_machine = tegra_harmony_init, + .restart = tegra_assert_system_reset,MACHINE_END
arch/arm/mach-tegra/board-paz00.c +1 -0
@@ -194,4 +194,5 @@ MACHINE_START(PAZ00, "Toshiba AC100 / Dynabook AZ") .handle_irq = gic_handle_irq, .timer = &tegra_timer, .init_machine = tegra_paz00_init, + .restart = tegra_assert_system_reset,MACHINE_END
arch/arm/mach-tegra/board-seaboard.c +3 -0
@@ -288,6 +288,7 @@ MACHINE_START(SEABOARD, "seaboard") .handle_irq = gic_handle_irq, .timer = &tegra_timer, .init_machine = tegra_seaboard_init, + .restart = tegra_assert_system_reset, MACHINE_ENDMACHINE_START (KAEN ,"kaen" )
@@ -298,6 +299,7 @@ MACHINE_START(KAEN, "kaen") .handle_irq = gic_handle_irq, .timer = &tegra_timer, .init_machine = tegra_kaen_init, + .restart = tegra_assert_system_reset, MACHINE_ENDMACHINE_START (WARIO ,"wario" )
@@ -308,4 +310,5 @@ MACHINE_START(WARIO, "wario") .handle_irq = gic_handle_irq, .timer = &tegra_timer, .init_machine = tegra_wario_init, + .restart = tegra_assert_system_reset,MACHINE_END
arch/arm/mach-tegra/board-trimslice.c +1 -0
@@ -180,4 +180,5 @@ MACHINE_START(TRIMSLICE, "trimslice") .handle_irq = gic_handle_irq, .timer = &tegra_timer, .init_machine = tegra_trimslice_init, + .restart = tegra_assert_system_reset,MACHINE_END
arch/arm/mach-tegra/board.h +2 -0
@@ -23,6 +23,8 @@#include <linux/types.h> +void tegra_assert_system_reset (char mode,const char *cmd); +void __init tegra_init_early (void );void __init tegra_map_common_io (void );void __init tegra_init_irq (void );
arch/arm/mach-tegra/common.c +1 -2
@@ -31,7 +31,7 @@#include "clock.h" #include "fuse.h" -static void tegra_assert_system_reset (char mode,const char *cmd) +void tegra_assert_system_reset (char mode,const char *cmd) {void __iomem *reset =IO_ADDRESS (TEGRA_CLK_RESET_BASE +0x04 );u32 reg;
@@ -74,7 +74,6 @@ static void __init tegra_init_cache(void)void __init tegra_init_early (void ) { - arm_pm_restart = tegra_assert_system_reset;tegra_init_fuse ();tegra_init_clock ();tegra_clk_init_from_table (common_clk_init_table);
PATCH 1/1 arm/tegra: Fix build error with tegra_assert_system_reset
Russell King wrote at Wednesday, November 23, 2011 2:50 AM:
Quoted 8 lines · Stephen Warren
Quoted 7 lines
Build error:
error: static declaration of '
tegra_assert_system_reset' follows non-static declarationFix:
Quoted 8 lines
Quoted 3 lines
Remove the non-static declaration; the function should be local now.
Signed-off-by Stephen Warren <[email protected]>Thanks Stephen. I'd prefer to fix this a different way, moving tegra to use the .restart method instead. So, I'm about to merge this into the commit which created your error.
...
OK, I tested that and it works too.
Thanks!
Signature · 1 line
nvpublic
PATCH 1/1 arm/tegra: Fix build error with tegra_assert_system_reset
Quoted 1 line · Stephen Warren
OK, I tested that and it works too.
Great. Here's the final patch - could I have an ack for it please?
Thanks.
8<======
ARM: restart: tegra: use new restart hook
Hook these platforms restart code into the new restart hook rather than using arch_reset().
--- arch/arm/mach-tegra/board-dt.c | 1 + arch/arm/mach-tegra/board-harmony.c | 1 + arch/arm/mach-tegra/board-paz00.c | 1 + arch/arm/mach-tegra/board-seaboard.c | 3 +++ arch/arm/mach-tegra/board-trimslice.c | 1 + arch/arm/mach-tegra/common.c | 2 -- arch/arm/mach-tegra/include/mach/system.h | 6 +++--- 7 files changed, 10 insertions(+), 5 deletions(-)
arch/arm/mach-tegra/board-dt.c +1 -0
@@ -131,5 +131,6 @@ DT_MACHINE_START(TEGRA_DT, "nVidia Tegra (Flattened Device Tree)") .init_irq = tegra_init_irq, .timer = &tegra_timer, .init_machine = tegra_dt_init, + .restart = tegra_assert_system_reset, .dt_compat = tegra_dt_board_compat,MACHINE_END
arch/arm/mach-tegra/board-harmony.c +1 -0
@@ -189,4 +189,5 @@ MACHINE_START(HARMONY, "harmony") .init_irq = tegra_init_irq, .timer = &tegra_timer, .init_machine = tegra_harmony_init, + .restart = tegra_assert_system_reset,MACHINE_END
arch/arm/mach-tegra/board-paz00.c +1 -0
@@ -192,4 +192,5 @@ MACHINE_START(PAZ00, "Toshiba AC100 / Dynabook AZ") .init_irq = tegra_init_irq, .timer = &tegra_timer, .init_machine = tegra_paz00_init, + .restart = tegra_assert_system_reset,MACHINE_END
arch/arm/mach-tegra/board-seaboard.c +3 -0
@@ -286,6 +286,7 @@ MACHINE_START(SEABOARD, "seaboard") .init_irq = tegra_init_irq, .timer = &tegra_timer, .init_machine = tegra_seaboard_init, + .restart = tegra_assert_system_reset, MACHINE_ENDMACHINE_START (KAEN ,"kaen" )
@@ -295,6 +296,7 @@ MACHINE_START(KAEN, "kaen") .init_irq = tegra_init_irq, .timer = &tegra_timer, .init_machine = tegra_kaen_init, + .restart = tegra_assert_system_reset, MACHINE_ENDMACHINE_START (WARIO ,"wario" )
@@ -304,4 +306,5 @@ MACHINE_START(WARIO, "wario") .init_irq = tegra_init_irq, .timer = &tegra_timer, .init_machine = tegra_wario_init, + .restart = tegra_assert_system_reset,MACHINE_END
arch/arm/mach-tegra/board-trimslice.c +1 -0
@@ -178,4 +178,5 @@ MACHINE_START(TRIMSLICE, "trimslice") .init_irq = tegra_init_irq, .timer = &tegra_timer, .init_machine = tegra_trimslice_init, + .restart = tegra_assert_system_reset,MACHINE_END
arch/arm/mach-tegra/common.c +0 -2
@@ -31,8 +31,6 @@#include "clock.h" #include "fuse.h" -void (*arch_reset)(char mode,const char *cmd) = tegra_assert_system_reset; -void tegra_assert_system_reset (char mode,const char *cmd) {void __iomem *reset =IO_ADDRESS (TEGRA_CLK_RESET_BASE +0x04 );
arch/arm/mach-tegra/include/mach/system.h +3 -3
@@ -21,9 +21,9 @@#ifndef __MACH_TEGRA_SYSTEM_H#define __MACH_TEGRA_SYSTEM_H -#include <mach/iomap.h> - -extern void (*arch_reset)(char mode,const char *cmd); +static inline void arch_reset (char mode,const char *cmd) +{ +}static inline void arch_idle (void ) {
Signature · 1 line
1.7.4.4
PATCH 1/1 arm/tegra: Fix build error with tegra_assert_system_reset
Quoted 7 lines · Russell King - ARM Linux
Quoted 1 line · Stephen Warren
OK, I tested that and it works too.
Great. ?Here's the final patch - could I have an ack for it please?
Thanks.
Quoted 7 lines
8<======
ARM: restart: tegra: use new restart hookHook these platforms restart code into the new restart hook rather than using
arch_reset().Signed-off-by Russell King <[email protected]>
(tested-by as well, but adding multiple entries seems silly)
-Olof