Re: [PATCH v2 1/2] usb: serial: add support for CH348

From: Oliver Neukum
Date: Wed Oct 26 2022 - 04:02:42 EST




On 26.10.22 09:44, Corentin LABBE wrote:

Hi,



Thanks for your review, I will fix them all.

I am happy to point out issues.

[..]

+
+static int ch348_fixup_port_bulk_in(struct ch348 *ch348, struct usb_serial_port *port)
+{
+ int i;
+
+ /* Already Initialized */
+ if (port->bulk_in_size) {

BTW, shouldn't these be unsigned int?

I dont understand what you mean here.

bulk_in_size as a member of the structure is defined as int.
As a size cannot meaningfully be negative and this takes no
error reports, I was wondering whether it should be declared
an unsigned integer for the sake of cleanliness.

Regards
Oliver