[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XEN PATCH 3/4] x86: address violations of MISRA C Rule 8.4
On 2024-05-28 08:28, Jan Beulich wrote: On 27.05.2024 16:53, Nicola Vetrini wrote:Rule 8.4 states: "A compatible declaration shall be visible when an object or function with external linkage is defined." These variables are only referenced from asm modules, so they need to be extern and there is negligible risk of them being used improperly without noticing."asm modules" isn't quite correct, as there's one use from inline assembly. I have to admit I have no good wording suggestion other than explicitly covering both: "asm modules or inline assembly". Yet that then is ambiguous, as a use in inline assembly may also mean that symbol is actually visible to the compiler by being mentioned as on of the operands. Better ideas? Maybe generically "asm code" or just "asm"? It's not really relevant whether it's inline or not, as far as I understand. As a result, they can be exempted using a comment-based deviation. No functional change. Signed-off-by: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>With suitably adjusted wording: Acked-by: Jan Beulich <jbeulich@xxxxxxxx> Jan -- Nicola Vetrini, BSc Software Engineer, BUGSENG srl (https://bugseng.com)
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |