[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2024072449-tidy-cosigner-f681@gregkh>
Date: Wed, 24 Jul 2024 15:29:34 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: quic_zijuhu <quic_zijuhu@...cinc.com>
Cc: Zijun Hu <zijun_hu@...oud.com>, "Rafael J. Wysocki" <rafael@...nel.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] driver core: bus: Return -EIO instead of 0 when
show/store invalid bus attribute
On Wed, Jul 24, 2024 at 08:56:18PM +0800, quic_zijuhu wrote:
> On 7/24/2024 1:31 AM, Greg Kroah-Hartman wrote:
> > On Tue, Jul 23, 2024 at 10:55:43PM +0800, Zijun Hu wrote:
> >> From: Zijun Hu <quic_zijuhu@...cinc.com>
> >>
> >> Return -EIO instead of 0 when show/store invalid bus attribute as
> >> class/device/driver/kobject attribute.
> >
> > Why? What is this now going to break? You are changing a user-visable
> > api that has been this way for 20+ years, how was this tested?
> >
> this change should break nothing.
Have you tested all tools that access these files? Please document what
was done for testing please.
> tested by wc a writing only bus attribute, for example
>
> root@...-Q35:/sys/bus/gpio# ls -l
> --w------- 1 root root 4096 7月 24 20:20 drivers_probe
> root@...-Q35:/sys/bus/gpio# chmod u+r drivers_probe
> root@...-Q35:/sys/bus/gpio# wc -c drivers_probe
> 0 drivers_probe // for current design
>
> root@...un-kvm-Q35:/sys/bus/gpio# wc -c drivers_probe
> wc: drivers_probe: Input/output error // for this change
That's just using a shell, I am referring to actual tools that read
these files and rely on the contents and error values that they provide.
thanks,
greg k-h
Powered by blists - more mailing lists