[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f5d4711f-9b4a-457c-b68c-c2e9aefbe4a8@suse.com>
Date: Thu, 1 Aug 2024 08:54:18 +0200
From: Oliver Neukum <oneukum@...e.com>
To: Alan Stern <stern@...land.harvard.edu>,
Abhishek Tamboli <abhishektamboli9@...il.com>
Cc: gregkh@...uxfoundation.org, oneukum@...e.com,
usb-storage@...ts.one-eyed-alien.net, linux-usb@...r.kernel.org,
skhan@...uxfoundation.org, dan.carpenter@...aro.org, rbmarliere@...il.com,
linux-kernel-mentees@...ts.linuxfoundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] usb: storage: ene_ub6250: Fix right shift warnings
On 31.07.24 20:19, Alan Stern wrote:
> On Wed, Jul 31, 2024 at 11:34:45PM +0530, Abhishek Tamboli wrote:
>> On Wed, Jul 31, 2024 at 10:04:33AM -0400, Alan Stern wrote:
Hi,
I should make my reasoning clearer.
>>> Replacing the variable with a constant won't make much difference. The
>>> compiler will realize that bl_len has a constant value and will generate
>>> appropriate code anyway. I think just changing the type is a fine fix.
While that is absolutely true, it kind of removes the reason for the patch
in the first place. The code gcc generates is unlikely to be changed.
We are reacting to a warning an automatic tool generates. That is a good thing.
We should have clean code. The question is how we react to such a report.
It just seems to me that if we fix such a warning, the code should really be clean
after that. Just doing the minimum that will make the checker shut up is
no good.
Regards
Oliver
Powered by blists - more mailing lists