[PATCH 2/7] tegra: add break to switch statements

Lucas Stach dev at lynxeye.de
Thu Feb 13 17:32:46 EST 2014


Avoids a possible miscompilation.

Signed-off-by: Lucas Stach <dev at lynxeye.de>
---
 arch/arm/mach-tegra/include/mach/lowlevel.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/mach-tegra/include/mach/lowlevel.h b/arch/arm/mach-tegra/include/mach/lowlevel.h
index 472348a..9081b1c 100644
--- a/arch/arm/mach-tegra/include/mach/lowlevel.h
+++ b/arch/arm/mach-tegra/include/mach/lowlevel.h
@@ -73,8 +73,10 @@ enum tegra_chiptype tegra_get_chiptype(void)
 	switch ((hidrev & HIDREV_CHIPID_MASK) >> HIDREV_CHIPID_SHIFT) {
 	case 0x20:
 		return TEGRA20;
+		break;
 	default:
 		return TEGRA_UNK_REV;
+		break;
 	}
 }
 
@@ -109,11 +111,14 @@ uint32_t tegra20_get_ramsize(void)
 		T20_ODMDATA_RAMSIZE_SHIFT) {
 	case 1:
 		return SZ_256M;
+		break;
 	default:
 	case 2:
 		return SZ_512M;
+		break;
 	case 3:
 		return SZ_1G;
+		break;
 	}
 }
 
@@ -161,14 +166,19 @@ int tegra_get_osc_clock(void)
 		CRC_OSC_CTRL_OSC_FREQ_SHIFT) {
 	case 0:
 		return 13000000;
+		break;
 	case 1:
 		return 19200000;
+		break;
 	case 2:
 		return 12000000;
+		break;
 	case 3:
 		return 26000000;
+		break;
 	default:
 		return 0;
+		break;
 	}
 }
 
-- 
1.8.5.3




More information about the barebox mailing list