All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen/char: pv_console: Fix MISRA C 2012 Rule 2.1 violation
@ 2022-07-06 17:50 Xenia Ragiadakou
  2022-07-06 23:46 ` Stefano Stabellini
  2022-07-07  3:30 ` Jiamei Xie
  0 siblings, 2 replies; 3+ messages in thread
From: Xenia Ragiadakou @ 2022-07-06 17:50 UTC (permalink / raw)
  To: xen-devel
  Cc: Andrew Cooper, George Dunlap, Jan Beulich, Julien Grall,
	Stefano Stabellini, Wei Liu

Remove the definition of the function pv_console_evtchn(),
when CONFIG_XEN_GUEST is not set, because the function is not used.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
---
 xen/include/xen/pv_console.h | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/xen/include/xen/pv_console.h b/xen/include/xen/pv_console.h
index 4745f46f2d..55b20323fb 100644
--- a/xen/include/xen/pv_console.h
+++ b/xen/include/xen/pv_console.h
@@ -19,11 +19,6 @@ 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)
-{
-    ASSERT_UNREACHABLE();
-    return 0;
-}
 
 #endif /* !CONFIG_XEN_GUEST */
 #endif /* __XEN_PV_CONSOLE_H__ */
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] xen/char: pv_console: Fix MISRA C 2012 Rule 2.1 violation
  2022-07-06 17:50 [PATCH] xen/char: pv_console: Fix MISRA C 2012 Rule 2.1 violation Xenia Ragiadakou
@ 2022-07-06 23:46 ` Stefano Stabellini
  2022-07-07  3:30 ` Jiamei Xie
  1 sibling, 0 replies; 3+ messages in thread
From: Stefano Stabellini @ 2022-07-06 23:46 UTC (permalink / raw)
  To: Xenia Ragiadakou
  Cc: xen-devel, Andrew Cooper, George Dunlap, Jan Beulich,
	Julien Grall, Stefano Stabellini, Wei Liu

On Wed, 6 Jul 2022, Xenia Ragiadakou wrote:
> Remove the definition of the function pv_console_evtchn(),
> when CONFIG_XEN_GUEST is not set, because the function is not used.
> 
> Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>


> ---
>  xen/include/xen/pv_console.h | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/xen/include/xen/pv_console.h b/xen/include/xen/pv_console.h
> index 4745f46f2d..55b20323fb 100644
> --- a/xen/include/xen/pv_console.h
> +++ b/xen/include/xen/pv_console.h
> @@ -19,11 +19,6 @@ 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)
> -{
> -    ASSERT_UNREACHABLE();
> -    return 0;
> -}
>  
>  #endif /* !CONFIG_XEN_GUEST */
>  #endif /* __XEN_PV_CONSOLE_H__ */
> -- 
> 2.34.1
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH] xen/char: pv_console: Fix MISRA C 2012 Rule 2.1 violation
  2022-07-06 17:50 [PATCH] xen/char: pv_console: Fix MISRA C 2012 Rule 2.1 violation Xenia Ragiadakou
  2022-07-06 23:46 ` Stefano Stabellini
@ 2022-07-07  3:30 ` Jiamei Xie
  1 sibling, 0 replies; 3+ messages in thread
From: Jiamei Xie @ 2022-07-07  3:30 UTC (permalink / raw)
  To: Xenia Ragiadakou, xen-devel
  Cc: Andrew Cooper, George Dunlap, Jan Beulich, Julien Grall,
	Stefano Stabellini, Wei Liu

Hi Xenia,

> -----Original Message-----
> From: Xen-devel <xen-devel-bounces@lists.xenproject.org> On Behalf Of
> Xenia Ragiadakou
> Sent: Thursday, July 7, 2022 1:50 AM
> To: xen-devel@lists.xenproject.org
> Cc: Andrew Cooper <andrew.cooper3@citrix.com>; George Dunlap
> <george.dunlap@citrix.com>; Jan Beulich <jbeulich@suse.com>; Julien Grall
> <julien@xen.org>; Stefano Stabellini <sstabellini@kernel.org>; Wei Liu
> <wl@xen.org>
> Subject: [PATCH] xen/char: pv_console: Fix MISRA C 2012 Rule 2.1 violation
> 
> Remove the definition of the function pv_console_evtchn(),
> when CONFIG_XEN_GUEST is not set, because the function is not used.
> 
> Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
> ---
>  xen/include/xen/pv_console.h | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/xen/include/xen/pv_console.h b/xen/include/xen/pv_console.h
> index 4745f46f2d..55b20323fb 100644
> --- a/xen/include/xen/pv_console.h
> +++ b/xen/include/xen/pv_console.h
> @@ -19,11 +19,6 @@ 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)
> -{
> -    ASSERT_UNREACHABLE();
> -    return 0;
> -}
> 
>  #endif /* !CONFIG_XEN_GUEST */
>  #endif /* __XEN_PV_CONSOLE_H__ */
> --
> 2.34.1
> 

I have run it on arm64, booting Xen+Dom0 and starting few guests, connecting consoles. It all works fine.
Tested-by: Jiamei Xie <jiamei.xie@arm.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-07-07  3:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-06 17:50 [PATCH] xen/char: pv_console: Fix MISRA C 2012 Rule 2.1 violation Xenia Ragiadakou
2022-07-06 23:46 ` Stefano Stabellini
2022-07-07  3:30 ` Jiamei Xie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.