[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XEN PATCH 04/10] drivers: char: address violation of MISRA C Rule 20.7



On 2024-04-24 09:23, Jan Beulich wrote:
On 23.04.2024 17:12, Nicola Vetrini wrote:
--- a/xen/drivers/char/omap-uart.c
+++ b/xen/drivers/char/omap-uart.c
@@ -48,8 +48,9 @@
 /* System configuration register */
#define UART_OMAP_SYSC_DEF_CONF 0x0d /* autoidle mode, wakeup is enabled */

-#define omap_read(uart, off) readl((uart)->regs + (off<<REG_SHIFT)) -#define omap_write(uart, off, val) writel((val), (uart)->regs + (off<<REG_SHIFT)) +#define omap_read(uart, off) readl((uart)->regs + ((off) << REG_SHIFT))
+#define omap_write(uart, off, val) writel((val), (uart)->regs + \

Would have been nice to drop the excess parentheses at the same time.

Jan

Right. I think I'll have a few more patches on this rule, so maybe I can adjust it.

--
Nicola Vetrini, BSc
Software Engineer, BUGSENG srl (https://bugseng.com)



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.