lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZzsHnkT8HGH64TzP@smile.fi.intel.com>
Date: Mon, 18 Nov 2024 11:23:42 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Suraj Sonawane <surajsonawane0215@...il.com>
Cc: Dan Carpenter <dan.carpenter@...aro.org>,
	Linus Walleij <linus.walleij@...aro.org>,
	Bartosz Golaszewski <brgl@...ev.pl>, linux-gpio@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] gpio: gpio-exar: replace division condition with direct
 comparison

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



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ