Re: [PATCH] gpio: drop bitmap_complement() where feasible

From: Michal Simek

Date: Fri Apr 17 2026 - 04:16:07 EST




On 4/17/26 05:34, Yury Norov wrote:
[Some people who received this message don't often get email from ynorov@xxxxxxxxxx. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]

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, data1t, nbits);


s/data1t/data1/


Thanks,
Michal