[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
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 Tested-by: Ioana Ciornei # sanity checks
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 Tested-by: Laurentiu Tudor
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)? Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König| Industrial Linux Solutions | https://www.pengutronix.de/ | signature.asc Description: PGP signature
RE: [PATCH 0/6] bus: fsl-mc: Make remove function return void
> -Original Message- > From: Uwe Kleine-König > Sent: Wednesday, April 12, 2023 12:11 PM > To: Stuart Yoder ; Laurentiu Tudor > ; Roy Pledge ; Leo Li > ; Horia Geanta ; Pankaj > Gupta ; Gaurav Jain ; > Herbert Xu ; David S. Miller > ; Vinod Koul ; Ioana Ciornei > ; Eric Dumazet ; Jakub > Kicinski ; Paolo Abeni ; Y.B. Lu > ; Diana Madalina Craciun (OSS) > ; Alex Williamson > ; Richard Cochran > > Cc: k...@vger.kernel.org; net...@vger.kernel.org; linux- > ker...@vger.kernel.org; linux-cry...@vger.kernel.org; > ker...@pengutronix.de; dmaeng...@vger.kernel.org; linuxppc- > d...@lists.ozlabs.org; linux-arm-ker...@lists.infradead.org > 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
Re: [PATCH 0/6] bus: fsl-mc: Make remove function return void
Hello Leo, On Wed, Apr 12, 2023 at 09:30:05PM +, 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/ | signature.asc Description: PGP signature
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 +, 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/ | signature.asc Description: PGP signature
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 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 +, 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
Re: [PATCH 0/6] bus: fsl-mc: Make remove function return void
Li Yang writes: > On Mon, May 8, 2023 at 8:44 AM Uwe Kleine-König > 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 +, 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 M: Laurentiu Tudor L: linux-ker...@vger.kernel.org S: Maintained ... F: drivers/bus/fsl-mc/ cheers
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 > 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 +, 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/ | signature.asc Description: PGP signature
RE: [PATCH 0/6] bus: fsl-mc: Make remove function return void
> -Original Message- > From: Uwe Kleine-König > Sent: Tuesday, May 30, 2023 8:51 AM > To: Leo Li > Cc: Stuart Yoder ; Gaurav Jain > ; Roy Pledge ; Diana > Madalina Craciun (OSS) ; Eric Dumazet > ; Ioana Ciornei ; > k...@vger.kernel.org; Horia Geanta ; Jakub > Kicinski ; Paolo Abeni ; Laurentiu > Tudor ; Richard Cochran > ; Pankaj Gupta ; Alex > Williamson ; linux-arm- > ker...@lists.infradead.org; Herbert Xu ; > net...@vger.kernel.org; linux-ker...@vger.kernel.org; Vinod Koul > ; linux-cry...@vger.kernel.org; ker...@pengutronix.de; > Y.B. Lu ; dmaeng...@vger.kernel.org; linuxppc- > d...@lists.ozlabs.org; David S. Miller > 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 > > 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 +, 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