mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <sha@pengutronix.de>
To: Alexander Shiyan <eagle.alexander923@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] ARM: omap: Cleanup omap4_revision
Date: Thu, 5 May 2022 09:53:41 +0200	[thread overview]
Message-ID: <20220505075341.GK4012@pengutronix.de> (raw)
In-Reply-To: <20220505065206.10816-1-eagle.alexander923@gmail.com>

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


      reply	other threads:[~2022-05-05  7:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-05  6:52 Alexander Shiyan
2022-05-05  7:53 ` Sascha Hauer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220505075341.GK4012@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=eagle.alexander923@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox