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 <[email protected]> --- 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
