[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] xen/char: mvebu-uart: Fix MISRA C 2012 Rule 20.7 violation
On Wed, 3 Aug 2022, Xenia Ragiadakou wrote: > The macro parameters 'off' and 'uart' are used as expressions and it is > good to be enclosed in parentheses to prevent against unintended expansion. > > For the 'uart' case, in mvebu3700_write(), correct the second parentheses > that seems to have been accidently misplaced. > > Signed-off-by: Xenia Ragiadakou <burzalodowa@xxxxxxxxx> Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx> > --- > xen/drivers/char/mvebu-uart.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/xen/drivers/char/mvebu-uart.c b/xen/drivers/char/mvebu-uart.c > index 835d1ace3c..a00618b96f 100644 > --- a/xen/drivers/char/mvebu-uart.c > +++ b/xen/drivers/char/mvebu-uart.c > @@ -64,8 +64,8 @@ static struct mvebu3700_uart { > struct vuart_info vuart; > } mvebu3700_com = {0}; > > -#define mvebu3700_read(uart, off) readl((uart)->regs + off) > -#define mvebu3700_write(uart, off, val) writel(val, (uart->regs) + off) > +#define mvebu3700_read(uart, off) readl((uart)->regs + (off)) > +#define mvebu3700_write(uart, off, val) writel(val, (uart)->regs + (off)) > > static void mvebu3700_uart_interrupt(int irq, void *data, > struct cpu_user_regs *regs) > -- > 2.34.1 >
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |