From patchwork Wed May 29 02:29:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 13677668 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2059.outbound.protection.outlook.com [40.107.236.59]) (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 CFE1515B119; Wed, 29 May 2024 02:29:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.236.59 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716949789; cv=fail; b=uqaipHC5emt8Wg3H/3JyfUxumz6UtJwo73gvUENkTiSHXtReTnxP/TEwwTvhfd/Dk8CeYyhbmkW15la4fgf4sSSD7HSxG/XW3nJb5tFA5VAsGGExoZG9n0f8Ni+cpddm2j/fYpCQhqNYw6xmYa3FCXLkMFiloO09OXyw/4dF5BQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716949789; c=relaxed/simple; bh=IOmFOs3Q/TWtGdDRg7zopJXsyVMuAE1Hfun83T2AoYw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=ElmOxe+TXa4YcVyTMB2lkZI8tfOAIK5pvtmjG6Hqf09lLqesxSUBQqmLf56EKsQHynIIJtcUtdoEUXfhZ/Oy76MsF1uB5urjVtcv/UOCN3FnDUdcPheGSSXDZFD71fqv6qtxBrUSyDrr65s2GgGSFSF7IxjJotlMWA4exLwtYs4= 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=WG9N4rb1; arc=fail smtp.client-ip=40.107.236.59 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="WG9N4rb1" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jX4CQbKY6pUOtzkEzSvrU4sRU9RcYXdP097Qf/nyfUkIPKABKDVpiagrBObR1dg2ogkvM0TCdgWU0K27S8SINAuxiOE1zZiy5yR4MqDjtUpcClsG1NDCTR7t22PwNYWESwsRdNUSBm23Cm9Hhs0kS3x7BypqeBE84+EtqZJus3lTbpjzQ+QPx7gO2o7o2JPIShCjmm/Ks4KNeaSybDg1NmeRT9SCAh5KOk7wH3iag6xDohttb3mE16k7T4WLzIgJ2H9YmbwP1cp85LEmLWaMpue6yOg8tfWQz4jQvde7WaQFEIRCaLu8zHIc5II+Fc8YPlWDILLwpYrIlxojU91tYg== 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=zH3UrrCrKeDtw+7I3LIXA5isBN9ztJ/Zy1KugoebhSY=; b=HVx1m0NLyfccmhF66anX2f+/0lwgMz6JSEbN+atvUPog7Tj5HwSkE7v7TXm9SYLMZz72XCjOToJON4YgTGDzUEmN8mSTiS4J3UGueN90naY8lPsXSIbn5S+IyrDj/lm99MixSm8jgs+PTFYVm3J8X0mGeDPehuvNfu5dFSSQFQBFyQ3be49HVDosCqU/CPEThxaodipPe8n+nyc3l2z/u+98l1Gb7OWvxWS9dw6MJ5Bok+g5ytSTpiG24LdDCbMHlE4V+CHCsGeXsMjZ5bTXA074Nhc5KVFyummMDNbXOc8cMOuHIuOwVOAv5zZ3nZZbs2xaKOIpyKG3nKtNIG8Weg== 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=zH3UrrCrKeDtw+7I3LIXA5isBN9ztJ/Zy1KugoebhSY=; b=WG9N4rb1Pf6H228kG06FQkWX7+scmZIPyfMHghVb15crUQJGva6yJkOXv5OS6FE+AMXOW1e9QU2VmewaFH3WOJiYiZ9I2aq8vLSv0vmB83FQXKtUvPmpmT4CaiynQoKgOY9zdeXkyDav3J7fH/ZCLhY2R+ckGUIw3GF2dbb5pV21xVAp03IE1C9SChCEKH+89KfJ1T4ifdvl2O73I4zVIz8d9xD2oDD7gUmcnyia+SPafwdMUoTHAPx3qRN3YQQTsXNqM44ketTOE9AocUVPZW9tU6IJ0826WjvIOp68F2A6d4ExPITxMCkpcb0SdK9Sxm6yU76XbsqMxT5I1CZmdA== 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 LV2PR12MB5725.namprd12.prod.outlook.com (2603:10b6:408:14c::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.17; Wed, 29 May 2024 02:29:42 +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.7611.030; Wed, 29 May 2024 02:29:42 +0000 From: John Hubbard To: Shuah Khan Cc: Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Darren Hart , Davidlohr Bueso , Edward Liaw , =?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 v2 2/3] selftests/futex: don't pass a const char* to asprintf(3) Date: Tue, 28 May 2024 19:29:37 -0700 Message-ID: <20240529022938.129624-3-jhubbard@nvidia.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240529022938.129624-1-jhubbard@nvidia.com> References: <20240529022938.129624-1-jhubbard@nvidia.com> X-NVConfidentiality: public X-ClientProxiedBy: BYAPR08CA0056.namprd08.prod.outlook.com (2603:10b6:a03:117::33) 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_|LV2PR12MB5725:EE_ X-MS-Office365-Filtering-Correlation-Id: b944a782-e164-4b61-ec15-08dc7f87321f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|376005|7416005|366007; X-Microsoft-Antispam-Message-Info: zf3WApSk0W0WWaLC3EhQhPho6w7Fip7NhqUunw34uIfmA1qUjn3oO+ACT/oWWAMvrGEHh1gZ2oonJ9vRjJs1f5oLboJzq+iSF1nFE+6Eeh2xN6jZ0boKh5XKtJ6i3quEFy5dnddCqVBeTCASc6xTaqMFkAdvq9oTIhfkknPq27Vqpxgu2+Q3VvRpr7vLklgltMmdiZ4u7xQW/Ibf3xlFVDZBd7lxuwlCE3O1TOmBNXv65MxgP/+pIrKtsFUDyqytSFFKqg2R347seaRRtwdmiHaKkGWGblxYG5kjxnjvF5WV/ABz3AuGlJEEtvXMOyb2smRVkHQt3lWwwJq/RDMcFXubJDB7hEpYHneHzdty6OcRPVxfFc5eqCidNv5CYm0M4bu7EBlGgu2RTa0R31HqmocS1mvB5TKOZvA2FwnsbmOCg59CIM2dKLaD4HYTR59j/YrqrP6vhte7rLbyy7iVnzxnNj6b7r4gj/pBeAWpFr5ybPxfHwK2tvmvKxmiG2RmyiKR3iwT34mPpIsdNCUw/QxmceJ4Qzwai+rOwCI9B5jd/KLMzDuHLxvV4DciJ6qRNHY40EY4V0v2/Z8u1IndtYO0NayL3i7ciXafUussNUyrquAl+z0DjioSYOpN4ggeZw7MBbFvXLS1P7ZRthJsw7s08/soPpcsxGO+yMPils1k2fhDUgL7lLjKkJUbdHWO2fM11XNStQoaZ8/cgpMV/wvLDVpVC/uN4Yga6lcq0qLcJi7yD0JPfBxn109nB1sFLjiS4hF8WgcUWtsPnje0Qpk0PbGR18ueZkDownawFo7FnivhvHRHa0deKEHPY0yIRjuCGuUCzhUaDps6MRARlnva/ol3dUBDeQiyZIp4QX3lhib8gEmFinxNmJgsdjVTC6aLp6cWz9Mh2LywRGKCbjAk9g7GVZ/ypEaLEGsx7pLijzEoyqve7Szcbv4iyPOh/24qhk+p3dLwPoiXXZMsmBjta1q1RpnaicZ1gxERt11+KyknxloDrT4oyjdMxit9l46c5BvU8p6LM0Z2/PdOj6Th2dU68Z4yhGTTLCyHTOWaHRITsvqYkKk97Ilnbn3ZujUTmlOWmqarm6MVvpY8NCNiuXz6SoKjPwDnmI2DmsqG3KHLJlFYyccaZ5PtaLUeVvPOk1BovTh4hXthch4kyHWoppJw5l6znjsh+rYD5BaBITxSfqGD+nkgikgmEI4jhTOGV6cf/zD4fTWsThEgSoWrIW9jRxcVrl7Pj4ubhGy23pT7nv83MA2DB+ppqCmD2eCqpCH5yU0SG1ro87qssA== 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)(1800799015)(376005)(7416005)(366007);DIR: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tBl4wcPRO3NWpGehiDxKH7T38rewnPcT2aBxUzr0TyhWmzm+j6NjHiqOHv7W0ME6Swg7pueGnCWJS4rl4oB4y1WL0nZItWuZVM4loTTULzeCmKlRuFRkIs2irMGi0tTCEsQGz53hefr0hwJzJXSma9JAMu5vJ0teQJj67Ehsggpxrs/mQJkC/2G0OzGyq4+4rc/E7iki9tYLbIjB07GY6NLxU2r19Oodi64o9Cn6LKVkYg7iUXjSL6LyqEf2VVqawwX0zTVGaQ62eecUOYGO08JqzUHVuVgCrFqHAEW3/HbsIri9hM+AzKhvOAnrrzLpSZMpxQi6CnwYEs7ieUIxnz/MEDHnYUqBVGwMGWAAm7wP1G3BWkfKacyq4I/0Ky3IQXYgiBpkDfaPAgM/A82K7V6dSvqcXxScWobUHOuLSURRYxkpkTGXAT1WyA7qEkVI8dQXJ4k+n31gMfvqUPlefp1vxO6qN3zUVZPLY9M7O8/efb4GMGCnkq6FHXKA31xb2/gmyRN+Mh1GRVZy3XgRs6EG8w1Tg5vLy995Ius5BlnpHe1Wgxxl/V9Fyj4rDAYe1/I3EmmSGexX6vYNHCLhvLAWez8B1La X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: b944a782-e164-4b61-ec15-08dc7f87321f X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB4130.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 May 2024 02:29:41.8758 (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: 3UZHHdOoVf1hBjWStaNPUhbrfXbB49epCf1dq8wnfvGrBU8th1MDSxooKrINvRufkwRvFNpDlbRrKjcrWyUaFQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV2PR12MB5725 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") Reviewed-by: Davidlohr Bueso 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) {