* [PATCH] ARM: omap: Cleanup omap4_revision
@ 2022-05-05 6:52 Alexander Shiyan
2022-05-05 7:53 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Alexander Shiyan @ 2022-05-05 6:52 UTC (permalink / raw)
To: barebox; +Cc: Alexander Shiyan
Clean up the omap4 revision function by removing exceeding break statements.
Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com>
---
arch/arm/mach-omap/omap4_generic.c | 17 ++++-------------
1 file changed, 4 insertions(+), 13 deletions(-)
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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ARM: omap: Cleanup omap4_revision
2022-05-05 6:52 [PATCH] ARM: omap: Cleanup omap4_revision Alexander Shiyan
@ 2022-05-05 7:53 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2022-05-05 7:53 UTC (permalink / raw)
To: Alexander Shiyan; +Cc: barebox
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@gmail.com>
> ---
> 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@lists.infradead.org
> 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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-05 7:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-05 6:52 [PATCH] ARM: omap: Cleanup omap4_revision Alexander Shiyan
2022-05-05 7:53 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox