]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
serial: rsci: Convert to FIELD_MODIFY()
authorGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 22 Dec 2025 14:02:09 +0000 (15:02 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Dec 2025 10:52:31 +0000 (11:52 +0100)
Use the FIELD_MODIFY() helper instead of open-coding the same operation.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/ada3faf4698155a618ae6371b35eab121eb8b19c.1766411924.git.geert+renesas@glider.be
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/rsci.c

index 1ef7c6d61707805f6f6c288e4801fed34d3a7e15..c3f12df693ad273e856ca41c98abc2182ff8b312 100644 (file)
@@ -207,8 +207,7 @@ static int rsci_scif_set_rtrg(struct uart_port *port, int rx_trig)
        else if (rx_trig < 1)
                rx_trig = 0;
 
-       fcr &= ~FCR_RTRG4_0;
-       fcr |= field_prep(FCR_RTRG4_0, rx_trig);
+       FIELD_MODIFY(FCR_RTRG4_0, &fcr, rx_trig);
        rsci_serial_out(port, FCR, fcr);
 
        return rx_trig;