From patchwork Mon Jul 29 14:24:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stewart Hildebrand X-Patchwork-Id: 13745021 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 373D2C3DA4A for ; Mon, 29 Jul 2024 14:24:54 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.766793.1177330 (Exim 4.92) (envelope-from ) id 1sYRIv-00039t-OM; Mon, 29 Jul 2024 14:24:49 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 766793.1177330; Mon, 29 Jul 2024 14:24:49 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYRIv-00039k-Lh; Mon, 29 Jul 2024 14:24:49 +0000 Received: by outflank-mailman (input) for mailman id 766793; Mon, 29 Jul 2024 14:24:48 +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 1sYRIu-0002bd-H8 for xen-devel@lists.xenproject.org; Mon, 29 Jul 2024 14:24:48 +0000 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on20600.outbound.protection.outlook.com [2a01:111:f403:2416::600]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 4e506db0-4db6-11ef-bc01-fd08da9f4363; Mon, 29 Jul 2024 16:24:47 +0200 (CEST) Received: from CH0PR07CA0011.namprd07.prod.outlook.com (2603:10b6:610:32::16) by DS0PR12MB8318.namprd12.prod.outlook.com (2603:10b6:8:f6::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7807.27; Mon, 29 Jul 2024 14:24:43 +0000 Received: from DS3PEPF000099DA.namprd04.prod.outlook.com (2603:10b6:610:32:cafe::37) by CH0PR07CA0011.outlook.office365.com (2603:10b6:610:32::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.34 via Frontend Transport; Mon, 29 Jul 2024 14:24:43 +0000 Received: from SATLEXMB04.amd.com (165.204.84.17) by DS3PEPF000099DA.mail.protection.outlook.com (10.167.17.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7828.19 via Frontend Transport; Mon, 29 Jul 2024 14:24:43 +0000 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 29 Jul 2024 09:24:42 -0500 Received: from ubuntu.mshome.net (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Mon, 29 Jul 2024 09:24:42 -0500 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: 4e506db0-4db6-11ef-bc01-fd08da9f4363 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Z69hYOhWRWrn9abDEaxwVR4AWFtb0CRtjBL/isMZBYJ/bNq7rkJVl/mBB+mISUcOQgigflr4n+aQAtccZAN8mxphfru5Kv8QM9LUCTLihfE/AIop3BE5LUvsWkhhjgBaXkb0+EaXta2PHfC5Z8lYR9dwoXfnON3RO5oK5ZtTs0uxlpCQxSg/gC0A4vDRW2laeAyrrs+T+1ssiAkOR8529gOsjILzv5SKskUhjYiMB45HO/mex3oILzReA8jOf0TJ5Jua8HjjCGchnmBWoWcwGQ3211WbHpvQml7lgtEC69qtN3buF9HQbF2FdUPmLMjQwnZLTrCWjPG8GRrekHHQ5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=CxhM1vltXOjPvL+T6lC6D2DCOSNH7I4CBgQMkOmeLEs=; b=Z5nTLZVom3hZnSpGTE2Al0nlihZrgZVau8f8nDhQnwbRtGFZVLtKbG90ctUaCh1PZ102PFcB132Sp+uhXSTUgDWYHjR5z6gX0J310PqhSPsCMXxz4RYl3tKgUz/1YEey4JSCTy05zw6ixwaE6aLAMTdSIPt0YT90Ud6l/z0O2xmVfO5iAIdc77HKWefhXOqB03l7wG3aDCzRXEw0ZfjdgMiPVDWAzrrU1BnSWANocGSkpsy5ZbyrFIgSBWuTeP6zWShIZ6eNsMICnuua0ZRwaTUjsYBUsOMqq5ux/B6SXFsJ6ucsWxN+lLST7f9RjgdqdZMuxWX1DOIbFj8bgG87rA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CxhM1vltXOjPvL+T6lC6D2DCOSNH7I4CBgQMkOmeLEs=; b=4BC1REjSajqEcXbvKSRUyj3ugcKReIwoGXw2M/ujM6U0q+ehVxrhiwGbRFzrJV0t0EVVjge1JFNzpGuM3Terb39hybMc5cC4Rm4pVi4+8Uim9V2zFMID6Psl8egtaErL8pVePo/ftSM25fdA7vQGtIR81zZ4+59SS28LKfIv18U= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C From: Stewart Hildebrand To: CC: Stewart Hildebrand , Dario Faggioli , Juergen Gross , George Dunlap Subject: [PATCH 2/3] xen: silence maybe-unitialized warning Date: Mon, 29 Jul 2024 10:24:16 -0400 Message-ID: <20240729142421.137283-3-stewart.hildebrand@amd.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240729142421.137283-1-stewart.hildebrand@amd.com> References: <20240729142421.137283-1-stewart.hildebrand@amd.com> MIME-Version: 1.0 Received-SPF: None (SATLEXMB04.amd.com: stewart.hildebrand@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS3PEPF000099DA:EE_|DS0PR12MB8318:EE_ X-MS-Office365-Filtering-Correlation-Id: c1c3a7ee-e25c-4d86-b9a5-08dcafda30b6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: =?utf-8?q?0hOA6carnYZ/PJLAoV3SK8QXyc2YBhV?= =?utf-8?q?m/RdkPadZlfZf5cVTtWJYYUufzhxHUGpydxJb5H2EK/nR1dzI7NMcQxMa9cDODpBL?= =?utf-8?q?81KdZMhy2pjxm5uB39B1PpQZKSMq/AOHcTzgPjSmuLjIChK31UMX7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f-8?q?LRuruVJ40ohVYrrZrLktj81yDSq7NDu153xRo5BQ7B1StEY29ZBHhh9GGvm9s/agr?= =?utf-8?q?Qapv8fq4iE6gsWpI6sefssSl3u9XxXDlKutaPZKHEQY97bjjIWoSdkFSMf3HchhJY?= =?utf-8?q?HRRgqtPe4mz37EDzDp0NErOaS6c4lPKVEi+YQjs0H2+WzEe4W8POJoIZ6piDsPakt?= =?utf-8?q?FrqVhIT+u/4XFJjxtFyyONqx2mfMljjYhdm3v5pnOAUBmwmvR14BzrFOUgHUB8VAc?= =?utf-8?q?dvfrjOssSU+uZCbepgKasM2oOTZgVgm7gTk0L58LgcSWMXGKswaC7Qiyz1IEQ4bJK?= =?utf-8?q?DLKomF/m3Kyp+HeiI/1NGD0ZriZHq/hDepxmbh983j638LPtVttN6Ng2IFyUKb945?= =?utf-8?q?BFkJ9VZwhYA?= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(1800799024)(376014)(36860700013)(82310400026);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jul 2024 14:24:43.3530 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c1c3a7ee-e25c-4d86-b9a5-08dcafda30b6 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DS3PEPF000099DA.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB8318 When building with gcc with -finstrument-functions, optimization level -O1, CONFIG_HYPFS=y and # CONFIG_HAS_SCHED_GRANULARITY is not set, the the following build warning (error) is encountered: common/sched/cpupool.c: In function ‘cpupool_gran_write’: common/sched/cpupool.c:1220:26: error: ‘gran’ may be used uninitialized [-Werror=maybe-uninitialized] 1220 | 0 : cpupool_check_granularity(gran); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ common/sched/cpupool.c:1207:21: note: ‘gran’ declared here 1207 | enum sched_gran gran; | ^~~~ This is a false positive. Silence the warning (error) by initializing the variable. Signed-off-by: Stewart Hildebrand Reviewed-by: Juergen Gross --- xen/common/sched/cpupool.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/common/sched/cpupool.c b/xen/common/sched/cpupool.c index 57dfee26f21f..3d02c7b70690 100644 --- a/xen/common/sched/cpupool.c +++ b/xen/common/sched/cpupool.c @@ -103,6 +103,7 @@ custom_param("sched-gran", sched_select_granularity); #elif defined(CONFIG_HYPFS) static int sched_gran_get(const char *str, enum sched_gran *mode) { + *mode = SCHED_GRAN_cpu; return -EINVAL; } #endif