[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241015090102.GD8348@google.com>
Date: Tue, 15 Oct 2024 10:01:02 +0100
From: Lee Jones <lee@...nel.org>
To: Pavel Machek <pavel@....cz>
Cc: Dipendra Khadka <kdipendra88@...il.com>, avel@....cz,
linux-leds@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Staging: leds: replace divide condition 'shift / 16'
with 'shift >= 16'
On Fri, 11 Oct 2024, Pavel Machek wrote:
> Hi!
>
> > Staging! Why Staging?
> >
> > On Sun, 22 Sep 2024, Dipendra Khadka wrote:
> >
> > > Smatch reported following:
> > > '''
> > > drivers/leds/leds-bcm6328.c:116 bcm6328_led_mode() warn: replace divide condition 'shift / 16' with 'shift >= 16'
> > > drivers/leds/leds-bcm6328.c:360 bcm6328_led() warn: replace divide condition 'shift / 16' with 'shift >= 16'
> > > '''
> > > Replacing 'shift / 16' with 'shift >= 16'.
> >
> > More info please.
> >
> > - What is the current problem you're attempting to solve?
> > - How does this patch help with that?
> > - What are the consequences for not applying this fix?
>
> Take a look at patch. Doing shift / 16 when testing on >= 16 is just
> ugly. It is simple cleanup.
You missed the point of the comments.
Copying / pasting the warning into the subject-line and commit message
without any additional wordage is sub-optimal. Please improve the
commit message.
--
Lee Jones [李琼斯]
Powered by blists - more mailing lists