Messages in this thread | | | From | Linus Walleij <> | Date | Thu, 26 Oct 2023 15:46:18 +0200 | Subject | Re: [PATCH 4/6] tty: serial: amba-pl011: replace TIOCMBIT macros by static functions |
| |
On Thu, Oct 26, 2023 at 12:41 PM Théo Lebrun <theo.lebrun@bootlin.com> wrote:
> The driver uses two TIOCMBIT macros inside pl011_{get,set}_mctrl to > simplify the logic. Those look scary to checkpatch because they contain > ifs without do-while loops. > > Avoid the macros by creating small equivalent static functions; that > lets the compiler do its type checking & avoids checkpatch errors. > > For the second instance __assign_bit is not usable because it deals with > unsigned long pointers whereas we have an unsigned int in > pl011_set_mctrl. > > Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
The kernel looks better after this patch than before, so: Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Since the eternal defines uses masks rather than bits we can't use __set_bit() & friends in this case and that's life.
Yours, Linus Walleij
| |