* [PATCH] gpio: sifive: remove unneeded call to platform_set_drvdata()
@ 2023-08-01 7:44 Andrei Coardos
2023-08-01 19:10 ` Andy Shevchenko
2023-08-03 13:47 ` Bartosz Golaszewski
0 siblings, 2 replies; 3+ messages in thread
From: Andrei Coardos @ 2023-08-01 7:44 UTC (permalink / raw)
To: linux-kernel, linux-riscv, linux-gpio
Cc: paul.walmsley, palmer, andy, brgl, linus.walleij, Andrei Coardos,
Alexandru Ardelean
This function call was found to be unnecessary as there is no equivalent
platform_get_drvdata() call to access the private data of the driver. Also,
the private data is defined in this driver, so there is no risk of it being
accessed outside of this driver file.
Reviewed-by: Alexandru Ardelean <alex@shruggie.ro>
Signed-off-by: Andrei Coardos <aboutphysycs@gmail.com>
---
drivers/gpio/gpio-sifive.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/gpio/gpio-sifive.c b/drivers/gpio/gpio-sifive.c
index c6a8d2374e31..0010f607a9ef 100644
--- a/drivers/gpio/gpio-sifive.c
+++ b/drivers/gpio/gpio-sifive.c
@@ -259,7 +259,6 @@ static int sifive_gpio_probe(struct platform_device *pdev)
girq->child_to_parent_hwirq = sifive_gpio_child_to_parent_hwirq;
girq->handler = handle_bad_irq;
girq->default_type = IRQ_TYPE_NONE;
- platform_set_drvdata(pdev, priv);
return gpiochip_add_data(&chip->gc, chip);
}
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] gpio: sifive: remove unneeded call to platform_set_drvdata()
2023-08-01 7:44 [PATCH] gpio: sifive: remove unneeded call to platform_set_drvdata() Andrei Coardos
@ 2023-08-01 19:10 ` Andy Shevchenko
2023-08-03 13:47 ` Bartosz Golaszewski
1 sibling, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2023-08-01 19:10 UTC (permalink / raw)
To: Andrei Coardos
Cc: linux-kernel, linux-riscv, linux-gpio, paul.walmsley, palmer,
brgl, linus.walleij, Alexandru Ardelean
On Tue, Aug 01, 2023 at 10:44:30AM +0300, Andrei Coardos wrote:
> This function call was found to be unnecessary as there is no equivalent
> platform_get_drvdata() call to access the private data of the driver. Also,
> the private data is defined in this driver, so there is no risk of it being
> accessed outside of this driver file.
Reviewed-by: Andy Shevchenko <andy@kernel.org>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] gpio: sifive: remove unneeded call to platform_set_drvdata()
2023-08-01 7:44 [PATCH] gpio: sifive: remove unneeded call to platform_set_drvdata() Andrei Coardos
2023-08-01 19:10 ` Andy Shevchenko
@ 2023-08-03 13:47 ` Bartosz Golaszewski
1 sibling, 0 replies; 3+ messages in thread
From: Bartosz Golaszewski @ 2023-08-03 13:47 UTC (permalink / raw)
To: Andrei Coardos
Cc: linux-kernel, linux-riscv, linux-gpio, paul.walmsley, palmer,
andy, linus.walleij, Alexandru Ardelean
On Tue, Aug 1, 2023 at 9:44 AM Andrei Coardos <aboutphysycs@gmail.com> wrote:
>
> This function call was found to be unnecessary as there is no equivalent
> platform_get_drvdata() call to access the private data of the driver. Also,
> the private data is defined in this driver, so there is no risk of it being
> accessed outside of this driver file.
>
> Reviewed-by: Alexandru Ardelean <alex@shruggie.ro>
> Signed-off-by: Andrei Coardos <aboutphysycs@gmail.com>
> ---
> drivers/gpio/gpio-sifive.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/gpio/gpio-sifive.c b/drivers/gpio/gpio-sifive.c
> index c6a8d2374e31..0010f607a9ef 100644
> --- a/drivers/gpio/gpio-sifive.c
> +++ b/drivers/gpio/gpio-sifive.c
> @@ -259,7 +259,6 @@ static int sifive_gpio_probe(struct platform_device *pdev)
> girq->child_to_parent_hwirq = sifive_gpio_child_to_parent_hwirq;
> girq->handler = handle_bad_irq;
> girq->default_type = IRQ_TYPE_NONE;
> - platform_set_drvdata(pdev, priv);
>
> return gpiochip_add_data(&chip->gc, chip);
> }
> --
> 2.34.1
>
This patch does not correspond with the code upstream. Please verify.
Bart
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-08-03 13:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-01 7:44 [PATCH] gpio: sifive: remove unneeded call to platform_set_drvdata() Andrei Coardos
2023-08-01 19:10 ` Andy Shevchenko
2023-08-03 13:47 ` Bartosz Golaszewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).