From: Sergey Shtylyov <s.shtylyov@auroraos.dev>
To: Jakub Kicinski <kuba@kernel.org>
Cc: <netdev-bot+sashiko@kernel.org>, <andrew+netdev@lunn.ch>,
<davem@davemloft.net>, <edumazet@google.com>, <pabeni@redhat.com>,
<linux-usb@vger.kernel.org>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next v2] ch9200: do return USB errors from control_write()
Date: Mon, 21 Sep 2026 22:59:10 +0300 [thread overview]
Message-ID: <354d72f6-35bc-49f0-a4f4-3555b03f0ad8@auroraos.dev> (raw)
In-Reply-To: <20260918182124.487edd13@kernel.org>
On 9/19/26 4:21 AM, Jakub Kicinski wrote:
[...]
>>> There is a second point about the resulting contract. On success
>>> usb_control_msg() returns the transferred length, so control_write() now
>>> returns a positive value (2 for these register writes) rather than 0:
>>>
>>> err = usb_control_msg(dev->udev, ...);
>>> if (err >= 0 && err < size)
>>> err = -EINVAL;
>>>
>>> Would the obvious caller-side follow-up "if (retval) return retval;" then
>>> treat every successful 2-byte register write as a failure? Would it be
>>> better to normalize success to 0 in control_write(), or to check
>>> "retval < 0" in each caller and update the callers in the same patch so
>>> the errors being returned are actually acted upon?
>> That's what the patch I linked to does...
>
> Please fix the issues in one series or not at all.
OK. Series against net-next, right?
> We have too many patches in flight these days to be chasing people's
> linked series. Too many LLM-happy "helpers".
IMHO these 2 patches are not so heavily linked, that's why I posted
them separately... And no AI was involved, of course. :-)
> Please explain how you discovered the issue and how you tested the fix.
As I noted in the description of the patch [1], the issue was reported
by the static analyzer. For the patch [2], I saw a problem with my own eyes.
I don't have the hardware, so no testing; there was some hope that e.g.
Matthew Garret (the driver's original submitter) could be able to test but
his email bounced...
[1] https://lore.kernel.org/all/20260914202503.52920-1-s.shtylyov@auroraos.dev/
[2] https://lore.kernel.org/all/20260915185805.38712-1-s.shtylyov@auroraos.dev/
MBR, Sergey
next prev parent reply other threads:[~2026-09-21 19:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-15 18:58 Sergey Shtylyov
2026-09-15 21:53 ` Andrew Lunn
2026-09-16 7:23 ` netdev-bot+sashiko
2026-09-16 16:21 ` Sergey Shtylyov
2026-09-19 1:21 ` Jakub Kicinski
2026-09-21 19:59 ` Sergey Shtylyov [this message]
2026-09-21 20:24 ` Sergey Shtylyov
2026-09-21 20:45 ` Jakub Kicinski
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=354d72f6-35bc-49f0-a4f4-3555b03f0ad8@auroraos.dev \
--to=s.shtylyov@auroraos.dev \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=netdev-bot+sashiko@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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®