mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Sergey Shtylyov <s.shtylyov@auroraos.dev>
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: Fri, 18 Sep 2026 18:21:24 -0700	[thread overview]
Message-ID: <20260918182124.487edd13@kernel.org> (raw)
In-Reply-To: <b43350d5-09d7-4fc4-9791-16bb4322d794@auroraos.dev>

On Wed, 16 Sep 2026 19:21:04 +0300 Sergey Shtylyov 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.
We have too many patches in flight these days to be chasing people's
linked series. Too many LLM-happy "helpers".

Please explain how you discovered the issue and how you tested the fix.

      reply	other threads:[~2026-09-19  1:21 UTC|newest]

Thread overview: 5+ 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 [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=20260918182124.487edd13@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --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 \
    --cc=s.shtylyov@auroraos.dev \
    /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®