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

[PATCH 4/4] xen/char: pv_console: Fix MISRA C 2012 Rule 8.4 violation



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 in
linker errors due to multiple definitions,
So, it is more appropriate to resolve this MISRA C 2012 Rule 8.4 violation
warning by making pv_console_evtchn() inline with internal linkage.

Signed-off-by: Xenia Ragiadakou <burzalodowa@xxxxxxxxx>
---
 xen/include/xen/pv_console.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/include/xen/pv_console.h b/xen/include/xen/pv_console.h
index 4745f46f2d..a96a6368b1 100644
--- a/xen/include/xen/pv_console.h
+++ b/xen/include/xen/pv_console.h
@@ -19,7 +19,7 @@ static inline void pv_console_set_rx_handler(serial_rx_fn fn) 
{ }
 static inline void pv_console_init_postirq(void) { }
 static inline void pv_console_puts(const char *buf, size_t nr) { }
 static inline size_t pv_console_rx(struct cpu_user_regs *regs) { return 0; }
-evtchn_port_t pv_console_evtchn(void)
+static inline evtchn_port_t pv_console_evtchn(void)
 {
     ASSERT_UNREACHABLE();
     return 0;
-- 
2.34.1




 


Rackspace

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