From: quic_zijuhu <quic_zijuhu@quicinc.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Zijun Hu <zijun_hu@icloud.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] driver core: bus: Return -EIO instead of 0 when show/store invalid bus attribute
Date: Wed, 24 Jul 2024 22:17:56 +0800 [thread overview]
Message-ID: <1ef6fa28-8a4d-427e-8a22-98e3055280d4@quicinc.com> (raw)
In-Reply-To: <2024072449-tidy-cosigner-f681@gregkh>
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@quicinc.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@kvm-Q35:/sys/bus/gpio# ls -l
>> --w------- 1 root root 4096 7月 24 20:20 drivers_probe
>> root@kvm-Q35:/sys/bus/gpio# chmod u+r drivers_probe
>> root@kvm-Q35:/sys/bus/gpio# wc -c drivers_probe
>> 0 drivers_probe // for current design
>>
>> root@zijun-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
prev parent reply other threads:[~2024-07-24 14:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-23 14:55 Zijun Hu
2024-07-23 17:31 ` Greg Kroah-Hartman
2024-07-24 12:56 ` quic_zijuhu
2024-07-24 13:29 ` Greg Kroah-Hartman
2024-07-24 14:17 ` quic_zijuhu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1ef6fa28-8a4d-427e-8a22-98e3055280d4@quicinc.com \
--to=quic_zijuhu@quicinc.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=zijun_hu@icloud.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®