Thread (18 messages) 18 messages, 7 authors, 2021-01-06

Re: [PATCH 4/5] gpio: xilinx: Utilize generic bitmap_get_value and _set_value

From: Linus Walleij <hidden>
Date: 2020-12-27 21:30:47
Also in: linux-arch, linux-gpio, linux-pm, lkml

On Sat, Dec 26, 2020 at 7:44 AM Syed Nayyar Waris [off-list ref] wrote:
This patch reimplements the xgpio_set_multiple() function in
drivers/gpio/gpio-xilinx.c to use the new generic functions:
bitmap_get_value() and bitmap_set_value(). The code is now simpler
to read and understand. Moreover, instead of looping for each bit
in xgpio_set_multiple() function, now we can check each channel at
a time and save cycles.

Cc: William Breathitt Gray <redacted>
Cc: Bartosz Golaszewski <redacted>
Cc: Michal Simek <redacted>
Signed-off-by: Syed Nayyar Waris <redacted>
(...)
+#include <../drivers/gpio/clump_bits.h>
What is this?

Isn't a simple

#include "clump_bits.h"

enough?

We need an ACK from the Xilinx people that they think this
actually improves the readability and maintainability of their
driver.

Yours,
Linus Walleij

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help