mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thorsten Scherer <thorsten.scherer@eckelmann.de>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	<linux-kernel@vger.kernel.org>,
	Pengutronix Kernel Team <kernel@pengutronix.de>
Subject: Re: [PATCH v2 2/2] siox: Make remove callback return void
Date: Tue, 24 Nov 2020 21:58:45 +0100	[thread overview]
Message-ID: <20201124205845.jma7lay5tux6wiav@ws067.eckelmann.group> (raw)
In-Reply-To: <20201124141834.3096325-3-u.kleine-koenig@pengutronix.de>

Hello,

On Tue, Nov 24, 2020 at 03:18:34PM +0100, Uwe Kleine-König wrote:
> The driver core ignores the return value of the remove callback, so
> don't give siox drivers the chance to provide a value.
> 
> All siox drivers only allocate devm-managed resources in
> .probe, so there is no .remove callback to fix.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  drivers/siox/siox-core.c | 5 ++---
>  include/linux/siox.h     | 2 +-
>  2 files changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/siox/siox-core.c b/drivers/siox/siox-core.c
> index b56cdcb52967..1794ff0106bc 100644
> --- a/drivers/siox/siox-core.c
> +++ b/drivers/siox/siox-core.c
> @@ -525,12 +525,11 @@ static int siox_remove(struct device *dev)

Shouldn't this return void?

>  	struct siox_driver *sdriver =
>  		container_of(dev->driver, struct siox_driver, driver);
>  	struct siox_device *sdevice = to_siox_device(dev);
> -	int ret = 0;
>  
>  	if (sdriver->remove)
> -		ret = sdriver->remove(sdevice);
> +		sdriver->remove(sdevice);
>  
> -	return ret;
> +	return 0;
>  }
>  

[...]

> -- 
> 2.29.2
> 

Kind regards
Thorsten

--
Thorsten Scherer | Eckelmann AG | www.eckelmann.de |

  reply	other threads:[~2020-11-24 21:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-24 14:18 [PATCH v2 0/2] siox: two cleanups Uwe Kleine-König
2020-11-24 14:18 ` [PATCH v2 1/2] siox: Use bus_type functions for probe, remote and shutdown Uwe Kleine-König
2020-11-24 20:58   ` Thorsten Scherer
2020-11-24 14:18 ` [PATCH v2 2/2] siox: Make remove callback return void Uwe Kleine-König
2020-11-24 20:58   ` Thorsten Scherer [this message]
2020-11-25  7:06     ` Uwe Kleine-König
2020-11-24 20:58 ` [PATCH v2 0/2] siox: two cleanups Thorsten Scherer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201124205845.jma7lay5tux6wiav@ws067.eckelmann.group \
    --to=thorsten.scherer@eckelmann.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=u.kleine-koenig@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®