Skip to contentSkip to conversation

ARM: mvebu: board-v7 cleanup

PATCH New Gregory CLEMENT 3 participants 6 messages Apr 19, 2014 – Apr 26, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover ARM: mvebu: board-v7 cleanup

Hi,

These two patches doesn't really change the behaviour of the code, but will help to make it more readable and maintainable.

Thanks

Gregory CLEMENT (2):
ARM: mvebu: remove unnecessary ifdef around l2x0_of_init
ARM: mvebu: fix the name of the parameter used in mvebu_get_soc_id

 arch/arm/mach-mvebu/board-v7.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
Signature · 1 line
1.8.1.2
#1 lore raw

PATCH 1/2 ARM: mvebu: remove unnecessary ifdef around l2x0_of_init

l2x0_of_init function is always defined arch/arm/include/asm/hardware/cache-l2x0.h: in case of CONFIG_CACHE_L2X0 is not selected then a placeholder is defined. Then there is no need to have ifdef around l2x0_of_init.

---
 arch/arm/mach-mvebu/board-v7.c | 2 --
 1 file changed, 2 deletions(-)
arch/arm/mach-mvebu/board-v7.c +0 -2
index 333fca8fdc41..1b6e26cc7cd1 100644
@@ -59,9 +59,7 @@ static void __init mvebu_timer_and_clk_init(void)
 	clocksource_of_init();
 	coherency_init();
 	BUG_ON(mvebu_mbus_dt_init());
-#ifdef CONFIG_CACHE_L2X0
 	l2x0_of_init(0, ~0UL);
-#endif
 
 	if (of_machine_is_compatible("marvell,armada375"))
 		hook_fault_code(16 + 6, armada_375_external_abort_wa, SIGBUS, 0,
Signature · 1 line
1.8.1.2
#2 lore raw

PATCH 1/2 ARM: mvebu: remove unnecessary ifdef around l2x0_of_init

Dear Gregory CLEMENT,

Quoted 4 lines · Gregory CLEMENT

l2x0_of_init function is always defined arch/arm/include/asm/hardware/cache-l2x0.h: in case of CONFIG_CACHE_L2X0 is not selected then a placeholder is defined. Then there is no need to have ifdef around l2x0_of_init.

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH 2/2 ARM: mvebu: fix the name of the parameter used in mvebu_get_soc_id

In reply to Gregory CLEMENT

The name of the two parameters of mvebu_get_soc_id were inverted. This patch fix it in order to have a more readable code.

---
 arch/arm/mach-mvebu/board-v7.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-mvebu/board-v7.c +1 -1
index 1b6e26cc7cd1..c9320789f685 100644
@@ -76,7 +76,7 @@ static void __init i2c_quirk(void)
 	 * mechanism. We can exit only if we are sure that we can
 	 * get the SoC revision and it is more recent than A0.
 	 */
-	if (mvebu_get_soc_id(&rev, &dev) == 0 && dev > MV78XX0_A0_REV)
+	if (mvebu_get_soc_id(&dev, &rev) == 0 && rev > MV78XX0_A0_REV)
 		return;
 
 	for_each_compatible_node(np, NULL, "marvell,mv78230-i2c") {
Signature · 1 line
1.8.1.2
#4 lore raw

PATCH 2/2 ARM: mvebu: fix the name of the parameter used in mvebu_get_soc_id

Dear Gregory CLEMENT,

Quoted 5 lines · Gregory CLEMENT

The name of the two parameters of mvebu_get_soc_id were inverted. This patch fix it in order to have a more readable code.

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
Applied
#5 lore raw

cover ARM: mvebu: board-v7 cleanup

In reply to Gregory CLEMENT
Quoted 5 lines · Gregory CLEMENT

Hi,

These two patches doesn't really change the behaviour of the code, but will help to make it more readable and maintainable.

Quoted 8 lines

Thanks

Gregory CLEMENT (2):
ARM: mvebu: remove unnecessary ifdef around l2x0_of_init
ARM: mvebu: fix the name of the parameter used in mvebu_get_soc_id

 arch/arm/mach-mvebu/board-v7.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Applied both to mvebu/soc with Thomas' Reviewed-by.

thx,

Jason.