[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 4/4] xen/char: pv_console: Fix MISRA C 2012 Rule 8.4 violation
Hi Julien, On 7/6/22 00:38, Julien Grall wrote: Hi Xenia, On 05/07/2022 22:02, Xenia Ragiadakou wrote:The function pv_console_evtchn() is defined in the header <xen/pv_console.h>. If the header happens to be included by multiple files, this can result inlinker errors due to multiple definitions,So, it is more appropriate to resolve this MISRA C 2012 Rule 8.4 violationwarning by making pv_console_evtchn() inline with internal linkage.There are multiple version of pv_console_evtchn(). The version below is only used when !CONFIG_XEN_GUEST.The header is also included multiple time within Xen. So I am a bit puzzled why we haven't seen this error before. Maybe this is unused when !CONFIG_XEN_GUEST?If yes, I would remove the call. If no, then I think the commit message should be clarified. You are right. I had to clarify that this holds when !CONFIG_XEN_GUEST.So when !CONFIG_XEN_GUEST, the function pv_console_evtchn() is defined inside the header file and the header is included only by a single file. This is why the error has not been triggered. Cheers, -- Xenia
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |