From: Alan Stern <stern@rowland.harvard.edu>
To: Nikhil Solanke <nikhilsolanke5@gmail.com>
Cc: linux-usb@vger.kernel.org, gregkh@linuxfoundation.org,
linux-kernel@vger.kernel.org, michal.pecio@gmail.com,
stable@vger.kernel.org, corbet@lwn.net,
skhan@linuxfoundation.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH v2] usbcore: Add quirk for 255-bytes initial config read
Date: Wed, 24 Jun 2026 10:00:38 -0400 [thread overview]
Message-ID: <eb0dfd45-91c5-49ba-a297-b183dbc52c8c@rowland.harvard.edu> (raw)
In-Reply-To: <CAFgddhJ2HeJ=oTBX_axMJcgJq7GXH9abe+LH+x9NGekGO4BMyw@mail.gmail.com>
On Wed, Jun 24, 2026 at 01:36:28PM +0530, Nikhil Solanke wrote:
> > Actually, the best approach here would be to put this single change into
> > a separate patch that comes before the current one. That removes issues
> > of making more than one functional change in one patch and improves
> > bisectability.
>
> Before? Shouldn't it be after my changes? That would make it easier to
> justify the changes. And just to be sure, you did mention it does
> align with what the intention of USB_QUIRK_DELAY_INIT, but it does
> change its behavior when the quirk is not set. Atleast from what I
> understood from the documentation and an LLM's summary, the device
> needs time to prepare the full configuration set. So, does delaying
> before the first header read really work? I can't test this since I
> don't have a device that requires the quirk to be set.
>
> I personally think adding a condition to check if the quirk is set and
> then delaying before sending the first request would be appropriate.
> What are your opinions on this.
Well, put it this way: If you change the existing behavior, that change
belongs in a separate patch. If you want to redo this patch so that it
doesn't change anything when the quirk flag isn't set, that's fine.
> Also is it fine if the string lines exceed 100 columns?
In lines containing long strings, it's okay for the string to extend
well beyond 80 columns. But then you should break the line at some
point closely following the end of the string. I'm sure you can find
examples of this if you look through some of the other source files.
> Also, is there a need to check for krealloc()'s return value? Since we
> are only shrinking the buffer, there won't be any moves or completely
> new blocks (at least as per my understanding). Do I still need to
> check its return value for completeness' sake?
It's a little tricky to track this down, but if you look in
include/linux/slab.h you'll see that krealloc() is defined as
krealloc_node(), which is defined as krealloc_node_align(), which is
defined as krealloc_node_align_noprof(), which is declared with
__must_check. So yes, you need to check the return value from
krealloc().
Of course, you could simply try not checking the return value and seeing
if that provokes a warning or error from the compiler.
Alan Stern
next prev parent reply other threads:[~2026-06-24 14:01 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-23 16:10 Nikhil Solanke
2026-06-23 18:35 ` Randy Dunlap
2026-06-23 19:08 ` Nikhil Solanke
2026-06-23 20:24 ` Alan Stern
2026-06-23 21:14 ` Nikhil Solanke
2026-06-24 1:35 ` Alan Stern
2026-06-24 8:06 ` Nikhil Solanke
2026-06-24 14:00 ` Alan Stern [this message]
2026-06-28 6:23 ` Nikhil Solanke
2026-06-28 13:55 ` Alan Stern
2026-06-28 14:50 ` Michal Pecio
2026-06-28 15:48 ` Alan Stern
2026-06-28 17:02 ` Michal Pecio
2026-06-28 17:22 ` Michal Pecio
2026-06-28 19:18 ` Alan Stern
2026-06-28 20:41 ` Michal Pecio
2026-06-28 16:38 ` Nikhil Solanke
2026-06-28 16:31 ` Nikhil Solanke
2026-06-28 19:21 ` Alan Stern
2026-06-25 13:56 ` Greg KH
2026-06-28 21:16 ` Michal Pecio
2026-06-29 5:30 ` Nikhil Solanke
2026-06-29 17:01 ` Alan Stern
2026-06-30 17:10 ` Nikhil Solanke
2026-07-06 14:46 ` Nikhil Solanke
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=eb0dfd45-91c5-49ba-a297-b183dbc52c8c@rowland.harvard.edu \
--to=stern@rowland.harvard.edu \
--cc=corbet@lwn.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=michal.pecio@gmail.com \
--cc=nikhilsolanke5@gmail.com \
--cc=skhan@linuxfoundation.org \
--cc=stable@vger.kernel.org \
/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®