Re: [usb-storage] [PATCH 1/3] usb: storage: realtek_cr: Improve function parameter data types
From: Thorsten Blum
Date: Wed Aug 13 2025 - 11:15:43 EST
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