* [U-Boot] [PATCH 1/1] rockchip: gpio: remove dead code
@ 2018-01-30 23:45 Heinrich Schuchardt
2018-01-30 23:48 ` Dr. Philipp Tomsich
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Heinrich Schuchardt @ 2018-01-30 23:45 UTC (permalink / raw)
To: u-boot
In the following statements
if (a) return a; if (a) return c;
the second return can never be executed.
Identified by cppcheck.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
drivers/gpio/rk_gpio.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/gpio/rk_gpio.c b/drivers/gpio/rk_gpio.c
index 11fc3e26bd..2419636c5f 100644
--- a/drivers/gpio/rk_gpio.c
+++ b/drivers/gpio/rk_gpio.c
@@ -86,10 +86,6 @@ static int rockchip_gpio_get_function(struct udevice *dev, unsigned offset)
ret = pinctrl_get_gpio_mux(priv->pinctrl, priv->bank, offset);
if (ret)
return ret;
-
- /* If it's not 0, then it is not a GPIO */
- if (ret)
- return GPIOF_FUNC;
is_output = readl(®s->swport_ddr) & OFFSET_TO_BIT(offset);
return is_output ? GPIOF_OUTPUT : GPIOF_INPUT;
--
2.15.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH 1/1] rockchip: gpio: remove dead code
2018-01-30 23:45 [U-Boot] [PATCH 1/1] rockchip: gpio: remove dead code Heinrich Schuchardt
@ 2018-01-30 23:48 ` Dr. Philipp Tomsich
2018-02-02 14:53 ` [U-Boot] [U-Boot,1/1] " Philipp Tomsich
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Dr. Philipp Tomsich @ 2018-01-30 23:48 UTC (permalink / raw)
To: u-boot
> On 31 Jan 2018, at 00:45, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> In the following statements
> if (a) return a; if (a) return c;
> the second return can never be executed.
>
> Identified by cppcheck.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [U-Boot,1/1] rockchip: gpio: remove dead code
2018-01-30 23:45 [U-Boot] [PATCH 1/1] rockchip: gpio: remove dead code Heinrich Schuchardt
2018-01-30 23:48 ` Dr. Philipp Tomsich
@ 2018-02-02 14:53 ` Philipp Tomsich
2018-02-13 15:43 ` Philipp Tomsich
2018-02-13 15:44 ` Philipp Tomsich
3 siblings, 0 replies; 5+ messages in thread
From: Philipp Tomsich @ 2018-02-02 14:53 UTC (permalink / raw)
To: u-boot
> In the following statements
> if (a) return a; if (a) return c;
> the second return can never be executed.
>
> Identified by cppcheck.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> ---
> drivers/gpio/rk_gpio.c | 4 ----
> 1 file changed, 4 deletions(-)
>
Applied to u-boot-rockchip, thanks!
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [U-Boot,1/1] rockchip: gpio: remove dead code
2018-01-30 23:45 [U-Boot] [PATCH 1/1] rockchip: gpio: remove dead code Heinrich Schuchardt
2018-01-30 23:48 ` Dr. Philipp Tomsich
2018-02-02 14:53 ` [U-Boot] [U-Boot,1/1] " Philipp Tomsich
@ 2018-02-13 15:43 ` Philipp Tomsich
2018-02-13 15:44 ` Philipp Tomsich
3 siblings, 0 replies; 5+ messages in thread
From: Philipp Tomsich @ 2018-02-13 15:43 UTC (permalink / raw)
To: u-boot
> In the following statements
> if (a) return a; if (a) return c;
> the second return can never be executed.
>
> Identified by cppcheck.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> ---
> drivers/gpio/rk_gpio.c | 4 ----
> 1 file changed, 4 deletions(-)
>
Applied to u-boot-rockchip, thanks!
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [U-Boot,1/1] rockchip: gpio: remove dead code
2018-01-30 23:45 [U-Boot] [PATCH 1/1] rockchip: gpio: remove dead code Heinrich Schuchardt
` (2 preceding siblings ...)
2018-02-13 15:43 ` Philipp Tomsich
@ 2018-02-13 15:44 ` Philipp Tomsich
3 siblings, 0 replies; 5+ messages in thread
From: Philipp Tomsich @ 2018-02-13 15:44 UTC (permalink / raw)
To: u-boot
> In the following statements
> if (a) return a; if (a) return c;
> the second return can never be executed.
>
> Identified by cppcheck.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> ---
> drivers/gpio/rk_gpio.c | 4 ----
> 1 file changed, 4 deletions(-)
>
Applied to u-boot-rockchip, thanks!
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-02-13 15:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-30 23:45 [U-Boot] [PATCH 1/1] rockchip: gpio: remove dead code Heinrich Schuchardt
2018-01-30 23:48 ` Dr. Philipp Tomsich
2018-02-02 14:53 ` [U-Boot] [U-Boot,1/1] " Philipp Tomsich
2018-02-13 15:43 ` Philipp Tomsich
2018-02-13 15:44 ` Philipp Tomsich
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.