2018-07-24 12:10:22

by zhong jiang

[permalink] [raw]
Subject: [PATCH linux-next] gpio: fix meaningless return expression

Fix the following sparse error:

drivers/gpio/gpio-ath79.c:54:16: error: return expression in void function

Signed-off-by: zhong jiang <[email protected]>
---
drivers/gpio/gpio-ath79.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-ath79.c b/drivers/gpio/gpio-ath79.c
index 684e9d6..0a553d6 100644
--- a/drivers/gpio/gpio-ath79.c
+++ b/drivers/gpio/gpio-ath79.c
@@ -51,7 +51,7 @@ static u32 ath79_gpio_read(struct ath79_gpio_ctrl *ctrl, unsigned reg)
static void ath79_gpio_write(struct ath79_gpio_ctrl *ctrl,
unsigned reg, u32 val)
{
- return writel(val, ctrl->base + reg);
+ writel(val, ctrl->base + reg);
}

static bool ath79_gpio_update_bits(
--
1.7.12.4



2018-07-26 08:44:29

by Alban

[permalink] [raw]
Subject: Re: [PATCH linux-next] gpio: fix meaningless return expression

On Tue, 24 Jul 2018 19:57:43 +0800
zhong jiang <[email protected]> wrote:

> Fix the following sparse error:
>
> drivers/gpio/gpio-ath79.c:54:16: error: return expression in void
> function
>
> Signed-off-by: zhong jiang <[email protected]>

Acked-by: Alban Bedel <[email protected]>


Attachments:
(No filename) (849.00 B)
OpenPGP digital signature

2018-07-29 23:20:31

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH linux-next] gpio: fix meaningless return expression

On Tue, Jul 24, 2018 at 2:09 PM zhong jiang <[email protected]> wrote:

> Fix the following sparse error:
>
> drivers/gpio/gpio-ath79.c:54:16: error: return expression in void function
>
> Signed-off-by: zhong jiang <[email protected]>

Patch applied with Alban's ACK.

Yours,
Linus Walleij