[U-Boot] [PATCH V2 5/6] ARM: tegra: MASK_BITS_ no longer needs specific values

Stephen Warren swarren at wwwdotorg.org
Fri Jan 24 18:16:21 CET 2014


From: Stephen Warren <swarren at nvidia.com>

Since all code that sets or interprets MASK_BITS_* now uses the enums
to define/compare the values, there is no need for MASK_BITS_* to have
a specific integer value. In fact, having a specific integer value may
encourage people to hard-code those values, or interpret the values in
incorrect ways.

As such, remove the logic that assigns a specific value to the enum
values in order to make it completely clear that it's just an enum, not
something that directly represents some integer value.

Signed-off-by: Stephen Warren <swarren at nvidia.com>
Reviewed-by: Thierry Reding <treding at nvidia.com>
Tested-by: Thierry Reding <treding at nvidia.com>
Acked-by: Thierry Reding <treding at nvidia.com>
---
v2: Remove comment that described the removed assignment of numbers to
    MASK_BITS_*
---
 arch/arm/include/asm/arch-tegra/clock.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/include/asm/arch-tegra/clock.h b/arch/arm/include/asm/arch-tegra/clock.h
index 80825e30f8e3..2f85696a5854 100644
--- a/arch/arm/include/asm/arch-tegra/clock.h
+++ b/arch/arm/include/asm/arch-tegra/clock.h
@@ -30,7 +30,7 @@ enum clock_osc_freq {
  * them all together and pretends they're all 31:28.
  */
 enum {
-	MASK_BITS_31_30	= 2,	/* num of bits used to specify clock source */
+	MASK_BITS_31_30,
 	MASK_BITS_31_29,
 	MASK_BITS_31_28,
 };
-- 
1.8.1.5



More information about the U-Boot mailing list