Re: [PATCH v5 2/4] serial: 8250_dw: build Renesas RZN1 CPR value from DW_UART_CPR_* definitions

Jia Wang
2026-04-29T00:57:00Z

On 2026-04-28 13:58 +0300, Andy Shevchenko wrote:
> On Tue, Apr 28, 2026 at 05:07:49PM +0800, Jia Wang wrote:
> > On 2026-04-28 11:41 +0300, Ilpo Järvinen wrote:
> > > On Tue, 28 Apr 2026, Andy Shevchenko wrote:
> > > > On Tue, Apr 28, 2026 at 01:26:27PM +0800, Jia Wang wrote:
>
> ...
>
> > > #define DW_UART_CPR_FIFO_MODE_FROM_SIZE(size) \
> > > ({ \
> > > typeof (size) __size = size; \
> > > \
> > > static_assert(IS_ALIGNED((__size), 16)); \
> > > static_assert(__size <= DW_UART_CPR_FIFO_MODE_MAX); \
> > > \
> > > FIELD_PREP_CONST(DW_UART_CPR_FIFO_MODE, __size / 16); \
> > > })
> >
> > Thanks. I tried that approach, but the statement-expression form does
> > not work in this case because the helper is used in static initializers.
> > So I'll keep it as a plain expression macro for now, and just rework it
> > into a cleaner multi-line form.
>
> Still you can move FIELD_PREP_CONST() into it.
>

Right, I'll move FIELD_PREP_CONST() in. By the way, does your Reviewed-by
still hold?

> --
> With Best Regards,
> Andy Shevchenko
>
>
>

Best Regards,
Jia Wang