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

[xen master] console: conditionalize console_input_domain()



commit 7d46710f084f8ea88b0bbb812f486d3ac019a2bf
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Fri Nov 3 11:23:18 2023 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Fri Nov 3 11:23:18 2023 +0100

    console: conditionalize console_input_domain()
    
    The function was introduced for just one piece of code to use; it is
    dead code in cases where the respective Kconfig option is disabled, thus
    violating Misra C:2012 rule 2.1 there.
    
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
---
 xen/drivers/char/console.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c
index 6b679c5eac..4824d4a91d 100644
--- a/xen/drivers/char/console.c
+++ b/xen/drivers/char/console.c
@@ -475,6 +475,7 @@ static unsigned int __read_mostly console_rx = 0;
 
 #define max_console_rx (max_init_domid + 1)
 
+#ifdef CONFIG_SBSA_VUART_CONSOLE
 /* Make sure to rcu_unlock_domain after use */
 struct domain *console_input_domain(void)
 {
@@ -482,6 +483,7 @@ struct domain *console_input_domain(void)
             return NULL;
     return rcu_lock_domain_by_id(console_rx - 1);
 }
+#endif
 
 static void switch_serial_input(void)
 {
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

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