public inbox for linux-gpio@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@linaro.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Suraj Sonawane <surajsonawane0215@gmail.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Bartosz Golaszewski <brgl@bgdev.pl>,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] gpio: gpio-exar: replace division condition with direct comparison
Date: Fri, 15 Nov 2024 14:55:12 +0300	[thread overview]
Message-ID: <f9daa71f-cba7-4086-a523-a2e6aa526ff3@stanley.mountain> (raw)
In-Reply-To: <ZzcWGJxqMJVYd4Tp@black.fi.intel.com>

Uh, I had to think back...  I had forgotten that I actually published that
check.  I can unpublish it.

I wrote it based on a real issue, and then when I looked at the warnings quite
a few places wrote code like "if (x / 4)" where they had intended to write if
if ((x % 4) == 0).  So it seemed like a good idea.

But in the two years since I published the warning, it has mostly been false
positives.

regards,
dan carpenter


  reply	other threads:[~2024-11-15 11:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-12 20:16 [PATCH] gpio: gpio-exar: replace division condition with direct comparison Suraj Sonawane
2024-11-13 15:31 ` Bartosz Golaszewski
2024-11-14  8:55   ` Suraj Sonawane
2024-11-15  9:36 ` Andy Shevchenko
2024-11-15 11:55   ` Dan Carpenter [this message]
2024-11-15 11:58     ` Bartosz Golaszewski
2024-11-15 13:25   ` Suraj Sonawane
2024-11-18  9:23     ` Andy Shevchenko

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=f9daa71f-cba7-4086-a523-a2e6aa526ff3@stanley.mountain \
    --to=dan.carpenter@linaro.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=brgl@bgdev.pl \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=surajsonawane0215@gmail.com \
    /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