Linux USB
 help / color / mirror / Atom feed
From: Thorsten Blum <thorsten.blum@linux.dev>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org, usb-storage@lists.one-eyed-alien.net,
	linux-kernel@vger.kernel.org
Subject: Re: [usb-storage] [PATCH 1/3] usb: storage: realtek_cr: Improve function parameter data types
Date: Wed, 13 Aug 2025 17:10:10 +0200	[thread overview]
Message-ID: <E3437C91-EF05-4EB2-8998-10D599ED3AAD@linux.dev> (raw)
In-Reply-To: <a6deb8d0-dc8e-4d4a-94d2-ed2617091eef@rowland.harvard.edu>

On 13. Aug 2025, at 15:59, Alan Stern wrote:
> I just looked through the original source file.  What about 
> rts51x_bulk_transport_special()?  Shouldn't its buf_len parameter also 
> be unsigned?
> 
> For that matter, what about cmd_len in both routines?
> 
> And have you checked the corresponding values in all the other 
> usb-storage subdrivers?
> 
> As you can see, worrying about the difference between signed and 
> unsigned values, when it doesn't really matter, quickly leads to a 
> morass.

There are many other instances throughout the kernel where types could
be improved, which is why I originally combined this with the if check
change and limited the data type changes to that scope. Feel free to
skip this one, as it might not be worthwhile as a standalone patch.

Thanks,
Thorsten


      reply	other threads:[~2025-08-13 15:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-13 10:12 [PATCH 1/3] usb: storage: realtek_cr: Improve function parameter data types Thorsten Blum
2025-08-13 10:12 ` [PATCH 2/3] usb: storage: realtek_cr: Simplify residue calculation in rts51x_bulk_transport() Thorsten Blum
2025-08-13 14:00   ` Alan Stern
2025-08-13 10:12 ` [PATCH 3/3] usb: storage: realtek_cr: Use correct byte order for bcs->Residue Thorsten Blum
2025-08-13 14:00   ` Alan Stern
2025-08-13 14:39   ` Greg Kroah-Hartman
2025-08-13 14:57     ` Thorsten Blum
2025-08-13 13:59 ` [usb-storage] [PATCH 1/3] usb: storage: realtek_cr: Improve function parameter data types Alan Stern
2025-08-13 15:10   ` Thorsten Blum [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=E3437C91-EF05-4EB2-8998-10D599ED3AAD@linux.dev \
    --to=thorsten.blum@linux.dev \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    --cc=usb-storage@lists.one-eyed-alien.net \
    /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