2023-02-24 20:07:34

by Andy Shevchenko

[permalink] [raw]
Subject: [PATCH v1 1/1] devres: Pass unique name of the resource to devm_add_action()

Pass the unique name of the resource to devm_add_action(),
so it will be easier to debug managed resources.

Signed-off-by: Andy Shevchenko <[email protected]>
---
drivers/base/devres.c | 11 ++++++-----
include/linux/device.h | 5 ++++-
2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/drivers/base/devres.c b/drivers/base/devres.c
index c0e100074aa3..5c998cfac335 100644
--- a/drivers/base/devres.c
+++ b/drivers/base/devres.c
@@ -722,20 +722,21 @@ static void devm_action_release(struct device *dev, void *res)
}

/**
- * devm_add_action() - add a custom action to list of managed resources
+ * __devm_add_action() - add a custom action to list of managed resources
* @dev: Device that owns the action
* @action: Function that should be called
* @data: Pointer to data passed to @action implementation
+ * @name: Name of the resource (for debugging purposes)
*
* This adds a custom action to the list of managed resources so that
* it gets executed as part of standard resource unwinding.
*/
-int devm_add_action(struct device *dev, void (*action)(void *), void *data)
+int __devm_add_action(struct device *dev, void (*action)(void *), void *data, const char *name)
{
struct action_devres *devres;

- devres = devres_alloc(devm_action_release,
- sizeof(struct action_devres), GFP_KERNEL);
+ devres = __devres_alloc_node(devm_action_release, sizeof(struct action_devres),
+ GFP_KERNEL, NUMA_NO_NODE, name);
if (!devres)
return -ENOMEM;

@@ -745,7 +746,7 @@ int devm_add_action(struct device *dev, void (*action)(void *), void *data)
devres_add(dev, devres);
return 0;
}
-EXPORT_SYMBOL_GPL(devm_add_action);
+EXPORT_SYMBOL_GPL(__devm_add_action);

/**
* devm_remove_action() - removes previously added custom action
diff --git a/include/linux/device.h b/include/linux/device.h
index 1508e637bb26..5b9f3cb22f78 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -243,10 +243,13 @@ void __iomem *devm_of_iomap(struct device *dev,
resource_size_t *size);

/* allows to add/remove a custom action to devres stack */
-int devm_add_action(struct device *dev, void (*action)(void *), void *data);
void devm_remove_action(struct device *dev, void (*action)(void *), void *data);
void devm_release_action(struct device *dev, void (*action)(void *), void *data);

+int __devm_add_action(struct device *dev, void (*action)(void *), void *data, const char *name);
+#define devm_add_action(release, action, data) \
+ __devm_add_action(release, action, data, #action)
+
static inline int devm_add_action_or_reset(struct device *dev,
void (*action)(void *), void *data)
{
--
2.39.1



2023-03-10 13:21:38

by Mirsad Todorovac

[permalink] [raw]
Subject: Re: [PATCH v1 1/1] devres: Pass unique name of the resource to devm_add_action()

Hi, Andy,

On 2/24/23 21:07, Andy Shevchenko wrote:
> Pass the unique name of the resource to devm_add_action(),
> so it will be easier to debug managed resources.
>
> Signed-off-by: Andy Shevchenko <[email protected]>
> ---
> drivers/base/devres.c | 11 ++++++-----
> include/linux/device.h | 5 ++++-
> 2 files changed, 10 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/base/devres.c b/drivers/base/devres.c
> index c0e100074aa3..5c998cfac335 100644
> --- a/drivers/base/devres.c
> +++ b/drivers/base/devres.c
> @@ -722,20 +722,21 @@ static void devm_action_release(struct device *dev, void *res)
> }
>
> /**
> - * devm_add_action() - add a custom action to list of managed resources
> + * __devm_add_action() - add a custom action to list of managed resources
> * @dev: Device that owns the action
> * @action: Function that should be called
> * @data: Pointer to data passed to @action implementation
> + * @name: Name of the resource (for debugging purposes)
> *
> * This adds a custom action to the list of managed resources so that
> * it gets executed as part of standard resource unwinding.
> */
> -int devm_add_action(struct device *dev, void (*action)(void *), void *data)
> +int __devm_add_action(struct device *dev, void (*action)(void *), void *data, const char *name)
> {
> struct action_devres *devres;
>
> - devres = devres_alloc(devm_action_release,
> - sizeof(struct action_devres), GFP_KERNEL);
> + devres = __devres_alloc_node(devm_action_release, sizeof(struct action_devres),
> + GFP_KERNEL, NUMA_NO_NODE, name);
> if (!devres)
> return -ENOMEM;
>
> @@ -745,7 +746,7 @@ int devm_add_action(struct device *dev, void (*action)(void *), void *data)
> devres_add(dev, devres);
> return 0;
> }
> -EXPORT_SYMBOL_GPL(devm_add_action);
> +EXPORT_SYMBOL_GPL(__devm_add_action);
>
> /**
> * devm_remove_action() - removes previously added custom action
> diff --git a/include/linux/device.h b/include/linux/device.h
> index 1508e637bb26..5b9f3cb22f78 100644
> --- a/include/linux/device.h
> +++ b/include/linux/device.h
> @@ -243,10 +243,13 @@ void __iomem *devm_of_iomap(struct device *dev,
> resource_size_t *size);
>
> /* allows to add/remove a custom action to devres stack */
> -int devm_add_action(struct device *dev, void (*action)(void *), void *data);
> void devm_remove_action(struct device *dev, void (*action)(void *), void *data);
> void devm_release_action(struct device *dev, void (*action)(void *), void *data);
>
> +int __devm_add_action(struct device *dev, void (*action)(void *), void *data, const char *name);
> +#define devm_add_action(release, action, data) \
> + __devm_add_action(release, action, data, #action)
> +
> static inline int devm_add_action_or_reset(struct device *dev,
> void (*action)(void *), void *data)
> {

I have built last couple of kernels including 6.3-rc1+ w your patch.

(I'm late two weeks w testing, but those were rather busy two weeks.)

I see what it is meant to do, but I am unsure of how to test whether it works.

Being the unfaithful Thomas, I always prefer to test rather to just assume it
is OK.

Is this OK output you expected to see in syslog?

Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000ea28d384 action (16 bytes)
Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 000000000cb0e6b1 devm_kzalloc_release (16 bytes)
Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 0000000056043cc0 devm_kzalloc_release (40 bytes)
Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000c904ae95 devm_kzalloc_release (24 bytes)
Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000cd39c068 devm_kzalloc_release (40 bytes)
Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000918a0de4 devm_kzalloc_release (40 bytes)
Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 000000008192a378 devm_kzalloc_release (10 bytes)
Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 000000004090f288 action (16 bytes)
Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 000000004090f288 action (16 bytes)
Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 000000008192a378 devm_kzalloc_release (10 bytes)
Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000918a0de4 devm_kzalloc_release (40 bytes)
Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000cd39c068 devm_kzalloc_release (40 bytes)
Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000c904ae95 devm_kzalloc_release (24 bytes)
Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 0000000056043cc0 devm_kzalloc_release (40 bytes)
Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 000000000cb0e6b1 devm_kzalloc_release (16 bytes)
Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000ea28d384 action (16 bytes)

NOTE: Maybe I should emphasise that this is not seen in either dmesg or kernel console.

I have just checked, and DEVRES lines are only in /var/log/messages (on AlmaLinux 8.7, CentOS fork).

As you must have guessed yourself already, this will frustrate debugging past the lifetime of rsyslog process.

Also, there is no way known to me to access dmesg log from the previous kernel run.

Thanks,
Mirsad


--
Mirsad Goran Todorovac
Sistem inženjer
Grafički fakultet | Akademija likovnih umjetnosti
Sveučilište u Zagrebu

System engineer
Faculty of Graphic Arts | Academy of Fine Arts
University of Zagreb, Republic of Croatia

2023-03-10 14:13:50

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH v1 1/1] devres: Pass unique name of the resource to devm_add_action()

On Fri, Mar 10, 2023 at 02:21:24PM +0100, Mirsad Todorovac wrote:
> On 2/24/23 21:07, Andy Shevchenko wrote:
> > Pass the unique name of the resource to devm_add_action(),
> > so it will be easier to debug managed resources.

...

> (I'm late two weeks w testing, but those were rather busy two weeks.)

Thank you for this test!

> I see what it is meant to do, but I am unsure of how to test whether it works.

Your test below is good enough.

> Being the unfaithful Thomas, I always prefer to test rather to just assume it
> is OK.
>
> Is this OK output you expected to see in syslog?

Not really. It seems that we need to also wrap the devm_add_action_or_reset()
separately.

> Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000ea28d384 action (16 bytes)

> Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 000000004090f288 action (16 bytes)
> Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 000000004090f288 action (16 bytes)

> Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000ea28d384 action (16 bytes)

Instead of 'action' we need to see the real name of the action.

> NOTE: Maybe I should emphasise that this is not seen in either dmesg or kernel console.

Do you have 'ignore_loglevel' in the kernel command line? You should,
independently on this patch, for debug testing.

> I have just checked, and DEVRES lines are only in /var/log/messages (on AlmaLinux 8.7, CentOS fork).
>
> As you must have guessed yourself already, this will frustrate debugging past the lifetime of rsyslog process.
>
> Also, there is no way known to me to access dmesg log from the previous kernel run.

Can you test this on top?

diff --git a/include/linux/device.h b/include/linux/device.h
index 0f128520f6e5..12dc08aa5c0f 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -250,17 +250,19 @@ int __devm_add_action(struct device *dev, void (*action)(void *), void *data, co
#define devm_add_action(release, action, data) \
__devm_add_action(release, action, data, #action)

-static inline int devm_add_action_or_reset(struct device *dev,
- void (*action)(void *), void *data)
+static inline int __devm_add_action_or_reset(struct device *dev, void (*action)(void *),
+ void *data, const char *name)
{
int ret;

- ret = devm_add_action(dev, action, data);
+ ret = __devm_add_action(dev, action, data, name);
if (ret)
action(data);

return ret;
}
+#define devm_add_action_or_reset(release, action, data) \
+ __devm_add_action_or_reset(release, action, data, #action)

/**
* devm_alloc_percpu - Resource-managed alloc_percpu

--
With Best Regards,
Andy Shevchenko



2023-03-10 21:03:04

by Mirsad Todorovac

[permalink] [raw]
Subject: Re: [PATCH v1 1/1] devres: Pass unique name of the resource to devm_add_action()

On 10. 03. 2023. 15:11, Andy Shevchenko wrote:
> On Fri, Mar 10, 2023 at 02:21:24PM +0100, Mirsad Todorovac wrote:
>> On 2/24/23 21:07, Andy Shevchenko wrote:
>>> Pass the unique name of the resource to devm_add_action(),
>>> so it will be easier to debug managed resources.
>
> ...
>
>> (I'm late two weeks w testing, but those were rather busy two weeks.)
>
> Thank you for this test!
>
>> I see what it is meant to do, but I am unsure of how to test whether it works.
>
> Your test below is good enough.
>
>> Being the unfaithful Thomas, I always prefer to test rather to just assume it
>> is OK.
>>
>> Is this OK output you expected to see in syslog?
>
> Not really. It seems that we need to also wrap the devm_add_action_or_reset()
> separately.
>
>> Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000ea28d384 action (16 bytes)
>
>> Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 000000004090f288 action (16 bytes)
>> Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 000000004090f288 action (16 bytes)
>
>> Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000ea28d384 action (16 bytes)
>
> Instead of 'action' we need to see the real name of the action.
>
>> NOTE: Maybe I should emphasise that this is not seen in either dmesg or kernel console.
>
> Do you have 'ignore_loglevel' in the kernel command line? You should,
> independently on this patch, for debug testing.
>
>> I have just checked, and DEVRES lines are only in /var/log/messages (on AlmaLinux 8.7, CentOS fork).
>>
>> As you must have guessed yourself already, this will frustrate debugging past the lifetime of rsyslog process.
>>
>> Also, there is no way known to me to access dmesg log from the previous kernel run.
>
> Can you test this on top?
>
> diff --git a/include/linux/device.h b/include/linux/device.h
> index 0f128520f6e5..12dc08aa5c0f 100644
> --- a/include/linux/device.h
> +++ b/include/linux/device.h
> @@ -250,17 +250,19 @@ int __devm_add_action(struct device *dev, void (*action)(void *), void *data, co
> #define devm_add_action(release, action, data) \
> __devm_add_action(release, action, data, #action)
>
> -static inline int devm_add_action_or_reset(struct device *dev,
> - void (*action)(void *), void *data)
> +static inline int __devm_add_action_or_reset(struct device *dev, void (*action)(void *),
> + void *data, const char *name)
> {
> int ret;
>
> - ret = devm_add_action(dev, action, data);
> + ret = __devm_add_action(dev, action, data, name);
> if (ret)
> action(data);
>
> return ret;
> }
> +#define devm_add_action_or_reset(release, action, data) \
> + __devm_add_action_or_reset(release, action, data, #action)
>
> /**
> * devm_alloc_percpu - Resource-managed alloc_percpu

Hi, Andy,

To salvage shreds of my reputation, and to try to redeem myself, I have added the
results of the testing of your new patch:

Mar 10 21:52:21 pc-mtodorov kernel: ee1004 6-0050: DEVRES ADD 00000000ae5fcd0a devm_kzalloc_release (40 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: ee1004 6-0050: DEVRES ADD 00000000baab89ca devm_pinctrl_release (8 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: ee1004 6-0050: DEVRES REM 00000000baab89ca devm_pinctrl_release (8 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: ee1004 6-0050: DEVRES REM 00000000ae5fcd0a devm_kzalloc_release (40 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: ee1004 6-0050: DEVRES ADD 00000000ae5fcd0a grp< (0 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: dummy 6-0036: DEVRES ADD 00000000933e30b0 devm_kzalloc_release (40 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: dummy 6-0036: DEVRES ADD 00000000baab89ca devm_pinctrl_release (8 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: dummy 6-0036: DEVRES REM 00000000baab89ca devm_pinctrl_release (8 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: dummy 6-0036: DEVRES REM 00000000933e30b0 devm_kzalloc_release (40 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: dummy 6-0036: DEVRES ADD 00000000933e30b0 grp< (0 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: iTCO_wdt iTCO_wdt: DEVRES ADD 0000000043c7070d devm_kzalloc_release (40 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: iTCO_wdt iTCO_wdt: DEVRES ADD 000000006dbe0493 devm_pinctrl_release (8 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: iTCO_wdt iTCO_wdt: DEVRES REM 000000006dbe0493 devm_pinctrl_release (8 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: iTCO_wdt iTCO_wdt: DEVRES REM 0000000043c7070d devm_kzalloc_release (40 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: iTCO_wdt iTCO_wdt: DEVRES ADD 00000000a95ea11e devm_kzalloc_release (264 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: iTCO_wdt iTCO_wdt: DEVRES ADD 000000006dbe0493 devm_region_release (24 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: iTCO_wdt iTCO_wdt: DEVRES ADD 00000000baab89ca devm_watchdog_unregister_device (8 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: dummy 6-0037: DEVRES ADD 0000000037112e00 devm_kzalloc_release (40 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: dummy 6-0037: DEVRES ADD 00000000ca0360c0 devm_pinctrl_release (8 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: dummy 6-0037: DEVRES REM 00000000ca0360c0 devm_pinctrl_release (8 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: dummy 6-0037: DEVRES REM 0000000037112e00 devm_kzalloc_release (40 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: dummy 6-0037: DEVRES ADD 0000000037112e00 grp< (0 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: mei_pxp 0000:00:16.0-fbf6fcf1-96cf-4e2e-a6a6-1bab8cbe36b1: DEVRES ADD 00000000b4bf0c12 devm_kzalloc_release (40 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: mei_pxp 0000:00:16.0-fbf6fcf1-96cf-4e2e-a6a6-1bab8cbe36b1: DEVRES ADD 000000003526cf75 devm_pinctrl_release (8 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: mei_pxp 0000:00:16.0-fbf6fcf1-96cf-4e2e-a6a6-1bab8cbe36b1: DEVRES REM 000000003526cf75 devm_pinctrl_release (8 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: mei_pxp 0000:00:16.0-fbf6fcf1-96cf-4e2e-a6a6-1bab8cbe36b1: DEVRES REM 00000000b4bf0c12 devm_kzalloc_release (40 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: mei_pxp 0000:00:16.0-fbf6fcf1-96cf-4e2e-a6a6-1bab8cbe36b1: DEVRES ADD 000000004bacd6f3 devm_component_match_release (24 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: DEVRES ADD 0000000065ad123d devm_kzalloc_release (40 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: DEVRES ADD 00000000bb1c4583 devm_pinctrl_release (8 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: DEVRES REM 00000000bb1c4583 devm_pinctrl_release (8 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: DEVRES REM 0000000065ad123d devm_kzalloc_release (40 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: DEVRES ADD 000000006644ad22 devm_component_match_release (24 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: DEVRES ADD 000000004f14b994 grp< (0 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: DEVRES ADD 000000003aeb5de2 grp< (0 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: i915 0000:00:02.0: DEVRES ADD 00000000cd2865de grp< (0 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: i915 0000:00:02.0: DEVRES ADD 0000000022dabe44 grp> (0 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: DEVRES REM 000000003aeb5de2 grp< (0 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: DEVRES ADD 0000000056f49ea5 grp> (0 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: dw-apb-uart dw-apb-uart.2: DEVRES ADD 000000003cd2c98e devm_kzalloc_release (40 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: dw-apb-uart dw-apb-uart.2: DEVRES ADD 00000000b47bd9f7 devm_pinctrl_release (8 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: dw-apb-uart dw-apb-uart.2: DEVRES REM 00000000b47bd9f7 devm_pinctrl_release (8 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: dw-apb-uart dw-apb-uart.2: DEVRES REM 000000003cd2c98e devm_kzalloc_release (40 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: dw-apb-uart dw-apb-uart.2: DEVRES ADD 00000000b47bd9f7 devm_ioremap_release (8 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: dw-apb-uart dw-apb-uart.2: DEVRES ADD 0000000052b2bb32 devm_kzalloc_release (408 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: dw-apb-uart dw-apb-uart.2: DEVRES ADD 000000003b495889 devm_clk_release (16 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: dw-apb-uart dw-apb-uart.2: DEVRES ADD 00000000ae5139e1 dw8250_clk_disable_unprepare (16 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: dw-apb-uart dw-apb-uart.2: DEVRES ADD 000000005efbd9ea devm_clk_release (16 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: dw-apb-uart dw-apb-uart.2: DEVRES ADD 0000000081d73ebe dw8250_clk_disable_unprepare (16 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: dw-apb-uart dw-apb-uart.2: DEVRES ADD 00000000e781ae02 dw8250_reset_control_assert (16 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: intel_rapl_msr intel_rapl_msr.0: DEVRES ADD 000000003cc64d8c devm_kzalloc_release (40 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: intel_rapl_msr intel_rapl_msr.0: DEVRES ADD 0000000099d7449c devm_pinctrl_release (8 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: intel_rapl_msr intel_rapl_msr.0: DEVRES REM 0000000099d7449c devm_pinctrl_release (8 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: intel_rapl_msr intel_rapl_msr.0: DEVRES REM 000000003cc64d8c devm_kzalloc_release (40 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: snd_hda_codec_hdmi hdaudioC0D2: DEVRES ADD 0000000010841cf4 devm_kzalloc_release (40 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: snd_hda_codec_hdmi hdaudioC0D2: DEVRES ADD 00000000c7c75ea5 devm_pinctrl_release (8 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: snd_hda_codec_hdmi hdaudioC0D2: DEVRES REM 00000000c7c75ea5 devm_pinctrl_release (8 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: snd_hda_codec_hdmi hdaudioC0D2: DEVRES REM 0000000010841cf4 devm_kzalloc_release (40 bytes)
Mar 10 21:52:21 pc-mtodorov kernel: snd_hda_codec_hdmi hdaudioC0D2: DEVRES ADD 00000000c7c75ea5 dev_get_regmap_release (8 bytes)

Somehow after adding ignore_loglevel I fail to reproduce GPIO-SIM DEVRES entries.

I have no idea what grp< and grp> should be.

Hope this helps.

Regards,
Mirsad

--
Mirsad Goran Todorovac
Sistem inženjer
Grafički fakultet | Akademija likovnih umjetnosti
Sveučilište u Zagrebu

System engineer
Faculty of Graphic Arts | Academy of Fine Arts
University of Zagreb, Republic of Croatia
The European Union


2023-03-10 23:03:20

by Mirsad Todorovac

[permalink] [raw]
Subject: Re: [PATCH v1 1/1] devres: Pass unique name of the resource to devm_add_action() P.S.

On 10. 03. 2023. 15:11, Andy Shevchenko wrote:
> On Fri, Mar 10, 2023 at 02:21:24PM +0100, Mirsad Todorovac wrote:
>> On 2/24/23 21:07, Andy Shevchenko wrote:
>>> Pass the unique name of the resource to devm_add_action(),
>>> so it will be easier to debug managed resources.
>
> ...
>
>> (I'm late two weeks w testing, but those were rather busy two weeks.)
>
> Thank you for this test!
>
>> I see what it is meant to do, but I am unsure of how to test whether it works.
>
> Your test below is good enough.
>
>> Being the unfaithful Thomas, I always prefer to test rather to just assume it
>> is OK.
>>
>> Is this OK output you expected to see in syslog?
>
> Not really. It seems that we need to also wrap the devm_add_action_or_reset()
> separately.
>
>> Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000ea28d384 action (16 bytes)
>
>> Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 000000004090f288 action (16 bytes)
>> Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 000000004090f288 action (16 bytes)
>
>> Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000ea28d384 action (16 bytes)
>
> Instead of 'action' we need to see the real name of the action.
>
>> NOTE: Maybe I should emphasise that this is not seen in either dmesg or kernel console.
>
> Do you have 'ignore_loglevel' in the kernel command line? You should,
> independently on this patch, for debug testing.
>
>> I have just checked, and DEVRES lines are only in /var/log/messages (on AlmaLinux 8.7, CentOS fork).
>>
>> As you must have guessed yourself already, this will frustrate debugging past the lifetime of rsyslog process.
>>
>> Also, there is no way known to me to access dmesg log from the previous kernel run.
>
> Can you test this on top?
>
> diff --git a/include/linux/device.h b/include/linux/device.h
> index 0f128520f6e5..12dc08aa5c0f 100644
> --- a/include/linux/device.h
> +++ b/include/linux/device.h
> @@ -250,17 +250,19 @@ int __devm_add_action(struct device *dev, void (*action)(void *), void *data, co
> #define devm_add_action(release, action, data) \
> __devm_add_action(release, action, data, #action)
>
> -static inline int devm_add_action_or_reset(struct device *dev,
> - void (*action)(void *), void *data)
> +static inline int __devm_add_action_or_reset(struct device *dev, void (*action)(void *),
> + void *data, const char *name)
> {
> int ret;
>
> - ret = devm_add_action(dev, action, data);
> + ret = __devm_add_action(dev, action, data, name);
> if (ret)
> action(data);
>
> return ret;
> }
> +#define devm_add_action_or_reset(release, action, data) \
> + __devm_add_action_or_reset(release, action, data, #action)
>
> /**
> * devm_alloc_percpu - Resource-managed alloc_percpu

Hi again,

I hope I am not harassing you with these patch tests, but I wanted
to have something done before the weekend rest.

But I consider myself more an enthusiast than professional software
developer, let alone the Linux kernel developer. Tester, maybe.

W/o cmdline option ignore_loglevel I get gpio-sim.sh DEVRES trace,
which didn't show in the previous run with the cmdline option on
and attempted "echo 0 > /sys/module/printk/parameters/ignore_loglevel".

I have used the same method of enabling gpio-sim trace in both cases:

[root@pc-mtodorov gpio]# echo 1 > /sys/kernel/tracing/events/gpio/enable

The output looks like:

Mar 10 23:42:01 pc-mtodorov kernel: gpio_stub_drv gpiochip19: DEVRES ADD 00000000b9d73192 devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio_stub_drv gpiochip19: DEVRES ADD 00000000db6dfc59 devm_pinctrl_release (8 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio_stub_drv gpiochip19: DEVRES REM 00000000db6dfc59 devm_pinctrl_release (8 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio_stub_drv gpiochip19: DEVRES REM 00000000b9d73192 devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000db6dfc59 devm_gpio_chip_release (16 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 000000000a8e239e devm_kzalloc_release (72 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000b9d73192 devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 000000001cca9244 devm_kzalloc_release (24 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000b48fafb3 devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000851e261f devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000fdd26366 devm_kzalloc_release (10 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 000000009da8f8c1 devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000d2943a71 devm_kzalloc_release (24 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 0000000079ee058a devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000a438b9e3 devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000ac3cbdf9 devm_kzalloc_release (10 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 0000000056e918b2 devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000ef18c8eb devm_kzalloc_release (24 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 0000000000a01175 devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000899b03e8 devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 0000000054d38b9e devm_kzalloc_release (10 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000e6cd1347 devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000f66bdca7 devm_kzalloc_release (24 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000988ba3f7 devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 000000008cb9b21c devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 000000009bf508f9 devm_kzalloc_release (10 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000c3dd6a9d devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 0000000045c8d318 devm_kzalloc_release (24 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000c955af94 devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000dc8d8fe4 devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000157ab2af devm_kzalloc_release (10 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000cd587eda devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 0000000034a5b9e7 devm_kzalloc_release (24 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 000000007ae99ea1 devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 000000009ecae236 devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 000000001c1415ef devm_kzalloc_release (10 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000fcdf925a devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 0000000020285b2d devm_kzalloc_release (24 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000fa7f9d4a devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000c5b2d23e devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000acaa5f2e devm_kzalloc_release (10 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000445e422d devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 0000000014549196 devm_kzalloc_release (24 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000847e426d devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 0000000026c20f81 devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000a88df26e devm_kzalloc_release (10 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 000000000eaf3f56 gpio_sim_sysfs_remove (16 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 000000000eaf3f56 gpio_sim_sysfs_remove (16 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000a88df26e devm_kzalloc_release (10 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 0000000026c20f81 devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000847e426d devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 0000000014549196 devm_kzalloc_release (24 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000445e422d devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000acaa5f2e devm_kzalloc_release (10 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000c5b2d23e devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000fa7f9d4a devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 0000000020285b2d devm_kzalloc_release (24 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000fcdf925a devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 000000001c1415ef devm_kzalloc_release (10 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 000000009ecae236 devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 000000007ae99ea1 devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 0000000034a5b9e7 devm_kzalloc_release (24 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000cd587eda devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000157ab2af devm_kzalloc_release (10 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000dc8d8fe4 devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000c955af94 devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 0000000045c8d318 devm_kzalloc_release (24 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000c3dd6a9d devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 000000009bf508f9 devm_kzalloc_release (10 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 000000008cb9b21c devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000988ba3f7 devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000f66bdca7 devm_kzalloc_release (24 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000e6cd1347 devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 0000000054d38b9e devm_kzalloc_release (10 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000899b03e8 devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 0000000000a01175 devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000ef18c8eb devm_kzalloc_release (24 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 0000000056e918b2 devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000ac3cbdf9 devm_kzalloc_release (10 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000a438b9e3 devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 0000000079ee058a devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000d2943a71 devm_kzalloc_release (24 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 000000009da8f8c1 devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000fdd26366 devm_kzalloc_release (10 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000851e261f devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000b48fafb3 devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 000000001cca9244 devm_kzalloc_release (24 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000b9d73192 devm_kzalloc_release (40 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 000000000a8e239e devm_kzalloc_release (72 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000db6dfc59 devm_gpio_chip_release (16 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 000000008be0d08c gpio_sim_mutex_destroy (16 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000cca4b2d6 devm_irq_domain_remove_sim (16 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000f848380a devm_bitmap_free (16 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 0000000050ab06c8 devm_bitmap_free (16 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 0000000064ebe727 devm_bitmap_free (16 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 000000004d67f192 devm_kzalloc_release (656 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 0000000064c8d56b devm_kzalloc_release (17 bytes)

Please note that "rmmod gpio-sim" didn't add any new DEVRES entries, if that makes
a difference.

I've been trying to separate the events by running "gpio-sim.sh" at 23:42 and "rmmod gpio-sim" at 23:45,
and the result is evident, but will not delve now into it because I am a bit weather-beaten.

In particular, when comparing to the old test results without the last change:

Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000ea28d384 action (16 bytes)
Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 000000000cb0e6b1 devm_kzalloc_release (16 bytes)
Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 0000000056043cc0 devm_kzalloc_release (40 bytes)
Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000c904ae95 devm_kzalloc_release (24 bytes)
Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000cd39c068 devm_kzalloc_release (40 bytes)
Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000918a0de4 devm_kzalloc_release (40 bytes)
Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 000000008192a378 devm_kzalloc_release (10 bytes)
Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 000000004090f288 action (16 bytes)
Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 000000004090f288 action (16 bytes)
Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 000000008192a378 devm_kzalloc_release (10 bytes)
Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000918a0de4 devm_kzalloc_release (40 bytes)
Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000cd39c068 devm_kzalloc_release (40 bytes)
Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000c904ae95 devm_kzalloc_release (24 bytes)
Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 0000000056043cc0 devm_kzalloc_release (40 bytes)
Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 000000000cb0e6b1 devm_kzalloc_release (16 bytes)
Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000ea28d384 action (16 bytes)

.. there were these "action" calls with (16 bytes).

Now those look like this, if I figured it out well:

Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000567cd854 devm_bitmap_free (16 bytes)
Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 0000000098394533 devm_bitmap_free (16 bytes)
Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 0000000064c8d56b devm_bitmap_free (16 bytes)
Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 000000007c05a459 devm_bitmap_free (16 bytes)
Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 0000000056f5b5e6 devm_bitmap_free (16 bytes)
Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000ab3f962b devm_bitmap_free (16 bytes)
Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000c0a797cb devm_irq_domain_remove_sim (16 bytes)
Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 000000007ad662a5 gpio_sim_mutex_destroy (16 bytes)
Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000d12bc3dc devm_gpio_chip_release (16 bytes)
Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 000000002de3d4c9 gpio_sim_sysfs_remove (16 bytes)
Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 000000002de3d4c9 gpio_sim_sysfs_remove (16 bytes)
Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000d12bc3dc devm_gpio_chip_release (16 bytes)
Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 000000007ad662a5 gpio_sim_mutex_destroy (16 bytes)
Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000c0a797cb devm_irq_domain_remove_sim (16 bytes)
Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000ab3f962b devm_bitmap_free (16 bytes)
Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 0000000056f5b5e6 devm_bitmap_free (16 bytes)
Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 000000007c05a459 devm_bitmap_free (16 bytes)
Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000cbf11512 devm_bitmap_free (16 bytes)
Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 0000000023cc8968 devm_bitmap_free (16 bytes)
Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000cd9fed5b devm_bitmap_free (16 bytes)
Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000e2c397e4 devm_irq_domain_remove_sim (16 bytes)
Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000cb4dbe1d gpio_sim_mutex_destroy (16 bytes)
Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 0000000065384fb9 devm_gpio_chip_release (16 bytes)
Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000fe114c27 devm_kzalloc_release (16 bytes)
Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 000000001c3cf972 gpio_sim_sysfs_remove (16 bytes)
Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 000000001c3cf972 gpio_sim_sysfs_remove (16 bytes)
Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000fe114c27 devm_kzalloc_release (16 bytes)
Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 0000000065384fb9 devm_gpio_chip_release (16 bytes)
Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000cb4dbe1d gpio_sim_mutex_destroy (16 bytes)
Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000e2c397e4 devm_irq_domain_remove_sim (16 bytes)
Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000cd9fed5b devm_bitmap_free (16 bytes)
Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 0000000023cc8968 devm_bitmap_free (16 bytes)
Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000cbf11512 devm_bitmap_free (16 bytes)
Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000477f9c62 devm_bitmap_free (16 bytes)
Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000210ce87c devm_bitmap_free (16 bytes)
Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000629819f6 devm_bitmap_free (16 bytes)
Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 0000000023a7be05 devm_irq_domain_remove_sim (16 bytes)
Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 000000001723fc6e gpio_sim_mutex_destroy (16 bytes)
Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 000000000b9b893b devm_gpio_chip_release (16 bytes)
Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000493d92e3 gpio_sim_sysfs_remove (16 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000493d92e3 gpio_sim_sysfs_remove (16 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 000000000b9b893b devm_gpio_chip_release (16 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 000000001723fc6e gpio_sim_mutex_destroy (16 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 0000000023a7be05 devm_irq_domain_remove_sim (16 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000629819f6 devm_bitmap_free (16 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000210ce87c devm_bitmap_free (16 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000477f9c62 devm_bitmap_free (16 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 0000000064ebe727 devm_bitmap_free (16 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 0000000050ab06c8 devm_bitmap_free (16 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000f848380a devm_bitmap_free (16 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000cca4b2d6 devm_irq_domain_remove_sim (16 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 000000008be0d08c gpio_sim_mutex_destroy (16 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000db6dfc59 devm_gpio_chip_release (16 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 000000000eaf3f56 gpio_sim_sysfs_remove (16 bytes)
Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 000000000eaf3f56 gpio_sim_sysfs_remove (16 bytes)

I hope this helps the big picture.

I hope this redeems me from by Reviewed-by: blunder?

Of course, I realise that I am doing this as a pet project ATM and you might have
professional constraints and reputation to care about I did not consider.

I certainly aim to cling to the Code of Conduct to the fullest. In the academic
sense, appropriating credits where they are due is of utmost importance, too.

I believe that errors and blunders make me authentic :-) It took me time to learn
to live with the fact that I make errors no matter how hard I might try not to.

Best regards,
Mirsad

--
Mirsad Goran Todorovac
Sistem inženjer
Grafički fakultet | Akademija likovnih umjetnosti
Sveučilište u Zagrebu

System engineer
Faculty of Graphic Arts | Academy of Fine Arts
University of Zagreb, Republic of Croatia
The European Union


2023-03-13 13:36:23

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH v1 1/1] devres: Pass unique name of the resource to devm_add_action() P.S.

On Sat, Mar 11, 2023 at 12:03:03AM +0100, Mirsad Goran Todorovac wrote:
> On 10. 03. 2023. 15:11, Andy Shevchenko wrote:

...

> In particular, when comparing to the old test results without the last change:
>
> Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000ea28d384 action (16 bytes)
> Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 000000000cb0e6b1 devm_kzalloc_release (16 bytes)
> Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 0000000056043cc0 devm_kzalloc_release (40 bytes)
> Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000c904ae95 devm_kzalloc_release (24 bytes)
> Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000cd39c068 devm_kzalloc_release (40 bytes)
> Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000918a0de4 devm_kzalloc_release (40 bytes)
> Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 000000008192a378 devm_kzalloc_release (10 bytes)
> Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 000000004090f288 action (16 bytes)
> Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 000000004090f288 action (16 bytes)
> Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 000000008192a378 devm_kzalloc_release (10 bytes)
> Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000918a0de4 devm_kzalloc_release (40 bytes)
> Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000cd39c068 devm_kzalloc_release (40 bytes)
> Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000c904ae95 devm_kzalloc_release (24 bytes)
> Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 0000000056043cc0 devm_kzalloc_release (40 bytes)
> Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 000000000cb0e6b1 devm_kzalloc_release (16 bytes)
> Mar 8 22:20:36 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000ea28d384 action (16 bytes)
>
> .. there were these "action" calls with (16 bytes).
>
> Now those look like this, if I figured it out well:
>
> Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000567cd854 devm_bitmap_free (16 bytes)
> Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 0000000098394533 devm_bitmap_free (16 bytes)
> Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 0000000064c8d56b devm_bitmap_free (16 bytes)
> Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 000000007c05a459 devm_bitmap_free (16 bytes)
> Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 0000000056f5b5e6 devm_bitmap_free (16 bytes)
> Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000ab3f962b devm_bitmap_free (16 bytes)
> Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000c0a797cb devm_irq_domain_remove_sim (16 bytes)
> Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 000000007ad662a5 gpio_sim_mutex_destroy (16 bytes)
> Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000d12bc3dc devm_gpio_chip_release (16 bytes)
> Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 000000002de3d4c9 gpio_sim_sysfs_remove (16 bytes)
> Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 000000002de3d4c9 gpio_sim_sysfs_remove (16 bytes)
> Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000d12bc3dc devm_gpio_chip_release (16 bytes)
> Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 000000007ad662a5 gpio_sim_mutex_destroy (16 bytes)
> Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000c0a797cb devm_irq_domain_remove_sim (16 bytes)
> Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000ab3f962b devm_bitmap_free (16 bytes)
> Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 0000000056f5b5e6 devm_bitmap_free (16 bytes)
> Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 000000007c05a459 devm_bitmap_free (16 bytes)
> Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000cbf11512 devm_bitmap_free (16 bytes)
> Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 0000000023cc8968 devm_bitmap_free (16 bytes)
> Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000cd9fed5b devm_bitmap_free (16 bytes)
> Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000e2c397e4 devm_irq_domain_remove_sim (16 bytes)
> Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000cb4dbe1d gpio_sim_mutex_destroy (16 bytes)
> Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 0000000065384fb9 devm_gpio_chip_release (16 bytes)
> Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000fe114c27 devm_kzalloc_release (16 bytes)
> Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 000000001c3cf972 gpio_sim_sysfs_remove (16 bytes)
> Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 000000001c3cf972 gpio_sim_sysfs_remove (16 bytes)
> Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000fe114c27 devm_kzalloc_release (16 bytes)
> Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 0000000065384fb9 devm_gpio_chip_release (16 bytes)
> Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000cb4dbe1d gpio_sim_mutex_destroy (16 bytes)
> Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000e2c397e4 devm_irq_domain_remove_sim (16 bytes)
> Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000cd9fed5b devm_bitmap_free (16 bytes)
> Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 0000000023cc8968 devm_bitmap_free (16 bytes)
> Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000cbf11512 devm_bitmap_free (16 bytes)
> Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000477f9c62 devm_bitmap_free (16 bytes)
> Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000210ce87c devm_bitmap_free (16 bytes)
> Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000629819f6 devm_bitmap_free (16 bytes)
> Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 0000000023a7be05 devm_irq_domain_remove_sim (16 bytes)
> Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 000000001723fc6e gpio_sim_mutex_destroy (16 bytes)
> Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 000000000b9b893b devm_gpio_chip_release (16 bytes)
> Mar 10 23:42:00 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000493d92e3 gpio_sim_sysfs_remove (16 bytes)
> Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000493d92e3 gpio_sim_sysfs_remove (16 bytes)
> Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 000000000b9b893b devm_gpio_chip_release (16 bytes)
> Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 000000001723fc6e gpio_sim_mutex_destroy (16 bytes)
> Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 0000000023a7be05 devm_irq_domain_remove_sim (16 bytes)
> Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000629819f6 devm_bitmap_free (16 bytes)
> Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000210ce87c devm_bitmap_free (16 bytes)
> Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 00000000477f9c62 devm_bitmap_free (16 bytes)
> Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 0000000064ebe727 devm_bitmap_free (16 bytes)
> Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 0000000050ab06c8 devm_bitmap_free (16 bytes)
> Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000f848380a devm_bitmap_free (16 bytes)
> Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000cca4b2d6 devm_irq_domain_remove_sim (16 bytes)
> Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 000000008be0d08c gpio_sim_mutex_destroy (16 bytes)
> Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 00000000db6dfc59 devm_gpio_chip_release (16 bytes)
> Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES ADD 000000000eaf3f56 gpio_sim_sysfs_remove (16 bytes)
> Mar 10 23:42:01 pc-mtodorov kernel: gpio-sim gpio-sim.0: DEVRES REL 000000000eaf3f56 gpio_sim_sysfs_remove (16 bytes)
>
> I hope this helps the big picture.

Yes, thanks! I have sent a formal patch with added Reported and Tested tags
(I hope you are fine with them, because it's what you actually did in this
thread by all means).

--
With Best Regards,
Andy Shevchenko