Re: [PATCH] ARM: omap: Cleanup omap4_revision

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 05, 2022 at 09:52:06AM +0300, Alexander Shiyan wrote:
> Clean up the omap4 revision function by removing exceeding break statements.
> 
> Signed-off-by: Alexander Shiyan <eagle.alexander923@xxxxxxxxx>
> ---
>  arch/arm/mach-omap/omap4_generic.c | 17 ++++-------------
>  1 file changed, 4 insertions(+), 13 deletions(-)

Applied, thanks

Sascha

> 
> diff --git a/arch/arm/mach-omap/omap4_generic.c b/arch/arm/mach-omap/omap4_generic.c
> index c9a89c57b7..406b686318 100644
> --- a/arch/arm/mach-omap/omap4_generic.c
> +++ b/arch/arm/mach-omap/omap4_generic.c
> @@ -433,38 +433,29 @@ unsigned int omap4_revision(void)
>  		return OMAP4430_ES1_0;
>  	case MIDR_CORTEX_A9_R1P2:
>  		switch (readl(CONTROL_ID_CODE)) {
> -		case OMAP4_CONTROL_ID_CODE_ES2_0:
> -			return OMAP4430_ES2_0;
> -			break;
>  		case OMAP4_CONTROL_ID_CODE_ES2_1:
>  			return OMAP4430_ES2_1;
> -			break;
>  		case OMAP4_CONTROL_ID_CODE_ES2_2:
>  			return OMAP4430_ES2_2;
> -			break;
>  		default:
> -			return OMAP4430_ES2_0;
>  			break;
>  		}
> -		break;
> +		return OMAP4430_ES2_0;
>  	case MIDR_CORTEX_A9_R1P3:
>  		return OMAP4430_ES2_3;
> -		break;
>  	case MIDR_CORTEX_A9_R2P10:
>  		switch (readl(CONTROL_ID_CODE)) {
>  		case OMAP4460_CONTROL_ID_CODE_ES1_1:
>  			return OMAP4460_ES1_1;
> -			break;
> -		case OMAP4460_CONTROL_ID_CODE_ES1_0:
>  		default:
> -			return OMAP4460_ES1_0;
>  			break;
>  		}
> -		break;
> +		return OMAP4460_ES1_0;
>  	default:
> -		return OMAP4430_SILICON_ID_INVALID;
>  		break;
>  	}
> +
> +	return OMAP4430_SILICON_ID_INVALID;
>  }
>  
>  /*
> -- 
> 2.32.0
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@xxxxxxxxxxxxxxxxxxx
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux