[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <CWIG462JY229.13125CHGHKGX0@tleb-bootlin-xps13-01>
Date:   Thu, 26 Oct 2023 16:37:39 +0200
From:   Théo Lebrun <theo.lebrun@...tlin.com>
To:     "Hugo Villeneuve" <hugo@...ovil.com>
Cc:     "Russell King" <linux@...linux.org.uk>,
        "Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
        "Jiri Slaby" <jirislaby@...nel.org>,
        <linux-kernel@...r.kernel.org>, <linux-serial@...r.kernel.org>,
        "Linus Walleij" <linus.walleij@...aro.org>,
        "Gregory CLEMENT" <gregory.clement@...tlin.com>,
        "Alexandre Belloni" <alexandre.belloni@...tlin.com>,
        "Thomas Petazzoni" <thomas.petazzoni@...tlin.com>,
        "Vladimir Kondratiev" <vladimir.kondratiev@...ileye.com>,
        "Tawfik Bayouk" <tawfik.bayouk@...ileye.com>
Subject: Re: [PATCH 4/6] tty: serial: amba-pl011: replace TIOCMBIT macros by
 static functions
Hello,
On Thu Oct 26, 2023 at 4:24 PM CEST, Hugo Villeneuve wrote:
> On Thu, 26 Oct 2023 12:41:21 +0200
> Théo Lebrun <theo.lebrun@...tlin.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@...tlin.com>
> > ---
> >  drivers/tty/serial/amba-pl011.c | 46 +++++++++++++++++++++--------------------
> >  1 file changed, 24 insertions(+), 22 deletions(-)
> > 
> > diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
> > index 0d53973374de..bb3082c4d35c 100644
> > --- a/drivers/tty/serial/amba-pl011.c
> > +++ b/drivers/tty/serial/amba-pl011.c
> > @@ -1087,7 +1087,6 @@ static void pl011_dma_rx_poll(struct timer_list *t)
> >  	 */
> >  	if (jiffies_to_msecs(jiffies - dmarx->last_jiffies)
> >  			> uap->dmarx.poll_timeout) {
> > -
>
> This should go into a separate patch, or simply be merged with one
> of your other coding style/whitespace cleanup patches.
Indeed, added to "tty: serial: amba-pl011: cleanup driver". Thanks.
Regards,
--
Théo Lebrun, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Powered by blists - more mailing lists