Re: [PATCH 01/36] serial: Add uart_rs485_config()

From: Lino Sanfilippo
Date: Sun Jun 26 2022 - 08:37:28 EST


On 25.06.22 at 22:19, Lukas Wunner wrote:

>
> Why doesn't this helper acquire the port spinlock, unlike
> uart_set_rs485_config()? Is this safe? Do all callers hold the lock?
> Do we need an assertion to verify the lock is held?
>

AFAIU the callers are using this only during initialization, so there is nothing else
at this time that accesses the serial_rs485 struct and thus no need for locking.

Regards,
Lino