[PATCH 2/4] gpio: zynqmp: Remove unused variable ret
Ashok Reddy Soma
ashok.reddy.soma at amd.com
Fri Jan 6 13:00:33 CET 2023
From: Algapally Santosh Sagar <santoshsagar.algapally at amd.com>
There is a unused variable ret, due to which we are getting sparse warning
as below.
warning: variable 'ret' set but not used [-Wunused-but-set-variable].
Remove variable ret.
Signed-off-by: Algapally Santosh Sagar <santoshsagar.algapally at amd.com>
Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma at amd.com>
---
drivers/gpio/zynqmp_gpio_modepin.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpio/zynqmp_gpio_modepin.c b/drivers/gpio/zynqmp_gpio_modepin.c
index 078fd83395..52eda9ceb4 100644
--- a/drivers/gpio/zynqmp_gpio_modepin.c
+++ b/drivers/gpio/zynqmp_gpio_modepin.c
@@ -45,9 +45,8 @@ static int modepin_gpio_set_value(struct udevice *dev, unsigned int offset,
{
u32 ret_payload[PAYLOAD_ARG_CNT];
u32 out_val = 0;
- int ret;
- ret = get_gpio_modepin(ret_payload);
+ get_gpio_modepin(ret_payload);
if (value)
out_val = OUTVAL(offset) | ret_payload[1];
else
--
2.17.1
More information about the U-Boot
mailing list