Re: [PATCH v3 4/5] amba: Make the remove callback return void

2021-02-03 Thread Auger Eric
Hi Uwe,

On 1/26/21 5:58 PM, Uwe Kleine-König wrote:
> All amba drivers return 0 in their remove callback. Together with the
> driver core ignoring the return value anyhow, it doesn't make sense to
> return a value here.
> 
> Change the remove prototype to return void, which makes it explicit that
> returning an error value doesn't work as expected. This simplifies changing
> the core remove callback to return void, too.
> 
> Reviewed-by: Ulf Hansson 
> Reviewed-by: Arnd Bergmann 
> Acked-by: Alexandre Belloni 
> Acked-by: Dmitry Torokhov 
> Acked-by: Krzysztof Kozlowski  # for drivers/memory
> Acked-by: Mark Brown 
> Acked-by: Dmitry Torokhov 
> Acked-by: Linus Walleij 
> Signed-off-by: Uwe Kleine-König 
> ---
>  drivers/amba/bus.c | 5 ++---
>  drivers/char/hw_random/nomadik-rng.c   | 3 +--
>  drivers/dma/pl330.c| 3 +--
>  drivers/gpu/drm/pl111/pl111_drv.c  | 4 +---
>  drivers/hwtracing/coresight/coresight-catu.c   | 3 +--
>  drivers/hwtracing/coresight/coresight-cpu-debug.c  | 4 +---
>  drivers/hwtracing/coresight/coresight-cti-core.c   | 4 +---
>  drivers/hwtracing/coresight/coresight-etb10.c  | 4 +---
>  drivers/hwtracing/coresight/coresight-etm3x-core.c | 4 +---
>  drivers/hwtracing/coresight/coresight-etm4x-core.c | 4 +---
>  drivers/hwtracing/coresight/coresight-funnel.c | 4 ++--
>  drivers/hwtracing/coresight/coresight-replicator.c | 4 ++--
>  drivers/hwtracing/coresight/coresight-stm.c| 4 +---
>  drivers/hwtracing/coresight/coresight-tmc-core.c   | 4 +---
>  drivers/hwtracing/coresight/coresight-tpiu.c   | 4 +---
>  drivers/i2c/busses/i2c-nomadik.c   | 4 +---
>  drivers/input/serio/ambakmi.c  | 3 +--
>  drivers/memory/pl172.c | 4 +---
>  drivers/memory/pl353-smc.c | 4 +---
>  drivers/mmc/host/mmci.c| 4 +---
>  drivers/rtc/rtc-pl030.c| 4 +---
>  drivers/rtc/rtc-pl031.c| 4 +---
>  drivers/spi/spi-pl022.c| 5 ++---
>  drivers/tty/serial/amba-pl010.c| 4 +---
>  drivers/tty/serial/amba-pl011.c| 3 +--
>  drivers/vfio/platform/vfio_amba.c  | 3 +--
>  drivers/video/fbdev/amba-clcd.c| 4 +---
>  drivers/watchdog/sp805_wdt.c   | 4 +---
>  include/linux/amba/bus.h   | 2 +-
>  sound/arm/aaci.c   | 4 +---
>  30 files changed, 34 insertions(+), 80 deletions(-)
> 
> diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c
> index 8c4a42df47c6..48b5d4b4e889 100644
> --- a/drivers/amba/bus.c
> +++ b/drivers/amba/bus.c
> @@ -300,11 +300,10 @@ static int amba_remove(struct device *dev)
>  {
>   struct amba_device *pcdev = to_amba_device(dev);
>   struct amba_driver *drv = to_amba_driver(dev->driver);
> - int ret = 0;
>  
>   pm_runtime_get_sync(dev);
>   if (drv->remove)
> - ret = drv->remove(pcdev);
> + drv->remove(pcdev);
>   pm_runtime_put_noidle(dev);
>  
>   /* Undo the runtime PM settings in amba_probe() */
> @@ -315,7 +314,7 @@ static int amba_remove(struct device *dev)
>   amba_put_disable_pclk(pcdev);
>   dev_pm_domain_detach(dev, true);
>  
> - return ret;
> + return 0;
>  }
>  
>  static void amba_shutdown(struct device *dev)
> diff --git a/drivers/char/hw_random/nomadik-rng.c 
> b/drivers/char/hw_random/nomadik-rng.c
> index b0ded41eb865..67947a19aa22 100644
> --- a/drivers/char/hw_random/nomadik-rng.c
> +++ b/drivers/char/hw_random/nomadik-rng.c
> @@ -69,11 +69,10 @@ static int nmk_rng_probe(struct amba_device *dev, const 
> struct amba_id *id)
>   return ret;
>  }
>  
> -static int nmk_rng_remove(struct amba_device *dev)
> +static void nmk_rng_remove(struct amba_device *dev)
>  {
>   amba_release_regions(dev);
>   clk_disable(rng_clk);
> - return 0;
>  }
>  
>  static const struct amba_id nmk_rng_ids[] = {
> diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
> index bc0f66af0f11..fd8d2bc3be9f 100644
> --- a/drivers/dma/pl330.c
> +++ b/drivers/dma/pl330.c
> @@ -3195,7 +3195,7 @@ pl330_probe(struct amba_device *adev, const struct 
> amba_id *id)
>   return ret;
>  }
>  
> -static int pl330_remove(struct amba_device *adev)
> +static void pl330_remove(struct amba_device *adev)
>  {
>   struct pl330_dmac *pl330 = amba_get_drvdata(adev);
>   struct dma_pl330_chan *pch, *_p;
> @@ -3235,7 +3235,6 @@ static int pl330_remove(struct amba_device *adev)
>  
>   if (pl330->rstc)
>   reset_control_assert(pl330->rstc);
> - return 0;
>  }
>  
>  static const struct amba_id pl330_ids[] = {
> diff --git a/drivers/gpu/drm/pl111/pl111_drv.c 
> b/drivers/gpu/drm/pl111/pl111_drv.c
> index 40e6708fbbe2..1fb5eacefd2d 100644
> --- 

Re: [PATCH v3 4/5] amba: Make the remove callback return void

2021-01-27 Thread Greg Kroah-Hartman
On Tue, Jan 26, 2021 at 05:58:34PM +0100, Uwe Kleine-König wrote:
> All amba drivers return 0 in their remove callback. Together with the
> driver core ignoring the return value anyhow, it doesn't make sense to
> return a value here.
> 
> Change the remove prototype to return void, which makes it explicit that
> returning an error value doesn't work as expected. This simplifies changing
> the core remove callback to return void, too.
> 
> Reviewed-by: Ulf Hansson 
> Reviewed-by: Arnd Bergmann 
> Acked-by: Alexandre Belloni 
> Acked-by: Dmitry Torokhov 
> Acked-by: Krzysztof Kozlowski  # for drivers/memory
> Acked-by: Mark Brown 
> Acked-by: Dmitry Torokhov 
> Acked-by: Linus Walleij 
> Signed-off-by: Uwe Kleine-König 

Acked-by: Greg Kroah-Hartman 
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH v3 4/5] amba: Make the remove callback return void

2021-01-27 Thread Suzuki K Poulose

Hi

On 1/26/21 4:58 PM, Uwe Kleine-König wrote:

All amba drivers return 0 in their remove callback. Together with the
driver core ignoring the return value anyhow, it doesn't make sense to
return a value here.

Change the remove prototype to return void, which makes it explicit that
returning an error value doesn't work as expected. This simplifies changing
the core remove callback to return void, too.

Reviewed-by: Ulf Hansson 
Reviewed-by: Arnd Bergmann 
Acked-by: Alexandre Belloni 
Acked-by: Dmitry Torokhov 
Acked-by: Krzysztof Kozlowski  # for drivers/memory
Acked-by: Mark Brown 

 > Acked-by: Dmitry Torokhov 

Acked-by: Linus Walleij 
Signed-off-by: Uwe Kleine-König 




  drivers/hwtracing/coresight/coresight-etm4x-core.c | 4 +---


You are most likely to have a conflict for the above file, with what is
in coresight/next. It should be easy to resolve.

Otherwise, the changes look good for the drivers/hwtracing/coresight/*

Acked-by: Suzuki K Poulose 
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH v3 4/5] amba: Make the remove callback return void

2021-01-27 Thread Guenter Roeck
On Tue, Jan 26, 2021 at 05:58:34PM +0100, Uwe Kleine-König wrote:
> All amba drivers return 0 in their remove callback. Together with the
> driver core ignoring the return value anyhow, it doesn't make sense to
> return a value here.
> 
> Change the remove prototype to return void, which makes it explicit that
> returning an error value doesn't work as expected. This simplifies changing
> the core remove callback to return void, too.
> 
> Reviewed-by: Ulf Hansson 
> Reviewed-by: Arnd Bergmann 
> Acked-by: Alexandre Belloni 
> Acked-by: Dmitry Torokhov 
> Acked-by: Krzysztof Kozlowski  # for drivers/memory
> Acked-by: Mark Brown 
> Acked-by: Dmitry Torokhov 
> Acked-by: Linus Walleij 
> Signed-off-by: Uwe Kleine-König 

For watchdog:

Acked-by: Guenter Roeck 

Guenter

> ---
>  drivers/amba/bus.c | 5 ++---
>  drivers/char/hw_random/nomadik-rng.c   | 3 +--
>  drivers/dma/pl330.c| 3 +--
>  drivers/gpu/drm/pl111/pl111_drv.c  | 4 +---
>  drivers/hwtracing/coresight/coresight-catu.c   | 3 +--
>  drivers/hwtracing/coresight/coresight-cpu-debug.c  | 4 +---
>  drivers/hwtracing/coresight/coresight-cti-core.c   | 4 +---
>  drivers/hwtracing/coresight/coresight-etb10.c  | 4 +---
>  drivers/hwtracing/coresight/coresight-etm3x-core.c | 4 +---
>  drivers/hwtracing/coresight/coresight-etm4x-core.c | 4 +---
>  drivers/hwtracing/coresight/coresight-funnel.c | 4 ++--
>  drivers/hwtracing/coresight/coresight-replicator.c | 4 ++--
>  drivers/hwtracing/coresight/coresight-stm.c| 4 +---
>  drivers/hwtracing/coresight/coresight-tmc-core.c   | 4 +---
>  drivers/hwtracing/coresight/coresight-tpiu.c   | 4 +---
>  drivers/i2c/busses/i2c-nomadik.c   | 4 +---
>  drivers/input/serio/ambakmi.c  | 3 +--
>  drivers/memory/pl172.c | 4 +---
>  drivers/memory/pl353-smc.c | 4 +---
>  drivers/mmc/host/mmci.c| 4 +---
>  drivers/rtc/rtc-pl030.c| 4 +---
>  drivers/rtc/rtc-pl031.c| 4 +---
>  drivers/spi/spi-pl022.c| 5 ++---
>  drivers/tty/serial/amba-pl010.c| 4 +---
>  drivers/tty/serial/amba-pl011.c| 3 +--
>  drivers/vfio/platform/vfio_amba.c  | 3 +--
>  drivers/video/fbdev/amba-clcd.c| 4 +---
>  drivers/watchdog/sp805_wdt.c   | 4 +---
>  include/linux/amba/bus.h   | 2 +-
>  sound/arm/aaci.c   | 4 +---
>  30 files changed, 34 insertions(+), 80 deletions(-)
> 
> diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c
> index 8c4a42df47c6..48b5d4b4e889 100644
> --- a/drivers/amba/bus.c
> +++ b/drivers/amba/bus.c
> @@ -300,11 +300,10 @@ static int amba_remove(struct device *dev)
>  {
>   struct amba_device *pcdev = to_amba_device(dev);
>   struct amba_driver *drv = to_amba_driver(dev->driver);
> - int ret = 0;
>  
>   pm_runtime_get_sync(dev);
>   if (drv->remove)
> - ret = drv->remove(pcdev);
> + drv->remove(pcdev);
>   pm_runtime_put_noidle(dev);
>  
>   /* Undo the runtime PM settings in amba_probe() */
> @@ -315,7 +314,7 @@ static int amba_remove(struct device *dev)
>   amba_put_disable_pclk(pcdev);
>   dev_pm_domain_detach(dev, true);
>  
> - return ret;
> + return 0;
>  }
>  
>  static void amba_shutdown(struct device *dev)
> diff --git a/drivers/char/hw_random/nomadik-rng.c 
> b/drivers/char/hw_random/nomadik-rng.c
> index b0ded41eb865..67947a19aa22 100644
> --- a/drivers/char/hw_random/nomadik-rng.c
> +++ b/drivers/char/hw_random/nomadik-rng.c
> @@ -69,11 +69,10 @@ static int nmk_rng_probe(struct amba_device *dev, const 
> struct amba_id *id)
>   return ret;
>  }
>  
> -static int nmk_rng_remove(struct amba_device *dev)
> +static void nmk_rng_remove(struct amba_device *dev)
>  {
>   amba_release_regions(dev);
>   clk_disable(rng_clk);
> - return 0;
>  }
>  
>  static const struct amba_id nmk_rng_ids[] = {
> diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
> index bc0f66af0f11..fd8d2bc3be9f 100644
> --- a/drivers/dma/pl330.c
> +++ b/drivers/dma/pl330.c
> @@ -3195,7 +3195,7 @@ pl330_probe(struct amba_device *adev, const struct 
> amba_id *id)
>   return ret;
>  }
>  
> -static int pl330_remove(struct amba_device *adev)
> +static void pl330_remove(struct amba_device *adev)
>  {
>   struct pl330_dmac *pl330 = amba_get_drvdata(adev);
>   struct dma_pl330_chan *pch, *_p;
> @@ -3235,7 +3235,6 @@ static int pl330_remove(struct amba_device *adev)
>  
>   if (pl330->rstc)
>   reset_control_assert(pl330->rstc);
> - return 0;
>  }
>  
>  static const struct amba_id pl330_ids[] = {
> diff --git a/drivers/gpu/drm/pl111/pl111_drv.c 
> b/drivers/gpu/drm/pl111/pl111_drv.c
> index 

Re: [PATCH v3 4/5] amba: Make the remove callback return void

2021-01-27 Thread Vladimir Zapolskiy

On 1/26/21 6:58 PM, Uwe Kleine-König wrote:

All amba drivers return 0 in their remove callback. Together with the
driver core ignoring the return value anyhow, it doesn't make sense to
return a value here.

Change the remove prototype to return void, which makes it explicit that
returning an error value doesn't work as expected. This simplifies changing
the core remove callback to return void, too.

Reviewed-by: Ulf Hansson 
Reviewed-by: Arnd Bergmann 
Acked-by: Alexandre Belloni 
Acked-by: Dmitry Torokhov 
Acked-by: Krzysztof Kozlowski  # for drivers/memory
Acked-by: Mark Brown 
Acked-by: Dmitry Torokhov 
Acked-by: Linus Walleij 
Signed-off-by: Uwe Kleine-König 


For drivers/memory/pl172.c:

Acked-by: Vladimir Zapolskiy 

--
Best wishes,
Vladimir
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH v3 4/5] amba: Make the remove callback return void

2021-01-26 Thread Takashi Iwai
On Tue, 26 Jan 2021 17:58:34 +0100,
Uwe Kleine-König wrote:
> 
> All amba drivers return 0 in their remove callback. Together with the
> driver core ignoring the return value anyhow, it doesn't make sense to
> return a value here.
> 
> Change the remove prototype to return void, which makes it explicit that
> returning an error value doesn't work as expected. This simplifies changing
> the core remove callback to return void, too.
> 
> Reviewed-by: Ulf Hansson 
> Reviewed-by: Arnd Bergmann 
> Acked-by: Alexandre Belloni 
> Acked-by: Dmitry Torokhov 
> Acked-by: Krzysztof Kozlowski  # for drivers/memory
> Acked-by: Mark Brown 
> Acked-by: Dmitry Torokhov 
> Acked-by: Linus Walleij 
> Signed-off-by: Uwe Kleine-König 
> ---
>  drivers/amba/bus.c | 5 ++---
>  drivers/char/hw_random/nomadik-rng.c   | 3 +--
>  drivers/dma/pl330.c| 3 +--
>  drivers/gpu/drm/pl111/pl111_drv.c  | 4 +---
>  drivers/hwtracing/coresight/coresight-catu.c   | 3 +--
>  drivers/hwtracing/coresight/coresight-cpu-debug.c  | 4 +---
>  drivers/hwtracing/coresight/coresight-cti-core.c   | 4 +---
>  drivers/hwtracing/coresight/coresight-etb10.c  | 4 +---
>  drivers/hwtracing/coresight/coresight-etm3x-core.c | 4 +---
>  drivers/hwtracing/coresight/coresight-etm4x-core.c | 4 +---
>  drivers/hwtracing/coresight/coresight-funnel.c | 4 ++--
>  drivers/hwtracing/coresight/coresight-replicator.c | 4 ++--
>  drivers/hwtracing/coresight/coresight-stm.c| 4 +---
>  drivers/hwtracing/coresight/coresight-tmc-core.c   | 4 +---
>  drivers/hwtracing/coresight/coresight-tpiu.c   | 4 +---
>  drivers/i2c/busses/i2c-nomadik.c   | 4 +---
>  drivers/input/serio/ambakmi.c  | 3 +--
>  drivers/memory/pl172.c | 4 +---
>  drivers/memory/pl353-smc.c | 4 +---
>  drivers/mmc/host/mmci.c| 4 +---
>  drivers/rtc/rtc-pl030.c| 4 +---
>  drivers/rtc/rtc-pl031.c| 4 +---
>  drivers/spi/spi-pl022.c| 5 ++---
>  drivers/tty/serial/amba-pl010.c| 4 +---
>  drivers/tty/serial/amba-pl011.c| 3 +--
>  drivers/vfio/platform/vfio_amba.c  | 3 +--
>  drivers/video/fbdev/amba-clcd.c| 4 +---
>  drivers/watchdog/sp805_wdt.c   | 4 +---
>  include/linux/amba/bus.h   | 2 +-
>  sound/arm/aaci.c   | 4 +---

For the sound/*:
Acked-by: Takashi Iwai 


thanks,

Takashi
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH v3 4/5] amba: Make the remove callback return void

2021-01-26 Thread Wolfram Sang
On Tue, Jan 26, 2021 at 05:58:34PM +0100, Uwe Kleine-König wrote:
> All amba drivers return 0 in their remove callback. Together with the
> driver core ignoring the return value anyhow, it doesn't make sense to
> return a value here.
> 
> Change the remove prototype to return void, which makes it explicit that
> returning an error value doesn't work as expected. This simplifies changing
> the core remove callback to return void, too.
> 
> Reviewed-by: Ulf Hansson 
> Reviewed-by: Arnd Bergmann 
> Acked-by: Alexandre Belloni 
> Acked-by: Dmitry Torokhov 
> Acked-by: Krzysztof Kozlowski  # for drivers/memory
> Acked-by: Mark Brown 
> Acked-by: Dmitry Torokhov 
> Acked-by: Linus Walleij 
> Signed-off-by: Uwe Kleine-König 

Acked-by: Wolfram Sang  # for I2C



signature.asc
Description: PGP signature
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH v3 4/5] amba: Make the remove callback return void

2021-01-26 Thread Russell King - ARM Linux admin
On Tue, Jan 26, 2021 at 06:56:52PM +0100, Uwe Kleine-König wrote:
> I'm surprised to see that the remove callback introduced in 2952ecf5df33
> ("coresight: etm4x: Refactor probing routine") has an __exit annotation.

In general, remove callbacks should not have an __exit annotation.
__exit _can_ be discarded at link time for built-in stuff.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH v3 4/5] amba: Make the remove callback return void

2021-01-26 Thread Uwe Kleine-König
Hello,

On Tue, Jan 26, 2021 at 05:08:40PM +, Suzuki K Poulose wrote:
> On 1/26/21 4:58 PM, Uwe Kleine-König wrote:
> > All amba drivers return 0 in their remove callback. Together with the
> > driver core ignoring the return value anyhow, it doesn't make sense to
> > return a value here.
> > 
> > Change the remove prototype to return void, which makes it explicit that
> > returning an error value doesn't work as expected. This simplifies changing
> > the core remove callback to return void, too.
> > 
> > Reviewed-by: Ulf Hansson 
> > Reviewed-by: Arnd Bergmann 
> > Acked-by: Alexandre Belloni 
> > Acked-by: Dmitry Torokhov 
> > Acked-by: Krzysztof Kozlowski  # for drivers/memory
> > Acked-by: Mark Brown 
>  > Acked-by: Dmitry Torokhov 
> > Acked-by: Linus Walleij 
> > Signed-off-by: Uwe Kleine-König 
> 
> 
> >   drivers/hwtracing/coresight/coresight-etm4x-core.c | 4 +---
> 
> You are most likely to have a conflict for the above file, with what is
> in coresight/next. It should be easy to resolve.

I'm surprised to see that the remove callback introduced in 2952ecf5df33
("coresight: etm4x: Refactor probing routine") has an __exit annotation.

With .suppress_bind_attrs = true you don't need a remove callback at
all. (And without .suppress_bind_attrs = true the remove callback must
have no __exit annotation.)

This make me looking at commit 45fe7befe0db ("coresight: remove broken
__exit annotations") by Arnd. Unless I miss something the better change
would have been to remove the unused remove callbacks instead of dropping
their __exit annotation?!

Anyhow, my conflict resolution looks as follows:

diff --cc drivers/hwtracing/coresight/coresight-etm4x-core.c
index 82787cba537d,473ab7480a36..
--- a/drivers/hwtracing/coresight/coresight-etm4x-core.c
+++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c
@@@ -1703,6 -1903,28 +1903,27 @@@ static int __exit etm4_remove_dev(struc
cpus_read_unlock();
  
coresight_unregister(drvdata->csdev);
+ 
+   return 0;
+ }
+ 
 -static int __exit etm4_remove_amba(struct amba_device *adev)
++static void __exit etm4_remove_amba(struct amba_device *adev)
+ {
+   struct etmv4_drvdata *drvdata = dev_get_drvdata(>dev);
+ 
+   if (drvdata)
 -  return etm4_remove_dev(drvdata);
 -  return 0;
++  etm4_remove_dev(drvdata);
+ }
+ 
+ static int __exit etm4_remove_platform_dev(struct platform_device *pdev)
+ {
+   int ret = 0;
+   struct etmv4_drvdata *drvdata = dev_get_drvdata(>dev);
+ 
+   if (drvdata)
+   ret = etm4_remove_dev(drvdata);
+   pm_runtime_disable(>dev);
+   return ret;
  }
  
  static const struct amba_id etm4_ids[] = {

If this series should make it in for 5.12 we probably need an immutable
branch between hwtracing and amba.

> Otherwise, the changes look good for the drivers/hwtracing/coresight/*
> 
> Acked-by: Suzuki K Poulose 

Thanks
Uwe

-- 
Pengutronix e.K.   | Uwe Kleine-König|
Industrial Linux Solutions | https://www.pengutronix.de/ |


signature.asc
Description: PGP signature
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH v3 4/5] amba: Make the remove callback return void

2021-01-26 Thread Uwe Kleine-König
All amba drivers return 0 in their remove callback. Together with the
driver core ignoring the return value anyhow, it doesn't make sense to
return a value here.

Change the remove prototype to return void, which makes it explicit that
returning an error value doesn't work as expected. This simplifies changing
the core remove callback to return void, too.

Reviewed-by: Ulf Hansson 
Reviewed-by: Arnd Bergmann 
Acked-by: Alexandre Belloni 
Acked-by: Dmitry Torokhov 
Acked-by: Krzysztof Kozlowski  # for drivers/memory
Acked-by: Mark Brown 
Acked-by: Dmitry Torokhov 
Acked-by: Linus Walleij 
Signed-off-by: Uwe Kleine-König 
---
 drivers/amba/bus.c | 5 ++---
 drivers/char/hw_random/nomadik-rng.c   | 3 +--
 drivers/dma/pl330.c| 3 +--
 drivers/gpu/drm/pl111/pl111_drv.c  | 4 +---
 drivers/hwtracing/coresight/coresight-catu.c   | 3 +--
 drivers/hwtracing/coresight/coresight-cpu-debug.c  | 4 +---
 drivers/hwtracing/coresight/coresight-cti-core.c   | 4 +---
 drivers/hwtracing/coresight/coresight-etb10.c  | 4 +---
 drivers/hwtracing/coresight/coresight-etm3x-core.c | 4 +---
 drivers/hwtracing/coresight/coresight-etm4x-core.c | 4 +---
 drivers/hwtracing/coresight/coresight-funnel.c | 4 ++--
 drivers/hwtracing/coresight/coresight-replicator.c | 4 ++--
 drivers/hwtracing/coresight/coresight-stm.c| 4 +---
 drivers/hwtracing/coresight/coresight-tmc-core.c   | 4 +---
 drivers/hwtracing/coresight/coresight-tpiu.c   | 4 +---
 drivers/i2c/busses/i2c-nomadik.c   | 4 +---
 drivers/input/serio/ambakmi.c  | 3 +--
 drivers/memory/pl172.c | 4 +---
 drivers/memory/pl353-smc.c | 4 +---
 drivers/mmc/host/mmci.c| 4 +---
 drivers/rtc/rtc-pl030.c| 4 +---
 drivers/rtc/rtc-pl031.c| 4 +---
 drivers/spi/spi-pl022.c| 5 ++---
 drivers/tty/serial/amba-pl010.c| 4 +---
 drivers/tty/serial/amba-pl011.c| 3 +--
 drivers/vfio/platform/vfio_amba.c  | 3 +--
 drivers/video/fbdev/amba-clcd.c| 4 +---
 drivers/watchdog/sp805_wdt.c   | 4 +---
 include/linux/amba/bus.h   | 2 +-
 sound/arm/aaci.c   | 4 +---
 30 files changed, 34 insertions(+), 80 deletions(-)

diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c
index 8c4a42df47c6..48b5d4b4e889 100644
--- a/drivers/amba/bus.c
+++ b/drivers/amba/bus.c
@@ -300,11 +300,10 @@ static int amba_remove(struct device *dev)
 {
struct amba_device *pcdev = to_amba_device(dev);
struct amba_driver *drv = to_amba_driver(dev->driver);
-   int ret = 0;
 
pm_runtime_get_sync(dev);
if (drv->remove)
-   ret = drv->remove(pcdev);
+   drv->remove(pcdev);
pm_runtime_put_noidle(dev);
 
/* Undo the runtime PM settings in amba_probe() */
@@ -315,7 +314,7 @@ static int amba_remove(struct device *dev)
amba_put_disable_pclk(pcdev);
dev_pm_domain_detach(dev, true);
 
-   return ret;
+   return 0;
 }
 
 static void amba_shutdown(struct device *dev)
diff --git a/drivers/char/hw_random/nomadik-rng.c 
b/drivers/char/hw_random/nomadik-rng.c
index b0ded41eb865..67947a19aa22 100644
--- a/drivers/char/hw_random/nomadik-rng.c
+++ b/drivers/char/hw_random/nomadik-rng.c
@@ -69,11 +69,10 @@ static int nmk_rng_probe(struct amba_device *dev, const 
struct amba_id *id)
return ret;
 }
 
-static int nmk_rng_remove(struct amba_device *dev)
+static void nmk_rng_remove(struct amba_device *dev)
 {
amba_release_regions(dev);
clk_disable(rng_clk);
-   return 0;
 }
 
 static const struct amba_id nmk_rng_ids[] = {
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
index bc0f66af0f11..fd8d2bc3be9f 100644
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -3195,7 +3195,7 @@ pl330_probe(struct amba_device *adev, const struct 
amba_id *id)
return ret;
 }
 
-static int pl330_remove(struct amba_device *adev)
+static void pl330_remove(struct amba_device *adev)
 {
struct pl330_dmac *pl330 = amba_get_drvdata(adev);
struct dma_pl330_chan *pch, *_p;
@@ -3235,7 +3235,6 @@ static int pl330_remove(struct amba_device *adev)
 
if (pl330->rstc)
reset_control_assert(pl330->rstc);
-   return 0;
 }
 
 static const struct amba_id pl330_ids[] = {
diff --git a/drivers/gpu/drm/pl111/pl111_drv.c 
b/drivers/gpu/drm/pl111/pl111_drv.c
index 40e6708fbbe2..1fb5eacefd2d 100644
--- a/drivers/gpu/drm/pl111/pl111_drv.c
+++ b/drivers/gpu/drm/pl111/pl111_drv.c
@@ -320,7 +320,7 @@ static int pl111_amba_probe(struct amba_device *amba_dev,
return ret;
 }
 
-static int pl111_amba_remove(struct amba_device *amba_dev)
+static void 

Re: [PATCH v3 4/5] amba: Make the remove callback return void

2021-01-26 Thread Vinod Koul
On 26-01-21, 17:58, Uwe Kleine-König wrote:
> All amba drivers return 0 in their remove callback. Together with the
> driver core ignoring the return value anyhow, it doesn't make sense to
> return a value here.
> 
> Change the remove prototype to return void, which makes it explicit that
> returning an error value doesn't work as expected. This simplifies changing
> the core remove callback to return void, too.
> 
> Reviewed-by: Ulf Hansson 
> Reviewed-by: Arnd Bergmann 
> Acked-by: Alexandre Belloni 
> Acked-by: Dmitry Torokhov 
> Acked-by: Krzysztof Kozlowski  # for drivers/memory
> Acked-by: Mark Brown 
> Acked-by: Dmitry Torokhov 
> Acked-by: Linus Walleij 
> Signed-off-by: Uwe Kleine-König 
> ---
>  drivers/amba/bus.c | 5 ++---
>  drivers/char/hw_random/nomadik-rng.c   | 3 +--
>  drivers/dma/pl330.c| 3 +--

For dmaengine:

Acked-By: Vinod Koul 

-- 
~Vinod
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel