Re: [PATCH v4 3/5] serial: 8250: Export ICR access helpers for internal use

From: Maciej W. Rozycki
Date: Mon Apr 18 2022 - 11:48:27 EST


On Mon, 18 Apr 2022, Andy Shevchenko wrote:

> > Index: linux-macro/drivers/tty/serial/8250/8250.h
> > ===================================================================
> > --- linux-macro.orig/drivers/tty/serial/8250/8250.h
> > +++ linux-macro/drivers/tty/serial/8250/8250.h
> > @@ -120,6 +120,29 @@ static inline void serial_out(struct uar
> > up->port.serial_out(&up->port, offset, value);
> > }
> >
> > +/*
> > + * For the 16C950
> > + */
> > +static void __maybe_unused serial_icr_write(struct uart_8250_port *up,
> > + int offset, int value)
>
> I think you may drop __maybe_unused here, because it's always used by
> the code below. So it will be eliminated altogether when the below
> won't be used.

Right, the absence of this annotation doesn't cause GCC to complain about
sources that define this function but do not make use of it, so I have
removed the atttribute in v5.

Maciej