From: Lee Jones <lee@kernel.org>
To: Pavel Machek <pavel@ucw.cz>
Cc: Dipendra Khadka <kdipendra88@gmail.com>,
avel@ucw.cz, linux-leds@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Staging: leds: replace divide condition 'shift / 16' with 'shift >= 16'
Date: Tue, 15 Oct 2024 10:01:02 +0100 [thread overview]
Message-ID: <20241015090102.GD8348@google.com> (raw)
In-Reply-To: <ZwkLCE9x5DWtaaJU@duo.ucw.cz>
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 [李琼斯]
next prev parent reply other threads:[~2024-10-15 9:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-22 17:40 [PATCH] Staging: leds: replace divide condition 'shift / 16' with 'shift >= 16' Dipendra Khadka
2024-09-26 10:14 ` Pavel Machek
2024-10-09 13:37 ` Lee Jones
2024-10-11 11:24 ` Pavel Machek
2024-10-15 9:01 ` Lee Jones [this message]
2024-10-17 19:23 ` Dipendra Khadka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241015090102.GD8348@google.com \
--to=lee@kernel.org \
--cc=avel@ucw.cz \
--cc=kdipendra88@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=pavel@ucw.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox