Re: [PATCH 5/5] spi: make remove callback a void function

From: Lukasz Stelmach
Date: Tue Jan 25 2022 - 07:46:39 EST


It was <2022-01-23 nie 18:52>, when Uwe Kleine-König wrote:
> The value returned by an spi driver's remove function is mostly ignored.
> (Only an error message is printed if the value is non-zero that the
> error is ignored.)
>
> So change the prototype of the remove function to return no value. This
> way driver authors are not tempted to assume that passing an error to
> the upper layer is a good idea. All drivers are adapted accordingly.
> There is no intended change of behaviour, all callbacks were prepared to
> return 0 before.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
> ---

[...]


> drivers/net/ethernet/asix/ax88796c_main.c | 4 +---

[...]

> 191 files changed, 197 insertions(+), 545 deletions(-)
>

Acked-by: Łukasz Stelmach <l.stelmach@xxxxxxxxxxx>


[...]

> diff --git a/drivers/net/ethernet/asix/ax88796c_main.c b/drivers/net/ethernet/asix/ax88796c_main.c
> index e7a9f9863258..bf70481bb1ca 100644
> --- a/drivers/net/ethernet/asix/ax88796c_main.c
> +++ b/drivers/net/ethernet/asix/ax88796c_main.c
> @@ -1102,7 +1102,7 @@ static int ax88796c_probe(struct spi_device *spi)
> return ret;
> }
>
> -static int ax88796c_remove(struct spi_device *spi)
> +static void ax88796c_remove(struct spi_device *spi)
> {
> struct ax88796c_device *ax_local = dev_get_drvdata(&spi->dev);
> struct net_device *ndev = ax_local->ndev;
> @@ -1112,8 +1112,6 @@ static int ax88796c_remove(struct spi_device *spi)
> netif_info(ax_local, probe, ndev, "removing network device %s %s\n",
> dev_driver_string(&spi->dev),
> dev_name(&spi->dev));
> -
> - return 0;
> }
>
> #ifdef CONFIG_OF

[...]


--
Łukasz Stelmach
Samsung R&D Institute Poland
Samsung Electronics

Attachment: signature.asc
Description: PGP signature