2023-03-10 22:42:54

by Uwe Kleine-König

[permalink] [raw]
Subject: [PATCH 0/6] bus: fsl-mc: Make remove function return void

Hello,

many bus remove functions return an integer which is a historic
misdesign that makes driver authors assume that there is some kind of
error handling in the upper layers. This is wrong however and returning
and error code only yields an error message.

This series improves the fsl-mc bus by changing the remove callback to
return no value instead. As a preparation all drivers are changed to
return zero before so that they don't trigger the error message.

Best regards
Uwe

Uwe Kleine-König (6):
bus: fsl-mc: Only warn once about errors on device unbind
bus: fsl-mc: dprc: Push down error message from fsl_mc_driver_remove()
bus: fsl-mc: fsl-mc-allocator: Drop if block with always wrong
condition
bus: fsl-mc: fsl-mc-allocator: Improve error reporting
soc: fsl: dpio: Suppress duplicated error reporting on device remove
bus: fsl-mc: Make remove function return void

drivers/bus/fsl-mc/dprc-driver.c | 12 ++++-----
drivers/bus/fsl-mc/fsl-mc-allocator.c | 27 ++++++++++---------
drivers/bus/fsl-mc/fsl-mc-bus.c | 7 +----
drivers/crypto/caam/caamalg_qi2.c | 4 +--
drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.c | 4 +--
.../net/ethernet/freescale/dpaa2/dpaa2-eth.c | 4 +--
.../net/ethernet/freescale/dpaa2/dpaa2-ptp.c | 4 +--
.../ethernet/freescale/dpaa2/dpaa2-switch.c | 4 +--
drivers/soc/fsl/dpio/dpio-driver.c | 8 +-----
drivers/vfio/fsl-mc/vfio_fsl_mc.c | 3 +--
include/linux/fsl/mc.h | 2 +-
11 files changed, 28 insertions(+), 51 deletions(-)


base-commit: fe15c26ee26efa11741a7b632e9f23b01aca4cc6
--
2.39.1



2023-03-10 22:42:56

by Uwe Kleine-König

[permalink] [raw]
Subject: [PATCH 6/6] bus: fsl-mc: Make remove function return void

From: Uwe Kleine-König <[email protected]>

The value returned by an fsl-mc driver's remove function is mostly
ignored. (Only an error message is printed if the value is non-zero
and then device removal continues unconditionally.)

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 <[email protected]>
---
drivers/bus/fsl-mc/dprc-driver.c | 5 ++---
drivers/bus/fsl-mc/fsl-mc-allocator.c | 5 ++---
drivers/bus/fsl-mc/fsl-mc-bus.c | 5 +----
drivers/crypto/caam/caamalg_qi2.c | 4 +---
drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.c | 4 +---
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 4 +---
drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c | 4 +---
drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c | 4 +---
drivers/soc/fsl/dpio/dpio-driver.c | 4 +---
drivers/vfio/fsl-mc/vfio_fsl_mc.c | 3 +--
include/linux/fsl/mc.h | 2 +-
11 files changed, 13 insertions(+), 31 deletions(-)

diff --git a/drivers/bus/fsl-mc/dprc-driver.c b/drivers/bus/fsl-mc/dprc-driver.c
index ef4f43f67b80..595d4cecd041 100644
--- a/drivers/bus/fsl-mc/dprc-driver.c
+++ b/drivers/bus/fsl-mc/dprc-driver.c
@@ -835,13 +835,13 @@ EXPORT_SYMBOL_GPL(dprc_cleanup);
* It tears down the interrupts that were configured for the DPRC device.
* It destroys the interrupt pool associated with this MC bus.
*/
-static int dprc_remove(struct fsl_mc_device *mc_dev)
+static void dprc_remove(struct fsl_mc_device *mc_dev)
{
struct fsl_mc_bus *mc_bus = to_fsl_mc_bus(mc_dev);

if (!mc_bus->irq_resources) {
dev_err(&mc_dev->dev, "No irq resources, so unbinding the device failed\n");
- return 0;
+ return;
}

if (dev_get_msi_domain(&mc_dev->dev))
@@ -852,7 +852,6 @@ static int dprc_remove(struct fsl_mc_device *mc_dev)
dprc_cleanup(mc_dev);

dev_info(&mc_dev->dev, "DPRC device unbound from driver");
- return 0;
}

static const struct fsl_mc_device_id match_id_table[] = {
diff --git a/drivers/bus/fsl-mc/fsl-mc-allocator.c b/drivers/bus/fsl-mc/fsl-mc-allocator.c
index 36f70e5e418b..0ad68099684e 100644
--- a/drivers/bus/fsl-mc/fsl-mc-allocator.c
+++ b/drivers/bus/fsl-mc/fsl-mc-allocator.c
@@ -614,19 +614,18 @@ static int fsl_mc_allocator_probe(struct fsl_mc_device *mc_dev)
* fsl_mc_allocator_remove - callback invoked when an allocatable device is
* being removed from the system
*/
-static int fsl_mc_allocator_remove(struct fsl_mc_device *mc_dev)
+static void fsl_mc_allocator_remove(struct fsl_mc_device *mc_dev)
{
int error;

if (mc_dev->resource) {
error = fsl_mc_resource_pool_remove_device(mc_dev);
if (error < 0)
- return 0;
+ return;
}

dev_dbg(&mc_dev->dev,
"Allocatable fsl-mc device unbound from fsl_mc_allocator driver");
- return 0;
}

static const struct fsl_mc_device_id match_id_table[] = {
diff --git a/drivers/bus/fsl-mc/fsl-mc-bus.c b/drivers/bus/fsl-mc/fsl-mc-bus.c
index 1531e6101fb1..08b7dc8f2181 100644
--- a/drivers/bus/fsl-mc/fsl-mc-bus.c
+++ b/drivers/bus/fsl-mc/fsl-mc-bus.c
@@ -454,11 +454,8 @@ static int fsl_mc_driver_remove(struct device *dev)
{
struct fsl_mc_driver *mc_drv = to_fsl_mc_driver(dev->driver);
struct fsl_mc_device *mc_dev = to_fsl_mc_device(dev);
- int error;

- error = mc_drv->remove(mc_dev);
- if (error < 0)
- dev_err(dev, "%s failed: %d\n", __func__, error);
+ mc_drv->remove(mc_dev);

return 0;
}
diff --git a/drivers/crypto/caam/caamalg_qi2.c b/drivers/crypto/caam/caamalg_qi2.c
index 5c8d35edaa1c..9156bbe038b7 100644
--- a/drivers/crypto/caam/caamalg_qi2.c
+++ b/drivers/crypto/caam/caamalg_qi2.c
@@ -5402,7 +5402,7 @@ static int dpaa2_caam_probe(struct fsl_mc_device *dpseci_dev)
return err;
}

-static int __cold dpaa2_caam_remove(struct fsl_mc_device *ls_dev)
+static void __cold dpaa2_caam_remove(struct fsl_mc_device *ls_dev)
{
struct device *dev;
struct dpaa2_caam_priv *priv;
@@ -5443,8 +5443,6 @@ static int __cold dpaa2_caam_remove(struct fsl_mc_device *ls_dev)
free_percpu(priv->ppriv);
fsl_mc_portal_free(priv->mc_io);
kmem_cache_destroy(qi_cache);
-
- return 0;
}

int dpaa2_caam_enqueue(struct device *dev, struct caam_request *req)
diff --git a/drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.c b/drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.c
index 8dd40d00a672..a42a37634881 100644
--- a/drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.c
+++ b/drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.c
@@ -765,7 +765,7 @@ static int dpaa2_qdma_probe(struct fsl_mc_device *dpdmai_dev)
return err;
}

-static int dpaa2_qdma_remove(struct fsl_mc_device *ls_dev)
+static void dpaa2_qdma_remove(struct fsl_mc_device *ls_dev)
{
struct dpaa2_qdma_engine *dpaa2_qdma;
struct dpaa2_qdma_priv *priv;
@@ -787,8 +787,6 @@ static int dpaa2_qdma_remove(struct fsl_mc_device *ls_dev)
dma_async_device_unregister(&dpaa2_qdma->dma_dev);
kfree(priv);
kfree(dpaa2_qdma);
-
- return 0;
}

static void dpaa2_qdma_shutdown(struct fsl_mc_device *ls_dev)
diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
index a62cffaf6ff1..a9676d0dece8 100644
--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
@@ -5025,7 +5025,7 @@ static int dpaa2_eth_probe(struct fsl_mc_device *dpni_dev)
return err;
}

-static int dpaa2_eth_remove(struct fsl_mc_device *ls_dev)
+static void dpaa2_eth_remove(struct fsl_mc_device *ls_dev)
{
struct device *dev;
struct net_device *net_dev;
@@ -5073,8 +5073,6 @@ static int dpaa2_eth_remove(struct fsl_mc_device *ls_dev)
dev_dbg(net_dev->dev.parent, "Removed interface %s\n", net_dev->name);

free_netdev(net_dev);
-
- return 0;
}

static const struct fsl_mc_device_id dpaa2_eth_match_id_table[] = {
diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c
index 90d23ab1ce9d..4497e3c0456d 100644
--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c
+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c
@@ -219,7 +219,7 @@ static int dpaa2_ptp_probe(struct fsl_mc_device *mc_dev)
return err;
}

-static int dpaa2_ptp_remove(struct fsl_mc_device *mc_dev)
+static void dpaa2_ptp_remove(struct fsl_mc_device *mc_dev)
{
struct device *dev = &mc_dev->dev;
struct ptp_qoriq *ptp_qoriq;
@@ -232,8 +232,6 @@ static int dpaa2_ptp_remove(struct fsl_mc_device *mc_dev)
fsl_mc_free_irqs(mc_dev);
dprtc_close(mc_dev->mc_io, 0, mc_dev->mc_handle);
fsl_mc_portal_free(mc_dev->mc_io);
-
- return 0;
}

static const struct fsl_mc_device_id dpaa2_ptp_match_id_table[] = {
diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
index f4ae4289c41a..21cc4e52425a 100644
--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
@@ -3221,7 +3221,7 @@ static void dpaa2_switch_teardown(struct fsl_mc_device *sw_dev)
dev_warn(dev, "dpsw_close err %d\n", err);
}

-static int dpaa2_switch_remove(struct fsl_mc_device *sw_dev)
+static void dpaa2_switch_remove(struct fsl_mc_device *sw_dev)
{
struct ethsw_port_priv *port_priv;
struct ethsw_core *ethsw;
@@ -3252,8 +3252,6 @@ static int dpaa2_switch_remove(struct fsl_mc_device *sw_dev)
kfree(ethsw);

dev_set_drvdata(dev, NULL);
-
- return 0;
}

static int dpaa2_switch_probe_port(struct ethsw_core *ethsw,
diff --git a/drivers/soc/fsl/dpio/dpio-driver.c b/drivers/soc/fsl/dpio/dpio-driver.c
index 09df5302d255..9e3fddd8f5a9 100644
--- a/drivers/soc/fsl/dpio/dpio-driver.c
+++ b/drivers/soc/fsl/dpio/dpio-driver.c
@@ -270,7 +270,7 @@ static void dpio_teardown_irqs(struct fsl_mc_device *dpio_dev)
fsl_mc_free_irqs(dpio_dev);
}

-static int dpaa2_dpio_remove(struct fsl_mc_device *dpio_dev)
+static void dpaa2_dpio_remove(struct fsl_mc_device *dpio_dev)
{
struct device *dev;
struct dpio_priv *priv;
@@ -299,8 +299,6 @@ static int dpaa2_dpio_remove(struct fsl_mc_device *dpio_dev)

err_open:
fsl_mc_portal_free(dpio_dev->mc_io);
-
- return 0;
}

static const struct fsl_mc_device_id dpaa2_dpio_match_id_table[] = {
diff --git a/drivers/vfio/fsl-mc/vfio_fsl_mc.c b/drivers/vfio/fsl-mc/vfio_fsl_mc.c
index c89a047a4cd8..f2140e94d41e 100644
--- a/drivers/vfio/fsl-mc/vfio_fsl_mc.c
+++ b/drivers/vfio/fsl-mc/vfio_fsl_mc.c
@@ -570,7 +570,7 @@ static void vfio_fsl_mc_release_dev(struct vfio_device *core_vdev)
mutex_destroy(&vdev->igate);
}

-static int vfio_fsl_mc_remove(struct fsl_mc_device *mc_dev)
+static void vfio_fsl_mc_remove(struct fsl_mc_device *mc_dev)
{
struct device *dev = &mc_dev->dev;
struct vfio_fsl_mc_device *vdev = dev_get_drvdata(dev);
@@ -578,7 +578,6 @@ static int vfio_fsl_mc_remove(struct fsl_mc_device *mc_dev)
vfio_unregister_group_dev(&vdev->vdev);
dprc_remove_devices(mc_dev, NULL, 0);
vfio_put_device(&vdev->vdev);
- return 0;
}

static const struct vfio_device_ops vfio_fsl_mc_ops = {
diff --git a/include/linux/fsl/mc.h b/include/linux/fsl/mc.h
index a86115bc799c..a1b3de87a3d1 100644
--- a/include/linux/fsl/mc.h
+++ b/include/linux/fsl/mc.h
@@ -48,7 +48,7 @@ struct fsl_mc_driver {
struct device_driver driver;
const struct fsl_mc_device_id *match_id_table;
int (*probe)(struct fsl_mc_device *dev);
- int (*remove)(struct fsl_mc_device *dev);
+ void (*remove)(struct fsl_mc_device *dev);
void (*shutdown)(struct fsl_mc_device *dev);
int (*suspend)(struct fsl_mc_device *dev, pm_message_t state);
int (*resume)(struct fsl_mc_device *dev);
--
2.39.1


2023-03-13 13:46:44

by Ioana Ciornei

[permalink] [raw]
Subject: Re: [PATCH 0/6] bus: fsl-mc: Make remove function return void

On Fri, Mar 10, 2023 at 11:41:22PM +0100, Uwe Kleine-K?nig wrote:
> Hello,
>
> many bus remove functions return an integer which is a historic
> misdesign that makes driver authors assume that there is some kind of
> error handling in the upper layers. This is wrong however and returning
> and error code only yields an error message.
>
> This series improves the fsl-mc bus by changing the remove callback to
> return no value instead. As a preparation all drivers are changed to
> return zero before so that they don't trigger the error message.
>
> Best regards
> Uwe
>
> Uwe Kleine-K?nig (6):
> bus: fsl-mc: Only warn once about errors on device unbind
> bus: fsl-mc: dprc: Push down error message from fsl_mc_driver_remove()
> bus: fsl-mc: fsl-mc-allocator: Drop if block with always wrong
> condition
> bus: fsl-mc: fsl-mc-allocator: Improve error reporting
> soc: fsl: dpio: Suppress duplicated error reporting on device remove
> bus: fsl-mc: Make remove function return void
>

Reviewed-by: Ioana Ciornei <[email protected]>
Tested-by: Ioana Ciornei <[email protected]> # sanity checks



2023-03-13 15:47:32

by Laurentiu Tudor

[permalink] [raw]
Subject: Re: [PATCH 0/6] bus: fsl-mc: Make remove function return void



On 3/11/2023 12:41 AM, Uwe Kleine-König wrote:
> Hello,
>
> many bus remove functions return an integer which is a historic
> misdesign that makes driver authors assume that there is some kind of
> error handling in the upper layers. This is wrong however and returning
> and error code only yields an error message.
>
> This series improves the fsl-mc bus by changing the remove callback to
> return no value instead. As a preparation all drivers are changed to
> return zero before so that they don't trigger the error message.
>
> Best regards
> Uwe
>
> Uwe Kleine-König (6):
> bus: fsl-mc: Only warn once about errors on device unbind
> bus: fsl-mc: dprc: Push down error message from fsl_mc_driver_remove()
> bus: fsl-mc: fsl-mc-allocator: Drop if block with always wrong
> condition
> bus: fsl-mc: fsl-mc-allocator: Improve error reporting
> soc: fsl: dpio: Suppress duplicated error reporting on device remove
> bus: fsl-mc: Make remove function return void
>

Thanks for the series, Uwe. Did a quick boot test with ACPI, so:

Reviewed-by: Laurentiu Tudor <[email protected]>
Tested-by: Laurentiu Tudor <[email protected]>

2023-04-12 21:33:39

by Leo Li

[permalink] [raw]
Subject: RE: [PATCH 0/6] bus: fsl-mc: Make remove function return void



> -----Original Message-----
> From: Uwe Kleine-K?nig <[email protected]>
> Sent: Wednesday, April 12, 2023 12:11 PM
> To: Stuart Yoder <[email protected]>; Laurentiu Tudor
> <[email protected]>; Roy Pledge <[email protected]>; Leo Li
> <[email protected]>; Horia Geanta <[email protected]>; Pankaj
> Gupta <[email protected]>; Gaurav Jain <[email protected]>;
> Herbert Xu <[email protected]>; David S. Miller
> <[email protected]>; Vinod Koul <[email protected]>; Ioana Ciornei
> <[email protected]>; Eric Dumazet <[email protected]>; Jakub
> Kicinski <[email protected]>; Paolo Abeni <[email protected]>; Y.B. Lu
> <[email protected]>; Diana Madalina Craciun (OSS)
> <[email protected]>; Alex Williamson
> <[email protected]>; Richard Cochran
> <[email protected]>
> Cc: [email protected]; [email protected]; linux-
> [email protected]; [email protected];
> [email protected]; [email protected]; linuxppc-
> [email protected]; [email protected]
> Subject: Re: [PATCH 0/6] bus: fsl-mc: Make remove function return void
>
> Hello,
>
> On Fri, Mar 10, 2023 at 11:41:22PM +0100, Uwe Kleine-K?nig wrote:
> > Hello,
> >
> > many bus remove functions return an integer which is a historic
> > misdesign that makes driver authors assume that there is some kind of
> > error handling in the upper layers. This is wrong however and
> > returning and error code only yields an error message.
> >
> > This series improves the fsl-mc bus by changing the remove callback to
> > return no value instead. As a preparation all drivers are changed to
> > return zero before so that they don't trigger the error message.
>
> Who is supposed to pick up this patch series (or point out a good reason for
> not taking it)?

Previously Greg KH picked up MC bus patches.

If no one is picking up them this time, I probably can take it through the fsl soc tree.

Regards,
Leo

2023-04-13 06:10:12

by Uwe Kleine-König

[permalink] [raw]
Subject: Re: [PATCH 0/6] bus: fsl-mc: Make remove function return void

Hello Leo,

On Wed, Apr 12, 2023 at 09:30:05PM +0000, Leo Li wrote:
> > On Fri, Mar 10, 2023 at 11:41:22PM +0100, Uwe Kleine-K?nig wrote:
> > > Hello,
> > >
> > > many bus remove functions return an integer which is a historic
> > > misdesign that makes driver authors assume that there is some kind of
> > > error handling in the upper layers. This is wrong however and
> > > returning and error code only yields an error message.
> > >
> > > This series improves the fsl-mc bus by changing the remove callback to
> > > return no value instead. As a preparation all drivers are changed to
> > > return zero before so that they don't trigger the error message.
> >
> > Who is supposed to pick up this patch series (or point out a good reason for
> > not taking it)?
>
> Previously Greg KH picked up MC bus patches.
>
> If no one is picking up them this time, I probably can take it through
> the fsl soc tree.

I guess Greg won't pick up this series as he didn't get a copy of it :-)

Browsing through the history of drivers/bus/fsl-mc there is no
consistent maintainer to see. So if you can take it, that's very
appreciated.

Best regards
Uwe

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


Attachments:
(No filename) (1.31 kB)
signature.asc (499.00 B)
Download all attachments

2023-05-08 13:44:21

by Uwe Kleine-König

[permalink] [raw]
Subject: Re: [PATCH 0/6] bus: fsl-mc: Make remove function return void

Hello Leo,

On Thu, Apr 13, 2023 at 08:00:04AM +0200, Uwe Kleine-K?nig wrote:
> On Wed, Apr 12, 2023 at 09:30:05PM +0000, Leo Li wrote:
> > > On Fri, Mar 10, 2023 at 11:41:22PM +0100, Uwe Kleine-K?nig wrote:
> > > > Hello,
> > > >
> > > > many bus remove functions return an integer which is a historic
> > > > misdesign that makes driver authors assume that there is some kind of
> > > > error handling in the upper layers. This is wrong however and
> > > > returning and error code only yields an error message.
> > > >
> > > > This series improves the fsl-mc bus by changing the remove callback to
> > > > return no value instead. As a preparation all drivers are changed to
> > > > return zero before so that they don't trigger the error message.
> > >
> > > Who is supposed to pick up this patch series (or point out a good reason for
> > > not taking it)?
> >
> > Previously Greg KH picked up MC bus patches.
> >
> > If no one is picking up them this time, I probably can take it through
> > the fsl soc tree.
>
> I guess Greg won't pick up this series as he didn't get a copy of it :-)
>
> Browsing through the history of drivers/bus/fsl-mc there is no
> consistent maintainer to see. So if you can take it, that's very
> appreciated.

My mail was meant encouraging, maybe it was too subtile? I'll try again:

Yes, please apply, that would be wonderful!

:-)

Thanks
Uwe

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


Attachments:
(No filename) (1.54 kB)
signature.asc (499.00 B)
Download all attachments

2023-05-08 22:04:25

by Leo Li

[permalink] [raw]
Subject: Re: [PATCH 0/6] bus: fsl-mc: Make remove function return void

On Mon, May 8, 2023 at 8:44 AM Uwe Kleine-König
<[email protected]> wrote:
>
> Hello Leo,
>
> On Thu, Apr 13, 2023 at 08:00:04AM +0200, Uwe Kleine-König wrote:
> > On Wed, Apr 12, 2023 at 09:30:05PM +0000, Leo Li wrote:
> > > > On Fri, Mar 10, 2023 at 11:41:22PM +0100, Uwe Kleine-König wrote:
> > > > > Hello,
> > > > >
> > > > > many bus remove functions return an integer which is a historic
> > > > > misdesign that makes driver authors assume that there is some kind of
> > > > > error handling in the upper layers. This is wrong however and
> > > > > returning and error code only yields an error message.
> > > > >
> > > > > This series improves the fsl-mc bus by changing the remove callback to
> > > > > return no value instead. As a preparation all drivers are changed to
> > > > > return zero before so that they don't trigger the error message.
> > > >
> > > > Who is supposed to pick up this patch series (or point out a good reason for
> > > > not taking it)?
> > >
> > > Previously Greg KH picked up MC bus patches.
> > >
> > > If no one is picking up them this time, I probably can take it through
> > > the fsl soc tree.
> >
> > I guess Greg won't pick up this series as he didn't get a copy of it :-)
> >
> > Browsing through the history of drivers/bus/fsl-mc there is no
> > consistent maintainer to see. So if you can take it, that's very
> > appreciated.
>
> My mail was meant encouraging, maybe it was too subtile? I'll try again:
>
> Yes, please apply, that would be wonderful!

Sorry for missing your previous email. I will do that. Thanks.

Regards,
Leo

2023-05-09 07:24:04

by Michael Ellerman

[permalink] [raw]
Subject: Re: [PATCH 0/6] bus: fsl-mc: Make remove function return void

Li Yang <[email protected]> writes:
> On Mon, May 8, 2023 at 8:44 AM Uwe Kleine-König
> <[email protected]> wrote:
>>
>> Hello Leo,
>>
>> On Thu, Apr 13, 2023 at 08:00:04AM +0200, Uwe Kleine-König wrote:
>> > On Wed, Apr 12, 2023 at 09:30:05PM +0000, Leo Li wrote:
>> > > > On Fri, Mar 10, 2023 at 11:41:22PM +0100, Uwe Kleine-König wrote:
>> > > > > Hello,
>> > > > >
>> > > > > many bus remove functions return an integer which is a historic
>> > > > > misdesign that makes driver authors assume that there is some kind of
>> > > > > error handling in the upper layers. This is wrong however and
>> > > > > returning and error code only yields an error message.
>> > > > >
>> > > > > This series improves the fsl-mc bus by changing the remove callback to
>> > > > > return no value instead. As a preparation all drivers are changed to
>> > > > > return zero before so that they don't trigger the error message.
>> > > >
>> > > > Who is supposed to pick up this patch series (or point out a good reason for
>> > > > not taking it)?
>> > >
>> > > Previously Greg KH picked up MC bus patches.
>> > >
>> > > If no one is picking up them this time, I probably can take it through
>> > > the fsl soc tree.
>> >
>> > I guess Greg won't pick up this series as he didn't get a copy of it :-)
>> >
>> > Browsing through the history of drivers/bus/fsl-mc there is no
>> > consistent maintainer to see. So if you can take it, that's very
>> > appreciated.
>>
>> My mail was meant encouraging, maybe it was too subtile? I'll try again:
>>
>> Yes, please apply, that would be wonderful!
>
> Sorry for missing your previous email. I will do that. Thanks.

Does MAINTAINERS need updating?

It says:

QORIQ DPAA2 FSL-MC BUS DRIVER
M: Stuart Yoder <[email protected]>
M: Laurentiu Tudor <[email protected]>
L: [email protected]
S: Maintained
...
F: drivers/bus/fsl-mc/


cheers

2023-05-30 13:59:38

by Uwe Kleine-König

[permalink] [raw]
Subject: Re: [PATCH 0/6] bus: fsl-mc: Make remove function return void

Hello,

On Mon, May 08, 2023 at 04:57:00PM -0500, Li Yang wrote:
> On Mon, May 8, 2023 at 8:44 AM Uwe Kleine-König
> <[email protected]> wrote:
> > On Thu, Apr 13, 2023 at 08:00:04AM +0200, Uwe Kleine-König wrote:
> > > On Wed, Apr 12, 2023 at 09:30:05PM +0000, Leo Li wrote:
> > > > > On Fri, Mar 10, 2023 at 11:41:22PM +0100, Uwe Kleine-König wrote:
> > > > > > Hello,
> > > > > >
> > > > > > many bus remove functions return an integer which is a historic
> > > > > > misdesign that makes driver authors assume that there is some kind of
> > > > > > error handling in the upper layers. This is wrong however and
> > > > > > returning and error code only yields an error message.
> > > > > >
> > > > > > This series improves the fsl-mc bus by changing the remove callback to
> > > > > > return no value instead. As a preparation all drivers are changed to
> > > > > > return zero before so that they don't trigger the error message.
> > > > >
> > > > > Who is supposed to pick up this patch series (or point out a good reason for
> > > > > not taking it)?
> > > >
> > > > Previously Greg KH picked up MC bus patches.
> > > >
> > > > If no one is picking up them this time, I probably can take it through
> > > > the fsl soc tree.
> > >
> > > I guess Greg won't pick up this series as he didn't get a copy of it :-)
> > >
> > > Browsing through the history of drivers/bus/fsl-mc there is no
> > > consistent maintainer to see. So if you can take it, that's very
> > > appreciated.
> >
> > My mail was meant encouraging, maybe it was too subtile? I'll try again:
> >
> > Yes, please apply, that would be wonderful!
>
> Sorry for missing your previous email. I will do that. Thanks.

Either you didn't apply this patch set yet, or your tree isn't in next.
Both variants would be great to be fixed.

I have another change pending for drivers/bus/fsl-mc/fsl-mc-bus.c, would
be great to see these base patches in next first.

Best regards
Uwe

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


Attachments:
(No filename) (2.12 kB)
signature.asc (499.00 B)
Download all attachments

2023-05-31 00:20:19

by Leo Li

[permalink] [raw]
Subject: RE: [PATCH 0/6] bus: fsl-mc: Make remove function return void



> -----Original Message-----
> From: Uwe Kleine-König <[email protected]>
> Sent: Tuesday, May 30, 2023 8:51 AM
> To: Leo Li <[email protected]>
> Cc: Stuart Yoder <[email protected]>; Gaurav Jain
> <[email protected]>; Roy Pledge <[email protected]>; Diana
> Madalina Craciun (OSS) <[email protected]>; Eric Dumazet
> <[email protected]>; Ioana Ciornei <[email protected]>;
> [email protected]; Horia Geanta <[email protected]>; Jakub
> Kicinski <[email protected]>; Paolo Abeni <[email protected]>; Laurentiu
> Tudor <[email protected]>; Richard Cochran
> <[email protected]>; Pankaj Gupta <[email protected]>; Alex
> Williamson <[email protected]>; linux-arm-
> [email protected]; Herbert Xu <[email protected]>;
> [email protected]; [email protected]; Vinod Koul
> <[email protected]>; [email protected]; [email protected];
> Y.B. Lu <[email protected]>; [email protected]; linuxppc-
> [email protected]; David S. Miller <[email protected]>
> Subject: Re: [PATCH 0/6] bus: fsl-mc: Make remove function return void
>
> Hello,
>
> On Mon, May 08, 2023 at 04:57:00PM -0500, Li Yang wrote:
> > On Mon, May 8, 2023 at 8:44 AM Uwe Kleine-König
> > <[email protected]> wrote:
> > > On Thu, Apr 13, 2023 at 08:00:04AM +0200, Uwe Kleine-König wrote:
> > > > On Wed, Apr 12, 2023 at 09:30:05PM +0000, Leo Li wrote:
> > > > > > On Fri, Mar 10, 2023 at 11:41:22PM +0100, Uwe Kleine-König wrote:
> > > > > > > Hello,
> > > > > > >
> > > > > > > many bus remove functions return an integer which is a
> > > > > > > historic misdesign that makes driver authors assume that
> > > > > > > there is some kind of error handling in the upper layers.
> > > > > > > This is wrong however and returning and error code only yields an
> error message.
> > > > > > >
> > > > > > > This series improves the fsl-mc bus by changing the remove
> > > > > > > callback to return no value instead. As a preparation all
> > > > > > > drivers are changed to return zero before so that they don't
> trigger the error message.
> > > > > >
> > > > > > Who is supposed to pick up this patch series (or point out a
> > > > > > good reason for not taking it)?
> > > > >
> > > > > Previously Greg KH picked up MC bus patches.
> > > > >
> > > > > If no one is picking up them this time, I probably can take it
> > > > > through the fsl soc tree.
> > > >
> > > > I guess Greg won't pick up this series as he didn't get a copy of
> > > > it :-)
> > > >
> > > > Browsing through the history of drivers/bus/fsl-mc there is no
> > > > consistent maintainer to see. So if you can take it, that's very
> > > > appreciated.
> > >
> > > My mail was meant encouraging, maybe it was too subtile? I'll try again:
> > >
> > > Yes, please apply, that would be wonderful!
> >
> > Sorry for missing your previous email. I will do that. Thanks.
>
> Either you didn't apply this patch set yet, or your tree isn't in next.
> Both variants would be great to be fixed.
>
> I have another change pending for drivers/bus/fsl-mc/fsl-mc-bus.c, would be
> great to see these base patches in next first.

I have applied them to the next branch of my tree. They will be part of the Linux-next soon.

Regards,
Leo