Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

powerpc/pseries/vio: Don't return ENODEV if node or compatible missing

We noticed the following nuisance messages during boot process:

vio vio: uevent: failed to send synthetic uevent
vio 4000: uevent: failed to send synthetic uevent
vio 4001: uevent: failed to send synthetic uevent
vio 4002: uevent: failedto send synthetic uevent
vio 4004: uevent: failed to send synthetic uevent

It's caused by either vio_register_device_node() failing to set
dev->of_node or the node is missing a "compatible" property. To match
the definition of modalias in modalias_show(), remove the return of
ENODEV in such cases. The failure messages is also suppressed with this
change.

Signed-off-by: Lidong Zhong <lidong.zhong@suse.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240411020450.12725-1-lidong.zhong@suse.com

authored by

Lidong Zhong and committed by
Michael Ellerman
29247de4 ff2e185c

+2 -6
+2 -6
arch/powerpc/platforms/pseries/vio.c
··· 1592 1592 const char *cp; 1593 1593 1594 1594 dn = dev->of_node; 1595 - if (!dn) 1596 - return -ENODEV; 1597 - cp = of_get_property(dn, "compatible", NULL); 1598 - if (!cp) 1599 - return -ENODEV; 1595 + if (dn && (cp = of_get_property(dn, "compatible", NULL))) 1596 + add_uevent_var(env, "MODALIAS=vio:T%sS%s", vio_dev->type, cp); 1600 1597 1601 - add_uevent_var(env, "MODALIAS=vio:T%sS%s", vio_dev->type, cp); 1602 1598 return 0; 1603 1599 } 1604 1600