* [PATCH v2] powerpc/pseries: remove returning ENODEV when uevent is triggered
@ 2024-04-11 2:04 Lidong Zhong
2024-04-25 0:47 ` Lidong Zhong
2024-05-03 10:41 ` Michael Ellerman
0 siblings, 2 replies; 3+ messages in thread
From: Lidong Zhong @ 2024-04-11 2:04 UTC (permalink / raw)
To: mpe, linuxppc-dev; +Cc: lidong.zhong
We noticed the following nuisance messages during boot process
[ 7.120610][ T1060] vio vio: uevent: failed to send synthetic uevent
[ 7.122281][ T1060] vio 4000: uevent: failed to send synthetic uevent
[ 7.122304][ T1060] vio 4001: uevent: failed to send synthetic uevent
[ 7.122324][ T1060] vio 4002: uevent: failedto send synthetic uevent
[ 7.122345][ T1060] vio 4004: uevent: failed to send synthetic uevent
It's caused by either vio_register_device_node() fails to set dev->of_node
or the missing "compatible" property. To keep align with the definition of
modalias in modalias_show(), we remove the return of ENODEV in such cases.
The failure messages can also be suppressed with this change.
v2: keep align the definition of modalias with modalias_show()
Signed-off-by: Lidong Zhong <lidong.zhong@suse.com>
---
arch/powerpc/platforms/pseries/vio.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/arch/powerpc/platforms/pseries/vio.c b/arch/powerpc/platforms/pseries/vio.c
index 90ff85c879bf..b2babfdbc40b 100644
--- a/arch/powerpc/platforms/pseries/vio.c
+++ b/arch/powerpc/platforms/pseries/vio.c
@@ -1592,13 +1592,9 @@ static int vio_hotplug(const struct device *dev, struct kobj_uevent_env *env)
const char *cp;
dn = dev->of_node;
- if (!dn)
- return -ENODEV;
- cp = of_get_property(dn, "compatible", NULL);
- if (!cp)
- return -ENODEV;
+ if (dn && (cp = of_get_property(dn, "compatible", NULL)))
+ add_uevent_var(env, "MODALIAS=vio:T%sS%s", vio_dev->type, cp);
- add_uevent_var(env, "MODALIAS=vio:T%sS%s", vio_dev->type, cp);
return 0;
}
--
2.35.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] powerpc/pseries: remove returning ENODEV when uevent is triggered
2024-04-11 2:04 [PATCH v2] powerpc/pseries: remove returning ENODEV when uevent is triggered Lidong Zhong
@ 2024-04-25 0:47 ` Lidong Zhong
2024-05-03 10:41 ` Michael Ellerman
1 sibling, 0 replies; 3+ messages in thread
From: Lidong Zhong @ 2024-04-25 0:47 UTC (permalink / raw)
To: mpe; +Cc: linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 2025 bytes --]
Hi Michael,
Could you share your opinion about this new patch please?
On Thu, Apr 11, 2024 at 10:04 AM Lidong Zhong <lidong.zhong@suse.com> wrote:
> We noticed the following nuisance messages during boot process
>
> [ 7.120610][ T1060] vio vio: uevent: failed to send synthetic uevent
> [ 7.122281][ T1060] vio 4000: uevent: failed to send synthetic uevent
> [ 7.122304][ T1060] vio 4001: uevent: failed to send synthetic uevent
> [ 7.122324][ T1060] vio 4002: uevent: failedto send synthetic uevent
> [ 7.122345][ T1060] vio 4004: uevent: failed to send synthetic uevent
>
> It's caused by either vio_register_device_node() fails to set dev->of_node
> or the missing "compatible" property. To keep align with the definition of
> modalias in modalias_show(), we remove the return of ENODEV in such cases.
> The failure messages can also be suppressed with this change.
>
> v2: keep align the definition of modalias with modalias_show()
> Signed-off-by: Lidong Zhong <lidong.zhong@suse.com>
> ---
> arch/powerpc/platforms/pseries/vio.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/arch/powerpc/platforms/pseries/vio.c
> b/arch/powerpc/platforms/pseries/vio.c
> index 90ff85c879bf..b2babfdbc40b 100644
> --- a/arch/powerpc/platforms/pseries/vio.c
> +++ b/arch/powerpc/platforms/pseries/vio.c
> @@ -1592,13 +1592,9 @@ static int vio_hotplug(const struct device *dev,
> struct kobj_uevent_env *env)
> const char *cp;
>
> dn = dev->of_node;
> - if (!dn)
> - return -ENODEV;
> - cp = of_get_property(dn, "compatible", NULL);
> - if (!cp)
> - return -ENODEV;
> + if (dn && (cp = of_get_property(dn, "compatible", NULL)))
> + add_uevent_var(env, "MODALIAS=vio:T%sS%s", vio_dev->type,
> cp);
>
> - add_uevent_var(env, "MODALIAS=vio:T%sS%s", vio_dev->type, cp);
> return 0;
> }
>
> --
> 2.35.3
>
>
--
Regards,
Lidong Zhong
[-- Attachment #2: Type: text/html, Size: 2789 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] powerpc/pseries: remove returning ENODEV when uevent is triggered
2024-04-11 2:04 [PATCH v2] powerpc/pseries: remove returning ENODEV when uevent is triggered Lidong Zhong
2024-04-25 0:47 ` Lidong Zhong
@ 2024-05-03 10:41 ` Michael Ellerman
1 sibling, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2024-05-03 10:41 UTC (permalink / raw)
To: mpe, linuxppc-dev, Lidong Zhong
On Thu, 11 Apr 2024 10:04:50 +0800, Lidong Zhong wrote:
> We noticed the following nuisance messages during boot process
>
> [ 7.120610][ T1060] vio vio: uevent: failed to send synthetic uevent
> [ 7.122281][ T1060] vio 4000: uevent: failed to send synthetic uevent
> [ 7.122304][ T1060] vio 4001: uevent: failed to send synthetic uevent
> [ 7.122324][ T1060] vio 4002: uevent: failedto send synthetic uevent
> [ 7.122345][ T1060] vio 4004: uevent: failed to send synthetic uevent
>
> [...]
Applied to powerpc/next.
[1/1] powerpc/pseries: remove returning ENODEV when uevent is triggered
https://git.kernel.org/powerpc/c/29247de4ad753771afef95ace8af738d807ca279
cheers
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-05-03 10:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-11 2:04 [PATCH v2] powerpc/pseries: remove returning ENODEV when uevent is triggered Lidong Zhong
2024-04-25 0:47 ` Lidong Zhong
2024-05-03 10:41 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).