From patchwork Fri May 3 03:51:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 794523 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2076.outbound.protection.outlook.com [40.107.94.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E99B6D29E; Fri, 3 May 2024 03:51:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.94.76 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714708278; cv=fail; b=LL/Zv1Ox9JycfmM7I+j3fzLiNiP/8xNfq4zQlosE2RF8cwBTNmuapXd1gcstebXMtIrOoXm/5cwR0F6vHX7qYJ4lYucjYMe2WsRDG+Y1/yaatQwOkFifceWFqSIt0yRu5voJiKgr4tsCT+xY48k91YBX3R5jQBSxVsYVBl6Jwh8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714708278; c=relaxed/simple; bh=BDHLtMEIEzZMGw3MmdXRT433IYCSaFZA9hzavxG62BY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=UMZB2CEA2K1Vb7woh/wiaxEHAmUYcUnrnpwwa7S+xSw/SeYM59tWIc5ANZXrQQ4gMEE8tomwYbedi3ih7EkwSUqW8UFJ+a2yUnsVM8PGGFHRRIKSWBfkMmfE4Tb2GBn0iVDFoFpjjmnjs/pA0pA+h8dc7vctmwrlo1l/EnId6l8= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=Yk3uGBVN; arc=fail smtp.client-ip=40.107.94.76 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="Yk3uGBVN" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KGONHHzWBWqkI1SEm+3gK7UxfNAO9NqGarkuCpUYgS8OMy6ZxF2HOSbeMzqtmLqe19RUY8Le3UqoZCQyjd77OeAv5luXWUN8zaX9IaWiVxw8UMzqFZ+NjlfSoxgmXqCjIqU6VOWl9yt5NPpeEd/hQ8OCwVMnruShJ2GiizhmdGrBe4rlxfbSK6HIOfzkhvKxOEjWgfh6/w+hDSjiNSYreDKe41rK2C7hDwVb2xEXSTs6pcX5uC4kphIVwJcTtjcgTifjRooCUAyYO8liwwPVC93nTNV28ak0ToRPNjfWDhf4Gypj+57CTQ4WJcwAkbQUwFRPXY3ay/1OgaucLM0WHw== 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=g9WR5gBtXv5RhOqz26Rn5f7ugl+K5+DGwc1J+hEvwes=; b=Ll3CZIY1gMUC48rNUQQ5rjmVTrNWWNRdeL56f1l+gjSNawDj+od3Kzns8/qmPBQYjiyjutMbi4RuZBSIKq/mdbWLEQBi0wLU1D/Dl1Vu3tw+jZA2ePXkUH11ragCt2PwAKLHsUROBTkM/yEEkTnJi20CAjjz4j7dJBwZUlHwLmguUQFTMyGyX4k8CozbTFs59GwSt93lhUODRECvpT7KEOnU6lFECxE8XpVY8q6dXQvn1m/EIb1PFkM+OfpWrS1W9/Gubm/9PD3eAL1ypdboJLWV/lY8aqbU9LYXsO4AdWRhIvTxLEhbcyUwS+1R62ilXJ71ubW390sIehTOJNYPZQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=g9WR5gBtXv5RhOqz26Rn5f7ugl+K5+DGwc1J+hEvwes=; b=Yk3uGBVNIMfHmMQ5t1wFZTxIH83eq3VYcXLgKOIRSTR7PZg5PpU/vU2BV8LGLalDZmPtFSiswE9GlvEcHdQY/vpSsMmDgvKqmI6XnURfr8UXtkrDaqrymoLEwTwJqcNMhs4kvI108Bvil1mHkxPY8XFrISztJZOEUVfBBeeLN6Gut6R9V+yhRXYjZOnNFGWe/lq874IdYDyySrN9wH5yzQ7C2gO2Ulv0MjpI4x7U1Mb4fdS6gwoMcRxISuJJpLXFIbaxhlriyPzHM+U9v2OroMoQA2r2gd2Ws/o+oS/LE7qGE3fmtQudDuhOrA7jaNRvKVuFPKIEKwQPel+9dfsSCA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) by LV2PR12MB5941.namprd12.prod.outlook.com (2603:10b6:408:172::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.28; Fri, 3 May 2024 03:51:10 +0000 Received: from BY5PR12MB4130.namprd12.prod.outlook.com ([fe80::2cf4:5198:354a:cd07]) by BY5PR12MB4130.namprd12.prod.outlook.com ([fe80::2cf4:5198:354a:cd07%4]) with mapi id 15.20.7519.035; Fri, 3 May 2024 03:51:10 +0000 From: John Hubbard To: Shuah Khan Cc: Tejun Heo , Zefan Li , Johannes Weiner , Michal Hocko , Roman Gushchin , Shakeel Butt , Muchun Song , Waiman Long , Yosry Ahmed , Nhat Pham , Chengming Zhou , Valentin Obst , linux-kselftest@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org, LKML , llvm@lists.linux.dev, John Hubbard Subject: [PATCH 4/4] selftests/cgroup: fix uninitialized variables in test_zswap.c Date: Thu, 2 May 2024 20:51:05 -0700 Message-ID: <20240503035105.93280-5-jhubbard@nvidia.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240503035105.93280-1-jhubbard@nvidia.com> References: <20240503035105.93280-1-jhubbard@nvidia.com> X-NVConfidentiality: public X-ClientProxiedBy: SJ0PR03CA0066.namprd03.prod.outlook.com (2603:10b6:a03:331::11) To BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR12MB4130:EE_|LV2PR12MB5941:EE_ X-MS-Office365-Filtering-Correlation-Id: c6f64795-4aba-4d09-1df1-08dc6b24454e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|376005|7416005|1800799015|366007; X-Microsoft-Antispam-Message-Info: qpMz3QmN7eLRPcMERVe6qgqYo1f0dz/W1jEWmdEHTW02fp79KTBcOYfyDPBSxNHVrlqgOUoutaTyj2fXFjbRjiqQ9ART/BGssEqcHsbQNQsEYEL0Vtxmryq9b3pAtKzKJ8C2DLiD52NrWFdb9zffXRb7BF4dcEyRxmB0mu4fwvkHG+yDUC73JQGUkpC1FJo8P48UJtaDEUEK+Kkg+Hn1dK2Coj5w4QQxWCwKc9hQnvkxFeGITW9STro2pLnZfoTh/58HQiLFXdWGm2xIiIzoo9Op64C99dKBeZigLra9gNaJFmzEaXsw+k3DB4H2OMkw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d12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005)(7416005)(1800799015)(366007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: avnkGjO8HoCCrykirEHUS+UmO20eAbBTCFn1MrRuhw9kPgyTjaVGZb8BiKoXFvgFibPdesHYUsFmEMTnQqXQwg98El7OrkbR2+TXjPNy7LgWZo10oiQDagvH8yeFRxNB1Oq3zsjFpp6iamXfjG8CZQOg2SeXJ/kK4+mtt6Xl9V96WF/QuallUkVWivlgc7cyODo4hvCCuUjOyT0A68P3kBgUlu9vHTBk+w8ESeVdwrD7caw9XAPJlT25vhgf95y9x5epYk48jhCH5x2FZ4gTzN9oEcmUdvnUszaHcWVo9L1SajioikE4KN+oHfILHxbhJs0EBt7NxCFpxF3M4RjWLFN8mUlpeEAZzUWaxs5Ei02i5VcWCtsdh7IYSrbho7LI9ADecnADHWot1/cAxafvb/Zoc/X4fo6oM+Fe5nT58/fnZhLUqizjyFU5mM1qnwH75hwzzVD7Pyw+9rzqBVzqaThdVmHH+0QsTVTeqlmkU/mjx2QRFewzuZT+XiM2DFMPTeOzl1GmTRT3Q2L6tEm6rzPpNqj/mRJIOt6X24CHMWQiQD0pDKWvkcZ4bouZ9k0ctMmJML0gjsjqm0aLUWbOTTNch+k+wIqpsHk5wlgzWhm5yxaz1CibC01PB6sqizizBFoTih/KTWamKW5pppuHlEAP6mOtV1AAknBw5/G7edPVD+Q7qFtc5SP3RWusHqLE/+7GBkM+1IWTxm8d4+zeWSyQd6pdv0dTDDJ3fp+3C/CKOl64VJGXR+zdf/qf3Quopi+q1mYZlQG6Q6TI8KoPXNtjH35wJL20xbzUTwFUNZa5LgoUahY7Squ6FDKAxas4Xb4+MYeXVeSO24+SB9RTqI6smIm4ckZeXGuLDphbXYhB6w58e5Z0GurSUSMR0rppFcRFFAI4ZHFSHOcw/jaw5IH4UsaD73HDfXF63o1CnY/q5FoQKwvejG/YJjVd4Qpdttcq9YA4wJinxIdkrxQwNyyHJK2WGNjVbyzEvZ7IDpMdWzQ4Gc+UlfXxE2KETgQKWTIGkaPgaE/qV3+3k8TslYiiKm5C0b2MsMV0bRJrORDWXvJR2sQIecHqYM7c1n4kOBcY6/HcCoi4djdaeTMX72I+rXFSEPFjqD5hhEkzB5IgtQMr3kXBeXUi46vaSHurb7pdwdNpg9nA4z98hC0UD8Ydj0yf7T1yZcbTlP50W8AAD3MAaP1lQqzLb7LyNXOFVt2Y5JQKYcowY3JvVIO+ifNMWGz4f4xAS40AmS1RntDKbNJ+tU2AtY+3lOMrxHbDv+svZi+vbkfSIjh+zYsuQLU3pQVCIqjDByxKZtVovBk3Z7oEjfSfqb6oQS9Kc5hoN4+DV58KTT/0EJFnisvG4Syb2ty6jaxmnIIPDL1UTnEpLhsNPb84yG/wLZHK9brf6JVK1UfsfzScTma2K7ZobYvm0PnwnAiFvtmVzhmNnfePK9qJlPvfWNO2GEuscT6eBu55+bXj0DaDwIfDE/T1eJARcQXJnlBRjxfSX6MwtksUv9w1HhekK7rKbKQZ4A3OjGm0CNnj2/Dzc5am6bZ5/SQmEs1nOWmC+q/UKyRD2fwB+XW66xDlbDeHmxg/so51 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: c6f64795-4aba-4d09-1df1-08dc6b24454e X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB4130.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 May 2024 03:51:10.6566 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: qzSnx0lCpzoXUcIapPFYR8xB+3Yu2Ak3eEWST3lH/p5cBA6cRK0sWrJnWhtvEOjWuqJ7IjQkReFcYGV/d+DddA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV2PR12MB5941 First of all, in order to build with clang at all, one must first apply Valentin Obst's build fix for LLVM [1]. Once that is done, then when building with clang, via: make LLVM=1 -C tools/testing/selftests ...clang finds and warning about some uninitialized variables. Fix these by initializing them. [1] https://lore.kernel.org/all/20240329-selftests-libmk-llvm-rfc-v1-1-2f9ed7d1c49f@valentinobst.de/ Signed-off-by: John Hubbard --- tools/testing/selftests/cgroup/test_zswap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/cgroup/test_zswap.c b/tools/testing/selftests/cgroup/test_zswap.c index f0e488ed90d8..6aac80eadc5d 100644 --- a/tools/testing/selftests/cgroup/test_zswap.c +++ b/tools/testing/selftests/cgroup/test_zswap.c @@ -257,7 +257,7 @@ static int test_no_invasive_cgroup_shrink(const char *root) { int ret = KSFT_FAIL; size_t control_allocation_size = MB(10); - char *control_allocation, *wb_group = NULL, *control_group = NULL; + char *control_allocation = NULL, *wb_group = NULL, *control_group = NULL; wb_group = setup_test_group_1M(root, "per_memcg_wb_test1"); if (!wb_group) @@ -342,7 +342,7 @@ static int test_no_kmem_bypass(const char *root) struct sysinfo sys_info; int ret = KSFT_FAIL; int child_status; - char *test_group; + char *test_group = NULL; pid_t child_pid; /* Read sys info and compute test values accordingly */