[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1ef6fa28-8a4d-427e-8a22-98e3055280d4@quicinc.com>
Date: Wed, 24 Jul 2024 22:17:56 +0800
From: quic_zijuhu <quic_zijuhu@...cinc.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
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 7/24/2024 9:29 PM, Greg Kroah-Hartman wrote:
> 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.
>
not yet. let me do more investigation then give reply.
sorry to send v2 without noticing this reply.
let us still discuss with this mail thread.
>> 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.
>
make sense.
> thanks,
>
> greg k-h
Powered by blists - more mailing lists