lkml.org 
[lkml]   [2022]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 5/5] spi: make remove callback a void function
Date
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@pengutronix.de>
> ---

[...]


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

[...]

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

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


[...]

> 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
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2022-01-25 13:47    [W:0.304 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site