From: Heinrich Schuchardt Date: Fri, 29 Sep 2023 21:53:55 +0000 (+0200) Subject: gpio/starfive: redundant readl() call X-Git-Tag: v1.4~77 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d891caeae96397ba7a5ab01d6722996ea3a1dd16;p=platform%2Fkernel%2Fopensbi.git gpio/starfive: redundant readl() call In starfive_gpio_direction_output() readl() is called twice to read the gpio direction register. The result of the first read is discarded. Remove the redundant read. Fixes: 908be1b85c8f ("gpio/starfive: add gpio driver and support gpio reset") Signed-off-by: Heinrich Schuchardt Reviewed-by: Anup Patel --- diff --git a/lib/utils/gpio/fdt_gpio_starfive.c b/lib/utils/gpio/fdt_gpio_starfive.c index f430b13..bd2a9f2 100644 --- a/lib/utils/gpio/fdt_gpio_starfive.c +++ b/lib/utils/gpio/fdt_gpio_starfive.c @@ -37,7 +37,6 @@ static int starfive_gpio_direction_output(struct gpio_pin *gp, int value) reg_addr = chip->addr + gp->offset; reg_addr &= ~(STARFIVE_GPIO_REG_SHIFT_MASK); - val = readl((void *)(reg_addr)); shift_bits = (gp->offset & STARFIVE_GPIO_REG_SHIFT_MASK) << STARFIVE_GPIO_SHIFT_BITS; bit_mask = STARFIVE_GPIO_MASK << shift_bits;