linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/pseries: remove returning ENODEV when uevent is triggered
@ 2024-03-23  8:47 Lidong Zhong
  2024-04-09  1:02 ` Lidong Zhong
  2024-04-09  8:46 ` Michael Ellerman
  0 siblings, 2 replies; 5+ messages in thread
From: Lidong Zhong @ 2024-03-23  8:47 UTC (permalink / raw)
  To: linuxppc-dev, mpe; +Cc: lidong.zhong

We have noticed the following nuisance messages during boot

[    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: failed to send synthetic uevent
[    7.122345][ T1060] vio 4004: uevent: failed to send synthetic uevent

It's caused by either vio_register_device_node() failed to set dev->of_node or
the missing "compatible" property. Try return as much information as possible
instead of a failure. The above annoying errors can also be removed
after the patch applied.

Signed-off-by: Lidong Zhong <lidong.zhong@suse.com>
---
 arch/powerpc/platforms/pseries/vio.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/platforms/pseries/vio.c b/arch/powerpc/platforms/pseries/vio.c
index 90ff85c879bf..62961715ca24 100644
--- a/arch/powerpc/platforms/pseries/vio.c
+++ b/arch/powerpc/platforms/pseries/vio.c
@@ -1593,12 +1593,13 @@ static int vio_hotplug(const struct device *dev, struct kobj_uevent_env *env)
 
 	dn = dev->of_node;
 	if (!dn)
-		return -ENODEV;
+		goto out;
 	cp = of_get_property(dn, "compatible", NULL);
 	if (!cp)
-		return -ENODEV;
-
-	add_uevent_var(env, "MODALIAS=vio:T%sS%s", vio_dev->type, cp);
+		add_uevent_var(env, "MODALIAS=vio:T%s", vio_dev->type);
+    else
+		add_uevent_var(env, "MODALIAS=vio:T%sS%s", vio_dev->type, cp);
+out:
 	return 0;
 }
 
-- 
2.35.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-04-11  2:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-23  8:47 [PATCH] powerpc/pseries: remove returning ENODEV when uevent is triggered Lidong Zhong
2024-04-09  1:02 ` Lidong Zhong
2024-04-09  8:46 ` Michael Ellerman
2024-04-10  1:25   ` Lidong Zhong
2024-04-11  1:43     ` Lidong Zhong

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).