* [PATCH 0/1] mcb: mcb patch for v6.20
@ 2026-01-16 11:21 Johannes Thumshirn
2026-01-16 11:21 ` [PATCH 1/1] mcb: fix incorrect sanity check Johannes Thumshirn
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Johannes Thumshirn @ 2026-01-16 11:21 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: linux-kernel, Jose Javier Rodriguez Barbarin, Johannes Thumshirn
From: Johannes Thumshirn <morbidrsa@gmail.com>
Hi Greg,
Here's a patch from Javier for mcb removing an obsolete sanity check
which ultimately caused the mcb attached gpio driver to fail loading.
Please consider this submission for 6.20
Jose Javier Rodriguez Barbarin (1):
mcb: fix incorrect sanity check
drivers/mcb/mcb-core.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
--
2.51.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/1] mcb: fix incorrect sanity check
2026-01-16 11:21 [PATCH 0/1] mcb: mcb patch for v6.20 Johannes Thumshirn
@ 2026-01-16 11:21 ` Johannes Thumshirn
2026-01-16 18:50 ` Johannes Thumshirn
2026-01-16 11:26 ` [PATCH 0/1] mcb: mcb patch for v6.20 Johannes Thumshirn
2026-01-16 18:50 ` [RESEND PATCH " Johannes Thumshirn
2 siblings, 1 reply; 6+ messages in thread
From: Johannes Thumshirn @ 2026-01-16 11:21 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: linux-kernel, Jose Javier Rodriguez Barbarin, Johannes Thumshirn
From: Jose Javier Rodriguez Barbarin <dev-josejavier.rodriguez@duagon.com>
__mcb_register_driver() makes some sanity checks over mcb_driver
to check if .probe and .remove callbacks are set. However, since commit
3bd13ae04ccc ("gpio: menz127: simplify error path and remove remove()")
removed the .remove callback from menz127-gpio.c, not all mcb device
drivers implement .remove callback.
Remove .remove check to ensure all mcb device drivers can be loaded.
Signed-off-by: Jose Javier Rodriguez Barbarin <dev-josejavier.rodriguez@duagon.com>
Fixes: 3bd13ae04ccc ("gpio: menz127: simplify error path and remove remove()")
[ jth: added statement about menz127-gpio.c ]
Signed-off-by: Johannes Thumshirn <morbidrsa@gmail.com>
---
drivers/mcb/mcb-core.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/mcb/mcb-core.c b/drivers/mcb/mcb-core.c
index c1367223e71a..3d487d75c483 100644
--- a/drivers/mcb/mcb-core.c
+++ b/drivers/mcb/mcb-core.c
@@ -85,7 +85,8 @@ static void mcb_remove(struct device *dev)
struct mcb_device *mdev = to_mcb_device(dev);
struct module *carrier_mod;
- mdrv->remove(mdev);
+ if (mdrv->remove)
+ mdrv->remove(mdev);
carrier_mod = mdev->dev.parent->driver->owner;
module_put(carrier_mod);
@@ -176,13 +177,13 @@ static const struct device_type mcb_carrier_device_type = {
* @owner: The @mcb_driver's module
* @mod_name: The name of the @mcb_driver's module
*
- * Register a @mcb_driver at the system. Perform some sanity checks, if
- * the .probe and .remove methods are provided by the driver.
+ * Register a @mcb_driver at the system. Perform a sanity check, if
+ * .probe method is provided by the driver.
*/
int __mcb_register_driver(struct mcb_driver *drv, struct module *owner,
const char *mod_name)
{
- if (!drv->probe || !drv->remove)
+ if (!drv->probe)
return -EINVAL;
drv->driver.owner = owner;
--
2.51.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 0/1] mcb: mcb patch for v6.20
2026-01-16 11:21 [PATCH 0/1] mcb: mcb patch for v6.20 Johannes Thumshirn
2026-01-16 11:21 ` [PATCH 1/1] mcb: fix incorrect sanity check Johannes Thumshirn
@ 2026-01-16 11:26 ` Johannes Thumshirn
2026-01-16 14:29 ` Greg Kroah-Hartman
2026-01-16 18:50 ` [RESEND PATCH " Johannes Thumshirn
2 siblings, 1 reply; 6+ messages in thread
From: Johannes Thumshirn @ 2026-01-16 11:26 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-kernel, Jose Javier Rodriguez Barbarin
On 1/16/26 12:21 PM, Johannes Thumshirn wrote:
> From: Johannes Thumshirn <morbidrsa@gmail.com>
>
> Hi Greg,
>
> Here's a patch from Javier for mcb removing an obsolete sanity check
> which ultimately caused the mcb attached gpio driver to fail loading.
>
> Please consider this submission for 6.20
>
> Jose Javier Rodriguez Barbarin (1):
> mcb: fix incorrect sanity check
>
> drivers/mcb/mcb-core.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
Sorry Greg,
I messed up my mail setup again.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/1] mcb: mcb patch for v6.20
2026-01-16 11:26 ` [PATCH 0/1] mcb: mcb patch for v6.20 Johannes Thumshirn
@ 2026-01-16 14:29 ` Greg Kroah-Hartman
0 siblings, 0 replies; 6+ messages in thread
From: Greg Kroah-Hartman @ 2026-01-16 14:29 UTC (permalink / raw)
To: Johannes Thumshirn; +Cc: linux-kernel, Jose Javier Rodriguez Barbarin
On Fri, Jan 16, 2026 at 12:26:57PM +0100, Johannes Thumshirn wrote:
> On 1/16/26 12:21 PM, Johannes Thumshirn wrote:
> > From: Johannes Thumshirn <morbidrsa@gmail.com>
> >
> > Hi Greg,
> >
> > Here's a patch from Javier for mcb removing an obsolete sanity check
> > which ultimately caused the mcb attached gpio driver to fail loading.
> >
> > Please consider this submission for 6.20
> >
> > Jose Javier Rodriguez Barbarin (1):
> > mcb: fix incorrect sanity check
> >
> > drivers/mcb/mcb-core.c | 9 +++++----
> > 1 file changed, 5 insertions(+), 4 deletions(-)
> >
> Sorry Greg,
>
> I messed up my mail setup again.
Can you please resend this, I don't see it anywhere :(
^ permalink raw reply [flat|nested] 6+ messages in thread
* [RESEND PATCH 0/1] mcb: mcb patch for v6.20
2026-01-16 11:21 [PATCH 0/1] mcb: mcb patch for v6.20 Johannes Thumshirn
2026-01-16 11:21 ` [PATCH 1/1] mcb: fix incorrect sanity check Johannes Thumshirn
2026-01-16 11:26 ` [PATCH 0/1] mcb: mcb patch for v6.20 Johannes Thumshirn
@ 2026-01-16 18:50 ` Johannes Thumshirn
2 siblings, 0 replies; 6+ messages in thread
From: Johannes Thumshirn @ 2026-01-16 18:50 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: linux-kernel, Jose Javier Rodriguez Barbarin, Johannes Thumshirn
Hi Greg,
Here's a patch from Javier for mcb removing an obsolete sanity check
which ultimately caused the mcb attached gpio driver to fail loading.
Please consider this submission for 6.20
Re-send because I'm too stupid to send patches from my private account,
again sorry for that.
Jose Javier Rodriguez Barbarin (1):
mcb: fix incorrect sanity check
drivers/mcb/mcb-core.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
--
2.51.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/1] mcb: fix incorrect sanity check
2026-01-16 11:21 ` [PATCH 1/1] mcb: fix incorrect sanity check Johannes Thumshirn
@ 2026-01-16 18:50 ` Johannes Thumshirn
0 siblings, 0 replies; 6+ messages in thread
From: Johannes Thumshirn @ 2026-01-16 18:50 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: linux-kernel, Jose Javier Rodriguez Barbarin, Johannes Thumshirn
From: Jose Javier Rodriguez Barbarin <dev-josejavier.rodriguez@duagon.com>
__mcb_register_driver() makes some sanity checks over mcb_driver
to check if .probe and .remove callbacks are set. However, since commit
3bd13ae04ccc ("gpio: menz127: simplify error path and remove remove()")
removed the .remove callback from menz127-gpio.c, not all mcb device
drivers implement .remove callback.
Remove .remove check to ensure all mcb device drivers can be loaded.
Signed-off-by: Jose Javier Rodriguez Barbarin <dev-josejavier.rodriguez@duagon.com>
Fixes: 3bd13ae04ccc ("gpio: menz127: simplify error path and remove remove()")
[ jth: added statement about menz127-gpio.c ]
Signed-off-by: Johannes Thumshirn <morbidrsa@gmail.com>
---
drivers/mcb/mcb-core.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/mcb/mcb-core.c b/drivers/mcb/mcb-core.c
index c1367223e71a..3d487d75c483 100644
--- a/drivers/mcb/mcb-core.c
+++ b/drivers/mcb/mcb-core.c
@@ -85,7 +85,8 @@ static void mcb_remove(struct device *dev)
struct mcb_device *mdev = to_mcb_device(dev);
struct module *carrier_mod;
- mdrv->remove(mdev);
+ if (mdrv->remove)
+ mdrv->remove(mdev);
carrier_mod = mdev->dev.parent->driver->owner;
module_put(carrier_mod);
@@ -176,13 +177,13 @@ static const struct device_type mcb_carrier_device_type = {
* @owner: The @mcb_driver's module
* @mod_name: The name of the @mcb_driver's module
*
- * Register a @mcb_driver at the system. Perform some sanity checks, if
- * the .probe and .remove methods are provided by the driver.
+ * Register a @mcb_driver at the system. Perform a sanity check, if
+ * .probe method is provided by the driver.
*/
int __mcb_register_driver(struct mcb_driver *drv, struct module *owner,
const char *mod_name)
{
- if (!drv->probe || !drv->remove)
+ if (!drv->probe)
return -EINVAL;
drv->driver.owner = owner;
--
2.51.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-01-16 18:50 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-16 11:21 [PATCH 0/1] mcb: mcb patch for v6.20 Johannes Thumshirn
2026-01-16 11:21 ` [PATCH 1/1] mcb: fix incorrect sanity check Johannes Thumshirn
2026-01-16 18:50 ` Johannes Thumshirn
2026-01-16 11:26 ` [PATCH 0/1] mcb: mcb patch for v6.20 Johannes Thumshirn
2026-01-16 14:29 ` Greg Kroah-Hartman
2026-01-16 18:50 ` [RESEND PATCH " Johannes Thumshirn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox