[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XEN PATCH 3/6] xen/delay: address MISRA C:2012 Rule 5.3.
Hi Jan, On 07/08/2023 09:14, Jan Beulich wrote: On 04.08.2023 17:27, Nicola Vetrini wrote:--- a/xen/include/xen/delay.h +++ b/xen/include/xen/delay.h @@ -5,6 +5,6 @@#include <asm/delay.h>#define mdelay(n) (\ - {unsigned long msec=(n); while (msec--) udelay(1000);}) + {unsigned long msec_=(n); while (msec_--) udelay(1000);})As elsewhere, please also adjust style while touching the line, at least as far as the obviously wrong case goes: #define mdelay(n) (\ {unsigned long msec_ = (n); while (msec_--) udelay(1000);}) Even better would be #define mdelay(n) ({ \ unsigned long msec_ = (n); while (msec_--) udelay(1000); \ }) If you are touching the style, about converting to a staging inline and also splitting the line in multiple one? Cheers, -- Julien Grall
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |