[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <8b99ac02-fc68-4797-94c1-c9b1ecb8ea62@linaro.org>
Date: Mon, 16 Sep 2024 12:28:39 +0200
From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To: Dan Carpenter <dan.carpenter@...aro.org>
Cc: Thinh Nguyen <Thinh.Nguyen@...opsys.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] usb: dwc3: rtk: Clean up error code in
__get_dwc3_maximum_speed()
On 12/09/2024 10:54, Dan Carpenter wrote:
> The __get_dwc3_maximum_speed() function returns an enum type which, in
> this context here, is basically unsigned int. On error cases, it's
> supposed to return USB_SPEED_UNKNOWN, but it was accidentally changed to
> return negative error codes in commit f93e96c544ca ("usb: dwc3: rtk: use
> scoped device node handling to simplify error paths").
>
> There is only one caller and because of the way that the types work out,
> returning negative error codes is not a problem. They will be treated
> as greater than USB_SPEED_HIGH and ignored as invalid. So this patch
> does not affect run time behavior, it's just a clean up.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
Fixes: f93e96c544ca ("usb: dwc3: rtk: use scoped device node handling to simplify error paths")
Reviewed-by: Krzysztof Kozlowski <krzk@...nel.org>
Best regards,
Krzysztof
Powered by blists - more mailing lists