[PATCH v2] powerpc/pseries: remove returning ENODEV when uevent is triggered
Lidong Zhong
lidong.zhong at suse.com
Thu Apr 25 10:47:11 AEST 2024
Hi Michael,
Could you share your opinion about this new patch please?
On Thu, Apr 11, 2024 at 10:04 AM Lidong Zhong <lidong.zhong at suse.com> wrote:
> 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 at 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
>
>
--
Regards,
Lidong Zhong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20240425/bd46e1ba/attachment.htm>
More information about the Linuxppc-dev
mailing list