public inbox for linux-gpio@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Suraj Sonawane <surajsonawane0215@gmail.com>
Cc: Dan Carpenter <dan.carpenter@linaro.org>,
	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: Mon, 18 Nov 2024 11:23:42 +0200	[thread overview]
Message-ID: <ZzsHnkT8HGH64TzP@smile.fi.intel.com> (raw)
In-Reply-To: <090f78b1-88c9-44e5-959f-07b4f97cd1bc@gmail.com>

On Fri, Nov 15, 2024 at 06:55:41PM +0530, Suraj Sonawane wrote:
> On 15/11/24 15:06, Andy Shevchenko wrote:

...

> > P.S. I wouldn't like to see similar patches to other GPIO drivers,
> > especially those that use a / 8; a % 8 type of expressions together.
> 
> I understand your points about the familiarity of line grouping in GPIO
> hardware and the optimization behavior of compilers for power-of-two
> division. I initially thought this could be a good fix as I have seen
> similar changes before.

It really depends on the use case. In some it's good to update like you
proposed, but GPIO drivers (hardware) are special in this sense.

> Thank you for the feedback—I will keep this in mind
> before submitting such patches in the future.

You're welcome! Feel free to Cc me for review, if in doubts.

-- 
With Best Regards,
Andy Shevchenko



      reply	other threads:[~2024-11-18  9:23 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
2024-11-15 11:58     ` Bartosz Golaszewski
2024-11-15 13:25   ` Suraj Sonawane
2024-11-18  9:23     ` Andy Shevchenko [this message]

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=ZzsHnkT8HGH64TzP@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=brgl@bgdev.pl \
    --cc=dan.carpenter@linaro.org \
    --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