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

Sascha Hauer s.hauer at pengutronix.de
Mon Feb 17 01:53:59 EST 2014


On Thu, Feb 13, 2014 at 11:32:46PM +0100, Lucas Stach wrote:
> 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;

What kind of miscompilation other than a compiler bug are you thinking
of? Have you seen that this patch changes anything?

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list