[PATCH] mtd: rawnand: omap_gpmc: remove unneeded variable

Michael Nazzareno Trimarchi michael at amarulasolutions.com
Tue Nov 14 08:49:39 CET 2023


On Tue, Nov 14, 2023 at 8:48 AM Heiko Schocher <hs at denx.de> wrote:
>
> remove unneeded variable ecc_flag in omap_correct_data_bch
>
> Signed-off-by: Heiko Schocher <hs at denx.de>
> ---
> azure build is fine with this patch:
>
> https://dev.azure.com/hs0298/hs/_build/results?buildId=110&view=results
>
>  drivers/mtd/nand/raw/omap_gpmc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mtd/nand/raw/omap_gpmc.c b/drivers/mtd/nand/raw/omap_gpmc.c
> index 1a5ed0de31..1fe8b1671e 100644
> --- a/drivers/mtd/nand/raw/omap_gpmc.c
> +++ b/drivers/mtd/nand/raw/omap_gpmc.c
> @@ -637,13 +637,13 @@ static int omap_correct_data_bch(struct mtd_info *mtd, uint8_t *dat,
>         uint32_t error_count = 0, error_max;
>         uint32_t error_loc[ELM_MAX_ERROR_COUNT];
>         enum bch_level bch_type;
> -       uint32_t i, ecc_flag = 0;
> +       uint32_t i;
>         uint8_t count;
>         uint32_t byte_pos, bit_pos;
>         int err = 0;
>
>         /* check calculated ecc */
> -       for (i = 0; i < ecc->bytes && !ecc_flag; i++) {
> +       for (i = 0; i < ecc->bytes; i++) {
>                 if (calc_ecc[i] != 0x00)
>                         goto not_ecc_match;
>         }
> --
> 2.37.3
>

Reviewed-by: Michael Trimarchi <michael at amarulasolutions.com>


-- 
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
michael at amarulasolutions.com
__________________________________

Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
info at amarulasolutions.com
www.amarulasolutions.com


More information about the U-Boot mailing list