Hello,
compared to v2 sent starting with Message-Id:
[email protected]:
- fix typo in commit log of patch 1
- add Ack by Thorsten for patch 1
Uwe Kleine-König (2):
siox: Use bus_type functions for probe, remove and shutdown
siox: Make remove callback return void
drivers/siox/siox-core.c | 50 ++++++++++++++++++++--------------------
include/linux/siox.h | 2 +-
2 files changed, 26 insertions(+), 26 deletions(-)
base-commit: 418baf2c28f3473039f2f7377760bd8f6897ae18
--
2.29.2
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 <[email protected]>
---
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)
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;
}
static void siox_shutdown(struct device *dev)
diff --git a/include/linux/siox.h b/include/linux/siox.h
index da7225bf1877..6bfbda3f634c 100644
--- a/include/linux/siox.h
+++ b/include/linux/siox.h
@@ -36,7 +36,7 @@ bool siox_device_connected(struct siox_device *sdevice);
struct siox_driver {
int (*probe)(struct siox_device *sdevice);
- int (*remove)(struct siox_device *sdevice);
+ void (*remove)(struct siox_device *sdevice);
void (*shutdown)(struct siox_device *sdevice);
/*
--
2.29.2
Hello,
On Wed, Nov 25, 2020 at 10:31:04AM +0100, Uwe Kleine-König wrote:
> Hello,
>
> compared to v2 sent starting with Message-Id:
> [email protected]:
>
> - fix typo in commit log of patch 1
> - add Ack by Thorsten for patch 1
>
> Uwe Kleine-König (2):
> siox: Use bus_type functions for probe, remove and shutdown
> siox: Make remove callback return void
Successfully ran our siox testcases on v3.
Tested-by: Thorsten Scherer <[email protected]>
>
> drivers/siox/siox-core.c | 50 ++++++++++++++++++++--------------------
> include/linux/siox.h | 2 +-
> 2 files changed, 26 insertions(+), 26 deletions(-)
>
>
> base-commit: 418baf2c28f3473039f2f7377760bd8f6897ae18
> --
> 2.29.2
>
Thanks.
Kind regards
Thorsten
--
Thorsten Scherer | Eckelmann AG | http://www.eckelmann.de |
Hello,
On Wed, Nov 25, 2020 at 10:31:06AM +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 <[email protected]>
Acked-by: Thorsten Scherer <[email protected]>
> ---
> 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)
> 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;
> }
>
> static void siox_shutdown(struct device *dev)
> diff --git a/include/linux/siox.h b/include/linux/siox.h
> index da7225bf1877..6bfbda3f634c 100644
> --- a/include/linux/siox.h
> +++ b/include/linux/siox.h
> @@ -36,7 +36,7 @@ bool siox_device_connected(struct siox_device *sdevice);
>
> struct siox_driver {
> int (*probe)(struct siox_device *sdevice);
> - int (*remove)(struct siox_device *sdevice);
> + void (*remove)(struct siox_device *sdevice);
> void (*shutdown)(struct siox_device *sdevice);
>
> /*
> --
> 2.29.2
>
Kind regards
Thorsten
--
Thorsten Scherer | Eckelmann AG | http://www.eckelmann.de |
On Wed, Nov 25, 2020 at 03:47:20PM +0100, Thorsten Scherer wrote:
> Hello,
>
> On Wed, Nov 25, 2020 at 10:31:04AM +0100, Uwe Kleine-K?nig wrote:
> > Hello,
> >
> > compared to v2 sent starting with Message-Id:
> > [email protected]:
> >
> > - fix typo in commit log of patch 1
> > - add Ack by Thorsten for patch 1
> >
> > Uwe Kleine-K?nig (2):
> > siox: Use bus_type functions for probe, remove and shutdown
> > siox: Make remove callback return void
>
> Successfully ran our siox testcases on v3.
>
> Tested-by: Thorsten Scherer <[email protected]>
Are you going to take these patches, or do you need/want me to take them
through one of my trees?
Either is fine for me.
thanks,
greg k-h
On Thu, Dec 10, 2020 at 09:38:59AM +0100, Uwe Kleine-K?nig wrote:
> On Wed, Dec 09, 2020 at 07:54:55PM +0100, Greg Kroah-Hartman wrote:
> > On Wed, Nov 25, 2020 at 03:47:20PM +0100, Thorsten Scherer wrote:
> > > Hello,
> > >
> > > On Wed, Nov 25, 2020 at 10:31:04AM +0100, Uwe Kleine-K?nig wrote:
> > > > Hello,
> > > >
> > > > compared to v2 sent starting with Message-Id:
> > > > [email protected]:
> > > >
> > > > - fix typo in commit log of patch 1
> > > > - add Ack by Thorsten for patch 1
> > > >
> > > > Uwe Kleine-K?nig (2):
> > > > siox: Use bus_type functions for probe, remove and shutdown
> > > > siox: Make remove callback return void
> > >
> > > Successfully ran our siox testcases on v3.
> > >
> > > Tested-by: Thorsten Scherer <[email protected]>
> >
> > Are you going to take these patches, or do you need/want me to take them
> > through one of my trees?
> >
> > Either is fine for me.
>
> There is no repo for SIOX and up to know you were our upstream. So if
> you could take them that would be great.
Ok, will do, I can't remember what trees I am "upstream" for anymore, I
seem to be collecting more and more of them these days :)
thanks,
greg k-h
On Wed, Dec 09, 2020 at 07:54:55PM +0100, Greg Kroah-Hartman wrote:
> On Wed, Nov 25, 2020 at 03:47:20PM +0100, Thorsten Scherer wrote:
> > Hello,
> >
> > On Wed, Nov 25, 2020 at 10:31:04AM +0100, Uwe Kleine-K?nig wrote:
> > > Hello,
> > >
> > > compared to v2 sent starting with Message-Id:
> > > [email protected]:
> > >
> > > - fix typo in commit log of patch 1
> > > - add Ack by Thorsten for patch 1
> > >
> > > Uwe Kleine-K?nig (2):
> > > siox: Use bus_type functions for probe, remove and shutdown
> > > siox: Make remove callback return void
> >
> > Successfully ran our siox testcases on v3.
> >
> > Tested-by: Thorsten Scherer <[email protected]>
>
> Are you going to take these patches, or do you need/want me to take them
> through one of my trees?
>
> Either is fine for me.
There is no repo for SIOX and up to know you were our upstream. So if
you could take them that would be great.
Given that I expect that the patch volume for SIOX continues to stay low
I see little benefit in establishing a different work flow.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | https://www.pengutronix.de/ |