[PATCH v2 0/2] gpio: drop bitmap_complement() where feasible

Yury Norov posted 2 patches 1 month, 4 weeks ago
drivers/gpio/gpio-pca953x.c | 7 ++-----
drivers/gpio/gpio-xilinx.c  | 6 ++----
2 files changed, 4 insertions(+), 9 deletions(-)
[PATCH v2 0/2] gpio: drop bitmap_complement() where feasible
Posted by Yury Norov 1 month, 4 weeks ago
The gpio drivers reproduce the following pattern:

	bitmap_complement(tmp, data1, nbits);
	bitmap_and(dst, data2, tmp, nbits);

This can be done in a single pass:

	bitmap_andnot(dst, data2, data1, nbits);

v1: https://lore.kernel.org/all/20260417033439.318930-1-ynorov@nvidia.com/
v2: 
 - cleanup typos (Michal);
 - split per individual drivers (Andy).

Yury Norov (2):
  gpio: pca953x: drop bitmap_complement() where feasible
  gpio: xilinx: drop bitmap_complement() where feasible

 drivers/gpio/gpio-pca953x.c | 7 ++-----
 drivers/gpio/gpio-xilinx.c  | 6 ++----
 2 files changed, 4 insertions(+), 9 deletions(-)

-- 
2.51.0
Re: [PATCH v2 0/2] gpio: drop bitmap_complement() where feasible
Posted by Bartosz Golaszewski 1 month, 3 weeks ago
On Fri, 17 Apr 2026 13:59:52 -0400, Yury Norov wrote:
> The gpio drivers reproduce the following pattern:
> 
> 	bitmap_complement(tmp, data1, nbits);
> 	bitmap_and(dst, data2, tmp, nbits);
> 
> This can be done in a single pass:
> 
> [...]

Tweaked the grammar in commit messages and applied, thanks!

[1/2] gpio: pca953x: drop bitmap_complement() where feasible
      https://git.kernel.org/brgl/c/a56604e397575647bfc425a8df176948577a364e
[2/2] gpio: xilinx: drop bitmap_complement() where feasible
      https://git.kernel.org/brgl/c/2757a5b1bca76a1b6378496b669a2baf1faddec5

Best regards,
-- 
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>