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

[PATCH] console: conditionalize console_input_domain()


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 30 Oct 2023 14:16:22 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=QMyE8FXqxWMnkNmTu0BqW4INn9n57mn2PyP6ZhtdAY4=; b=h9MmHhiXeHSTfbBBqJr6mhLI4XhsfMZCEFg9psfPm9z7a40Yxv1l9SiJbieBU2rsqU6DJL2MNi6uTVqbeHmHaXfhlTXNtR6EOJ7NoeLMER7pjfAfJ2vGcbO1jEtBdMfrAG1b6/n4lDzc9ERI/neARRVAum2RQxsFBzsYxEKgqLRlLff+5BcWSJgmLuAlOcOLGwYBntYYfT2z/tL2BSHrdCPFUrDxZ5pE7WLZ8Ln0Dw7SGtz6N+Nssc4tn89R65wXJJ/IHpo9KYiIYRsMGun481rJejmmkX0ylfqFXP2aRzD1dCp8InPh5fsGpcVmOM09rTzBm7fqdEOgkhBi3R+FXg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cPHgUdCKJia5j7Ou0o7eqh3ddTNPiitlpWOuAFramsy77htM8hdtAfMAVEOnrSpgHVreForcy7ZchGOPJZiqrOxV/qLKXQrhkhokSLWlGDuAsPETQzsV59JE0N3wNfyq5hct9mWn+IYVmWfEoSH0c315TqCEhU/YzOaVlAc116BBSshPFykaV/38dIivv7qM0qZazLZipGyohRcUNZlB9lJc+7fga9ZK4mt79vK+07upi34Wzh0gVvjWCgndIViDWbEwdO/0tjD7sD099oOcHDI7iDdelfdaAW1NiQIOulRbPnbWW9NdEupRJUqHm4K8zfTZWZnop9Jy7r+mPDHjwQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Mon, 30 Oct 2023 13:16:26 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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>

--- a/xen/drivers/char/console.c
+++ b/xen/drivers/char/console.c
@@ -475,6 +475,7 @@ static unsigned int __read_mostly consol
 
 #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)
 {



 


Rackspace

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