From patchwork Mon Oct 30 13:16:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 13440551 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 602E3C4332F for ; Mon, 30 Oct 2023 13:16:40 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.625093.973999 (Exim 4.92) (envelope-from ) id 1qxS81-0001fG-LS; Mon, 30 Oct 2023 13:16:25 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 625093.973999; Mon, 30 Oct 2023 13:16:25 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qxS81-0001f9-IR; Mon, 30 Oct 2023 13:16:25 +0000 Received: by outflank-mailman (input) for mailman id 625093; Mon, 30 Oct 2023 13:16:24 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qxS80-0001f3-Rf for xen-devel@lists.xenproject.org; Mon, 30 Oct 2023 13:16:24 +0000 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on20606.outbound.protection.outlook.com [2a01:111:f400:7eaf::606]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 85f88ec7-7726-11ee-98d6-6d05b1d4d9a1; Mon, 30 Oct 2023 14:16:23 +0100 (CET) Received: from DU2PR04MB8790.eurprd04.prod.outlook.com (2603:10a6:10:2e1::23) by DBBPR04MB7580.eurprd04.prod.outlook.com (2603:10a6:10:1f7::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.11; Mon, 30 Oct 2023 13:16:20 +0000 Received: from DU2PR04MB8790.eurprd04.prod.outlook.com ([fe80::d924:b650:a2ad:7b25]) by DU2PR04MB8790.eurprd04.prod.outlook.com ([fe80::d924:b650:a2ad:7b25%3]) with mapi id 15.20.6954.016; Mon, 30 Oct 2023 13:16:20 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 85f88ec7-7726-11ee-98d6-6d05b1d4d9a1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cPHgUdCKJia5j7Ou0o7eqh3ddTNPiitlpWOuAFramsy77htM8hdtAfMAVEOnrSpgHVreForcy7ZchGOPJZiqrOxV/qLKXQrhkhokSLWlGDuAsPETQzsV59JE0N3wNfyq5hct9mWn+IYVmWfEoSH0c315TqCEhU/YzOaVlAc116BBSshPFykaV/38dIivv7qM0qZazLZipGyohRcUNZlB9lJc+7fga9ZK4mt79vK+07upi34Wzh0gVvjWCgndIViDWbEwdO/0tjD7sD099oOcHDI7iDdelfdaAW1NiQIOulRbPnbWW9NdEupRJUqHm4K8zfTZWZnop9Jy7r+mPDHjwQ== 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-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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QMyE8FXqxWMnkNmTu0BqW4INn9n57mn2PyP6ZhtdAY4=; b=rTpsWFlh6IGU9+xhjtZ/LWS3/uqEWkRr5hgJ13HSYxUDnU3fZJOo6t2yVRmN3qDN/AoFNvsXObXZJBCggclGUNzDFFLwpUzIP4oSP1CN3baemzeY1Pbts9eJLe/XL4LHaSdLcbP0S+iTTEqjeg0ConGseR9G0r6wbyMvvvrBHTFgJn4hCO6zkFyfpKAJ8ZXJvMWqjJZ2qicJaVFdpvffUY56sIRalTViMMuRblp5ydDnPLXWCWDKrPk0rT6WZDFM5dmEKhuoSKALu99B44Er62C9cVdwizzPGo+hX9ctEqHNku7+O73BiqkEgrjJJgn1pH2bsERzfkPCLxTQQ03MiA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com; Message-ID: <59c59b19-40e0-aa1e-d775-31963e03144a@suse.com> Date: Mon, 30 Oct 2023 14:16:22 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Content-Language: en-US To: "xen-devel@lists.xenproject.org" Cc: Andrew Cooper , George Dunlap , Julien Grall , Stefano Stabellini , Wei Liu From: Jan Beulich Subject: [PATCH] console: conditionalize console_input_domain() X-ClientProxiedBy: FR3P281CA0100.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a1::18) To DU2PR04MB8790.eurprd04.prod.outlook.com (2603:10a6:10:2e1::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8790:EE_|DBBPR04MB7580:EE_ X-MS-Office365-Filtering-Correlation-Id: 945d959a-c9d3-4fe5-3479-08dbd94a6884 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +SvnE2qo2FDbztDhSweV4Jh1fbmmSDgXyfZRWfNC8VOewDGpD7P7eS5wP/vcqEkvDPukivdjqaI/h/Zjh69V/MqMyuIdNM868AvzW+TxeWUASIP2jj4ILaMrlsq2135q3x5uAQaZhn3i//RAOY2kD9bE15FHA4/2VA0wKCTRbyinGuxIg2aV8FCW++yispPFZZ0PpWRc4yfbGLUKw6IGro11Z+vKrcnxIlECfoXwJisAtHAMnPFcl2klizDBy2Saf6SHaw2+z31EaQrs6o/nTCucOzC/cCmAzK5mtU1rr8PzrlG+du+mo8poEk4NBUbMPS86NvpXGbOHcn78tKe2C3IqdZEsP2iv21yiEpTD6/C/gknG6W+IdUFXEKOGh5wL96ZwjvpGlpPgTQd6iLYyhhsWlEIcXdWxQNdRTjjVoRAwN/EsjRBbzQqfZ9ALQ1haon9cbmLIhn2bFcFpzb41zqWVB/3mVMD6VcJu8IBT5GySNwCJ6n01ZVOLNyg9w66YtcWTrzdPohs91JzC96bJuwxs1DKOnunFeGZBheepNtOguE3CcZP0y4XB4RYzVtYGWmUqid7f/aAFGS2ADkAjgFJEWbS01DBvSfEB+CcgIvB4RE3W6xxl+F5gyvahdInBriaY+iNui+lCeTevz2zrIw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8790.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(346002)(366004)(39860400002)(376002)(136003)(230922051799003)(1800799009)(451199024)(64100799003)(186009)(4744005)(2906002)(38100700002)(6506007)(2616005)(66556008)(6916009)(66476007)(66946007)(316002)(478600001)(54906003)(41300700001)(6486002)(83380400001)(6512007)(36756003)(86362001)(31696002)(8676002)(5660300002)(4326008)(8936002)(26005)(31686004)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?Y+tkIc+beqk3DAMWQkL8I7gaRiqM?= =?utf-8?q?aHnzsWhvc0XO2kJUtybVCDmGoRX6ibTZ2NYaCNGWg+8Qw1h+foMqYH6bl4F/IeOpM?= =?utf-8?q?CiMtSCtJY3hjzvGiXfds/Q00VT9NTTHfcB4M0O142vEBj8xGrJ1c6D5yO2WsuOtx/?= =?utf-8?q?xaSJYnv4PnSjJyULd3z5toKlu/Yimu6ZVWJ5qdjcOQsavkElfBLr7BDpUrr627fMD?= =?utf-8?q?UWFuxetqFMmvy+DZgdnG4lRU9oeTBJWM7uTCR1eJ4X7PjvwfO6gjjJ0pHxNgTFt4r?= =?utf-8?q?pMgOu45ZPLw54qK6dN3oleM4KxZUJRAWnvpGGnZRZ0ZxulBqKWMRRUBJdYRIR8DbB?= =?utf-8?q?5ljrcqzScsgchmBMAbEU4hXNUYkTXA7O3mlluPilEpG2yR0l0AuK8p4D9kSWuA4oC?= =?utf-8?q?gwj/DfTOIxNJrzgpXZJsiHhQeiCwNTOOmXkOVmpVAkD7hTT/YlcxYqM7eiZn6jFIB?= =?utf-8?q?AYwrf+yoh3/aJUWzD2EQxvItz03fTm82ZW2NsbylIS38UFBbAiYaW46eJLVuaju8B?= =?utf-8?q?hy8lY+fQcPdodiETEJa99Z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gtbqsqeYf1R2mR3YdPN3gkEAmSMDFQhSlDHf4tP?= =?utf-8?q?x4ypiBFSS5mcATQIgdkorAfQyqt8AGlXhVo2MelD1ahpuv/LkdL7FGIBbEBlOhdeg?= =?utf-8?q?JinCPAMotbTr?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 945d959a-c9d3-4fe5-3479-08dbd94a6884 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8790.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Oct 2023 13:16:20.8418 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: dDV+GXY9pWt/3J+rmIVDK4M/q+hqar3xfNnvL4JzUcS62/ylr7WsHiFFUT8OdGUP3NPxDZ1UXVtisPux7mQGZg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7580 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 Reviewed-by: Stefano Stabellini --- 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) {