In message: [linux-yocto] serial: fsl_linflexuart: Fix Woverflow warning on conversion on 03/11/2023 Kevin Hao wrote:
> From: Kevin Hao <[email protected]> > > A Woverflow warning was introduced by SDK commit e11fb4e609ab ("linflex: > Correctly clear UARTSR in interrupt mode"). > drivers/tty/serial/fsl_linflexuart.c: In function ‘linflex_rxint’: > drivers/tty/serial/fsl_linflexuart.c:629:24: warning: conversion from ‘long > unsigned int’ to ‘u32’ {aka ‘unsigned int’} changes value from > ‘18446744073709551613’ to ‘4294967293’ [-Woverflow] > 629 | writel(~LINFLEXD_UARTSR_DTFTFF, sport->membase + > UARTSR) > > Fix it by force casting to u32. > > Signed-off-by: Kevin Hao <[email protected]> > --- > Hi Bruce, > > Could you help me merge this into the following two branches? > v6.1/standard/nxp-sdk-5.15/nxp-s32g > v6.1/standard/preempt-rt/nxp-sdk-5.15/nxp-s32g merged. Bruce > > drivers/tty/serial/fsl_linflexuart.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/tty/serial/fsl_linflexuart.c > b/drivers/tty/serial/fsl_linflexuart.c > index eb868ead47e6..45c965cb2412 100644 > --- a/drivers/tty/serial/fsl_linflexuart.c > +++ b/drivers/tty/serial/fsl_linflexuart.c > @@ -626,7 +626,7 @@ static irqreturn_t linflex_rxint(int irq, void *dev_id) > break; > > rx = readb(sport->membase + BDRM); > - writel(~LINFLEXD_UARTSR_DTFTFF, sport->membase + UARTSR); > + writel(~(u32)LINFLEXD_UARTSR_DTFTFF, sport->membase + UARTSR); > > flg = TTY_NORMAL; > sport->icount.rx++; > -- > 2.39.2 >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#13267): https://lists.yoctoproject.org/g/linux-yocto/message/13267 Mute This Topic: https://lists.yoctoproject.org/mt/102360590/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/leave/6687884/21656/624485779/xyzzy [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
