[PATCH] powerpc/pseries: remove returning ENODEV when uevent is triggered

Lidong Zhong lidong.zhong at suse.com
Tue Apr 9 11:02:30 AEST 2024


Hi Michael,

Could you share your opinion about this patch please?

Thanks,
Lidong

On Sat, Mar 23, 2024 at 4:47 PM Lidong Zhong <lidong.zhong at suse.com> wrote:

> 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 at 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
>
>

-- 
Regards,
Lidong Zhong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20240409/fceee67f/attachment-0001.htm>


More information about the Linuxppc-dev mailing list