From: Lidong Zhong <lidong.zhong@suse.com>
To: mpe@ellerman.id.au, linuxppc-dev@lists.ozlabs.org
Cc: lidong.zhong@suse.com
Subject: [PATCH v2] powerpc/pseries: remove returning ENODEV when uevent is triggered
Date: Thu, 11 Apr 2024 10:04:50 +0800 [thread overview]
Message-ID: <20240411020450.12725-1-lidong.zhong@suse.com> (raw)
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
next reply other threads:[~2024-04-11 2:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-11 2:04 Lidong Zhong [this message]
2024-04-25 0:47 ` [PATCH v2] powerpc/pseries: remove returning ENODEV when uevent is triggered Lidong Zhong
2024-05-03 10:41 ` Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240411020450.12725-1-lidong.zhong@suse.com \
--to=lidong.zhong@suse.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).