Re: [PATCH v2 2/4] serial: 8250_dw: Only accept a contiguous DLF readback
From: Vinicius Pedrosa
Date: Tue Oct 20 2026 - 07:02:07 EST
Hi Jiri,
On Tue, 20 Oct 2026, Jiri Slaby wrote:
> Do I understand correctly, that this equivalent to:
> if (is_power_of_2(reg + 1))
> ?
Yes, given the existing reg != 0 check. I kept the explicit form in v2
to keep the change minimal, but I'll use
reg && is_power_of_2(reg + 1)
in v3, it reads better.
The two forms only differ for U32_MAX, where reg + 1 wraps to 0. But that
isn't a valid DLF readback here.
Thanks,
Vinicius