From patchwork Fri May 3 04:18:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 794719 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2058.outbound.protection.outlook.com [40.107.244.58]) (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 ED94A282EE; Fri, 3 May 2024 04:18:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.244.58 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714709933; cv=fail; b=c+HJG+blCQAdtRV4E7salEdXTVWdmuhRH1YYnoWduzmyT31nbr5iUUu+m5q4aF0KgEf/j95GAHEOBoTJFi1m9WoqZqKGeRXQN097AXkyTIaqwDvlDrrI/25ozy9uTpV50LmrEvjr+KqzzCkHkxwoYxg/pcz1b3KNNltQNP2ceSI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714709933; c=relaxed/simple; bh=SFnXEf/kT0ezFP8CBnns/mhb97f77hv1Zwt/gJlYmIM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=YrkO0YI83YvQ+cBFA6244tasbSsFEnBO5PjSZrrKwwOJ7tsjJJ6TIBFl+txHWN9hKcP5uFdd3TcRg3ySDZQ0LibtXV46ahMxruh8cks9nL8ZDtYdlYteOs5o4o7d3go5gzapIjskcXlrm2HcRtX9Nx29hlmoRoa4sXTQHJSxlEM= 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=oh1wJjgy; arc=fail smtp.client-ip=40.107.244.58 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="oh1wJjgy" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bHdMuzZhfXr0qZ8Act1HI/+y6hIxHfUEjVNGZIUWPu/L1Wty6Vm+KuAgnjPkYFlbwQny46X8yP9oXQAT/KwvnCfJsj+tP2cPb4KQdrjhCw1Q4WsuAw3O3m1uGVTvfwcuS9WqIL5wXPQRRq7fxxfUTOqHt5J3YWwe/gnn1TrzzckCK39J0q7BUQZ5AtV0Bo0lyqm1DUZD0YgHouOxk2z63h5tmImwFSsBcPxqyzc//yVJk007f6bIEmNLpbCYXHBVhgpmov5hqGNc4Qb50uk83iVb0gpj1QNxL1e3tek0B+dn+Ej796uNq/vwuciEHMLvlvJhi+UM6f2n3BmDjIB6lA== 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=P/hQPgmK9VJIMZ5PuBMqilFqbLQj/X6et9m7OoOe+Jk=; b=g/MAgecIFF/cx34PuMCK8M046qgXMBLwxSi633gkAIjSrZZs7GRf+E4wZCkVoYz9Bjk6PA/yl5uRyZytxBpmT4IECilXeDUtFfvK5lj42YVoXrEHDY3HslWAVUBRPxMWt1M0nT4Za+uRZ4XUHGjyBPGqETnyxJ2F7KwN7R8EwcgaQg+q63WeEjI5/QOeWw9P4lW1g8ctOnuXLNjcYl7Obi8rp38ioNg+BzPd0q9USH+x6AbX2BrNhgaAX0pltkgaM73rZBFdCQpjeZnqGsvqn0SK8qsvms04hQzj6J24U/rTw5PDVIUOzQVqY/xy7FhpeeE1IAmg3G7GWubd8XNu1A== 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=P/hQPgmK9VJIMZ5PuBMqilFqbLQj/X6et9m7OoOe+Jk=; b=oh1wJjgynTRxAjBbE40hHVTUtKT8kL7HyaIi7wVb+M58bXw33wsumpto8jlOKAGEMsP6oS/dG01ctIiD5GPjJJuDxbEvhZZ3Fqeu3RbVeGfDlI8HkSt96QhiuPpPX7DDDCmXbfDWWWy1SnjzAWmkpYgpHUq86J54s3IFIbPTSzQNsfn/faB9LHOFoebSe9NTp5r8bt+K3ZxRIsMHZVx/zoeRIEHFLU9zlHGL83xdnCm855FpssZseKhTnRdwBy7/DKzQ6oSMrmHGcAnJ0JjcrFDk7rYIVY+MPUsUUy1J8Fjqx/OtE7KfdVVVLlDVHn+PR5Qus6JKeXHAWzJauzqWPQ== 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 PH8PR12MB7445.namprd12.prod.outlook.com (2603:10b6:510:217::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.29; Fri, 3 May 2024 04:18:47 +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 04:18:47 +0000 From: John Hubbard To: Shuah Khan Cc: Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Darren Hart , Davidlohr Bueso , =?utf-8?q?Andr=C3=A9_Almeida?= , "Nysal Jan K . A" , Mark Brown , Valentin Obst , linux-kselftest@vger.kernel.org, LKML , llvm@lists.linux.dev, John Hubbard Subject: [PATCH 2/3] selftests/futex: don't pass a const char* to asprintf(3) Date: Thu, 2 May 2024 21:18:42 -0700 Message-ID: <20240503041843.99136-3-jhubbard@nvidia.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240503041843.99136-1-jhubbard@nvidia.com> References: <20240503041843.99136-1-jhubbard@nvidia.com> X-NVConfidentiality: public X-ClientProxiedBy: BYAPR06CA0041.namprd06.prod.outlook.com (2603:10b6:a03:14b::18) 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_|PH8PR12MB7445:EE_ X-MS-Office365-Filtering-Correlation-Id: 94cf81e7-3f88-4dd4-1bcf-08dc6b282116 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|376005|1800799015|366007|7416005; X-Microsoft-Antispam-Message-Info: Qov4GhsIc8Xm1KlqC/2WdQfKu2kuCq+RGAQ3tWcxBHdLXCsAKybGYZ7jP4haTd6Ze/qHVXAAZyhV8KEbz1sXOqSVdrmoUubOxWxp+5aFXYVLfG4b9LopSEN3sFHzfeTwEbIeZOSAyRWxEC88a/F5iozrt8sY/I1G8mQxAopqIaAoZVXL+ZaUwXkwYZ1TFjKJtOlcVXAqaFoctqzyrgTbsqN0R0s7Rri6wrCo8tdJ9M88SUwu1CanWqp9EX+vXLixjkcwUA5HIgMyMgEHpxGSyi49J5rUrq5HKUt/zEkAFuX2iUJX+TYlBtAKrIZzyn9HoR/4MV3kBmDXr/62iFTwFzPtVKbX6JfcKZrb+MfiNDbkO51K+JNyE9Aw72mZmNvOMmbhRPGgjKxqSADg2yYdUPcOS05aGkH0wzzUEOACtm5O37iM/nJb40TtKYfILw/CQ7MAFEEGi0G1ecrBPIyvmwf05gbmR/p+xMVF4MDtzjHTTq38/HXfmMPxRl3seVSRZC0mRbc0T06UmgC5O62VkKirQlXmfg5E7gAvBJ4gc3EneZOrTBKMNZgbcIUBWstOEztgCwT+FcyArE9Y5sz9LSyr4N0JHhIP9nL3ooHE6SupeDbvXkciORC44cvydpBfRcYv5yvh02jDNXK2b0c09EXesuM1y7dquSYHh+s+xdlY1X11WkiUxVGw1DvcUVGeTMPZPTKLzEm3dWOZYbqql06DquHCfLEUmlcPS+734EXoM/Q3KkYYrCbbsM/501WUI+/3MycnLlcVL1gpKMya7MpCzh2h60pT1FWRCIOA6EicMgzeF2PVMz/zhpQOiW1dPnqdNWho4ayEBgN8GqjqEoE2M5I1tXvT8fZYZnFBFmxbR810oos4dWPi2ruqTKA9uGM60cbd4x4X+9Ss56O8CJRrPYhcdhdbg1PTC5qSEWHuOrb1hWLatvmCeTZWTCE28ZDJijfhklDHMCNF53zsIpDGddK5YOhi7et0ahGAjoNJ3NxSgQUZWPpLK4Zz/Kx8t+ilC+1IUTTXadHT0nC78EqxiNkfjqYLeVL31vqcvvU8WjGbVGk9MnCQH8NdJllI3ieP7UlDOpUUA7BVxCokVet4cM2ptiWE6bOn7XAdPk9qaTRmJL2aId3XOADuW1IOW6OguI7zsLLX5RKpRHBq0OhVe7/R2GUj+GHAmTK7WRwfU+neKDRWpuAruV5dr96Bgsux0YralWpFDH6HpYvuhgpbR4ICzjweSspZxA9WW3EmuBbwuebrNsBT7ydH9VnRGgwJyUDl2WbMRH0s6gLfxA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR12MB4130.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005)(1800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8W921dl/X3mBJ10VZUnA3nbnIv3FDo/wxP7BaprG28sDAca28vO8vmjd29vvr6RoeZ4efFtk73DR7aaKSeJxYs+Cl0BxWd76RbYyTKAPmptZthZDdEQyD66aBNSVKOM3zAfUBB5cm+PD0JdTyrbHj2FLw0yuNJ6KxleUqPRuZGPn61TU5xGDFyI4O8Wuysl3yORsSSGIJHOld5CN9qGS8rVX49SrFqGPLfoVWqD65ss9MDW4cr/6DsKZ6xLkB3Y1hSGYMvvGX40zmJHQZc963iNUKqk3Q2uOzmCqraWR+eCxi+BJqeRhpMvSVOsgdkZ/Eiy0rhRY1ZPXj/VqGtSg2GA2TqtO9BtUYNl4PjwPeR3sCJn+CwtGECHG+YOMaKakAKOGv5cd15HrYQ/7d+vPxPmn/unD/ie+6B/Iq5bHOvaoumYDA8pamwkoqFMg4qcHbVlHZ/FwjVTrj8ZPeYm3gRUmN1eFPf0qNIs9U/jwe7x4WUzMgc0jmbU07fMSQaoNpvBfG8KCmqTvR7E9khs4qmvvrPeh481Yi4E0V1NkyNUtiVl0fp5QDLq2PHTStBnjYQpYlaozkKoYnP9i1m9nVRtu6gBrj90z/lUo X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 94cf81e7-3f88-4dd4-1bcf-08dc6b282116 X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB4130.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 May 2024 04:18:47.8692 (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: g54V3dTxM+AGdFKj2ILD2yTJe5M/Zx/AiC8x7OmikI/lccNt0HnN8Q/lXravhs9maoQbRXfk4seUeqLNFjHiDw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR12MB7445 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 issues a warning, because test_name is passed into asprintf(3), which then changes it. Fix this by simply removing the const qualifier. This is a local automatic variable in a very short function, so there is not much need to use the compiler to enforce const-ness at this scope. [1] https://lore.kernel.org/all/20240329-selftests-libmk-llvm-rfc-v1-1-2f9ed7d1c49f@valentinobst.de/ Fixes: f17d8a87ecb5 ("selftests: fuxex: Report a unique test name per run of futex_requeue_pi") Signed-off-by: John Hubbard --- tools/testing/selftests/futex/functional/futex_requeue_pi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/futex/functional/futex_requeue_pi.c b/tools/testing/selftests/futex/functional/futex_requeue_pi.c index 7f3ca5c78df1..215c6cb539b4 100644 --- a/tools/testing/selftests/futex/functional/futex_requeue_pi.c +++ b/tools/testing/selftests/futex/functional/futex_requeue_pi.c @@ -360,7 +360,7 @@ int unit_test(int broadcast, long lock, int third_party_owner, long timeout_ns) int main(int argc, char *argv[]) { - const char *test_name; + char *test_name; int c, ret; while ((c = getopt(argc, argv, "bchlot:v:")) != -1) {