From patchwork Fri May 31 19:38:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 800730 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2052.outbound.protection.outlook.com [40.107.223.52]) (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 10A9117DE17; Fri, 31 May 2024 19:38:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.223.52 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717184334; cv=fail; b=RNWx7GwGjJwLdB0msFqSnKPdgBqSD1hSfmtx7fcZGXquIeYegki30UllwMnSaxt5lPSgNEJhTOZ/R4MuSC227PRLmK/a8ATw6A6ZwW+1kWNW5+aNPMem+KX2+f8RaCM9aQ3aCKbdk3GPVqPRNiGIueB76wNtVJcyPAKc6wrgO/Q= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717184334; c=relaxed/simple; bh=LcWrjcndeq3iuhARrc/mp+c08zzUu1zFoYgBoT4w7lM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=NB5YuMSD4M1s2S8h6Ah9E7TgTk4j46fCVoXdBm5b0H3IMSx16J6c+3x6KOjJxuyc2ZCHd11a7zVOpU/4urzfUlqLL1rTaO3XvROC/szVKoQU7deC1XCmm8CoJqzwOrCuzg1xV3pJw05WdXxV6tBNJS+8dbuwAemd5xhYCw9lHM4= 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=Z54wfO3J; arc=fail smtp.client-ip=40.107.223.52 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="Z54wfO3J" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YuoYVURVWGhgeZdEncNBfj1gpHM2WXh1tDueuJ8eJ3uvjq+6DCLp2KMO8vUvNsooO0Sirne/yYbbCWM1OUNftRLh9LHEhGBpO7T7b2kCOgFbrn2Mo1HuuDMhZ5Y/VQF5X5M3poAQSt4mYUefR3UmvVyfwo+La9Wvus8Wc44Tq+lfMjn0mhpeRChkMc7HJ0MvMaZCS3RJ8IqFoR29Zdr5buYQFZV0nBc1HLFoVBDaxBoYdl5y6Xxd6RnGS0jHdPTjyAncWnxO/dlgPVwc7OtdoV5HDVYwMhMiRg1Bh7T7u0X3ufDWBs9wzhNSx/uKZ5nfS4NWPES63LqUy0ClsxKpwQ== 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=M9NVry3VUsyNcWz2ZdDnrII1PJ3GUu9peaR80x/6epU=; b=BWal/cv453Fs0BZUN++AQYRfDNRP4klPOGrIvzKs9S5GczYJCH8/a1XXfcxM4weVhWZeIdEHh3qqrn5YSQXr8zAljsO03vgUsLSQe9MZhrXdq/sWpQY2oim8oJb59X93601rvTXsI+cgpsk9XFFtOiqdjNcRL6/T5KNX1QKflCWJuw5PIXmQYM+JTMno5L8tPxUehLS5+vf4PNrOvZnK25uIb1rjA+SGs+XIGLJSmH5kUZMM50PoqmoLRpc5PxFKfpz+h1DJP4C0kQQ8T8GWJW0Jt64JgyZuZrps9jLDeAt3n6xmqpEXH2dq3kdgAghZBXMRue4o79QuiOMe10Awdw== 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=M9NVry3VUsyNcWz2ZdDnrII1PJ3GUu9peaR80x/6epU=; b=Z54wfO3JyZnFJ3IIhlFyvNsoxbWTSpLzx32beLbavEpKoEMeVxPxWbJO4wok+uAvgfWmq7T4fQRCR0ggApDWAWxzxaWPH54p5FfRSCU7dXAbeiW8x0gcVJ9fiTDtlZPS50FvNt9OZNIkfXK/a+hmN0PKGrN1IfcpwccD0skw5ewCh3AgjLsW31E6S8TqXZFMBloR3TeLMlrfFVZKDCvBJQPaB3Hd28f2jXH3b9/tiyBjq+SuI0X6/lhoHH5KrX0VmWJg31R/QFS1t5Qwf+D67TOhViVbL8XiBKx1gNBjCpI/ctnxEUs7oyj8aIIU/9Qt8ejYA3F5LpguKKFL8pgGmw== 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 SJ2PR12MB9008.namprd12.prod.outlook.com (2603:10b6:a03:543::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.22; Fri, 31 May 2024 19:38:45 +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.7633.021; Fri, 31 May 2024 19:38:45 +0000 From: John Hubbard To: Shuah Khan Cc: angquan yu , "Kirill A . Shutemov" , Ingo Molnar , Binbin Wu , Alexey Dobriyan , Rick Edgecombe , Sohil Mehta , Yu-cheng Yu , Dave Hansen , Muhammad Usama Anjum , Valentin Obst , linux-kselftest@vger.kernel.org, LKML , llvm@lists.linux.dev, x86@kernel.org, John Hubbard Subject: [PATCH v3 7/7] selftests/x86: fix printk warnings reported by clang Date: Fri, 31 May 2024 12:38:38 -0700 Message-ID: <20240531193838.108454-8-jhubbard@nvidia.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240531193838.108454-1-jhubbard@nvidia.com> References: <20240531193838.108454-1-jhubbard@nvidia.com> X-NVConfidentiality: public X-ClientProxiedBy: SJ0PR05CA0097.namprd05.prod.outlook.com (2603:10b6:a03:334::12) 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_|SJ2PR12MB9008:EE_ X-MS-Office365-Filtering-Correlation-Id: e43449c7-8d04-48b5-4d69-08dc81a948e2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|7416005|366007|376005; X-Microsoft-Antispam-Message-Info: sXrdEkxm0kEbsA2jqP4hGdkYIa7Ljtr11xz5PIZyn5EoROBI+NwPF6gcnAjH8213L+PZQg4PrlBVrjGUVjjsbLg7oSYY92lvKKA6UO1+9ogHxAxSZox4BI66NTps3GLbPliS9vs6i4/CIvgpT0l/t8NRvCDwrMivgdkEnhGu0ICXeSfIgIX5JjsOAJ/00iU/cUaorue9k9lxYYq7ruGMMUbERULsPfoy9wuORq+DTUkQGl56HFmeiKKOVfEw9BRfAsuPKyz/+YA88cvdD73P0WlQSd1vF5aPDMFLMDgc64dBSNgPPBNGvMN4Bb31l8pdZ3mElVBjo5QUFKSdu4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12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(1800799015)(7416005)(366007)(376005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: QekZLF1DdLUf1PpNcrRJlgeB2uZ6Yq2hTMD3nGZxwHLoKpm9YC1fyOAzwt07FuvgDNbl2+U1ucDnhfbBTZ9oUh0aNkdfByFO8OM2fVlC3Hoa9keHZSsMRRpVCWHPbmyQzLmuKCB1xk+Kh7Dnr4oVgyDCbOc8haqHKoqaojhWG5FATgR8GrY1zBB+R8q5CPNFMBe3Y5l973SiWP9GiSGnwmxNsvHpx7k4TYFfWXjpc6st8a1RwcoPafakKX25qLki7vC9OD2v8cDMn+gZUOAyHz+6YOqpSuFXEQm6Of/dyOC6mR6I4EMwFLOfQKixA3GgSJA+XnijYBZw2a/VTemOcxQT/tFc+f4gaS3GepGsx5AD9Nznr/1Dc3cWASTyq9cXWz3bVONDk9rxnWrk2S4nERrs8+n5XouLkH+KXrmA9VS8cPlloDc7/D9syldESfK8AfaCGgpWa/4SD1v+1GNytsoGwN2tnpDUdwU3tBDoMKX9wDuxBObmDDbowrOaQdsXNx0WhzDU7cxL3Fa7FM+47gZTpONQvoSce9HKRkXxY5q5DadkspcySz3GGllK6ifFGA5z/8+cbu3jMLhDY/oXLFEACdQdWk+eLzZDbRxiL1rUdAIssg+EzPg4yx//MBIKrBMqxPiJ8Myk0fyWEyD80vApYH3qQP8sOEapYSTzCKhvOAMV7GtYjVr5BsmR7mHkAJ9uibU0EJ8xINjTNu729xdmgzaeeOc0pG6s0HpPXPL9zeLwcivyOIAJXmdrWKKDQxNV+Mj5zWJV5wzJ382Pqs1u1tGOOJ1LQQDrCd9PzOE9goQ5s17BX7V+0YLyJKrJ7vnSGPpDMWGtIpJXg2rGxVBxdYmQ7QNOjqe0Pz97TrB2+n34vLlPOkB8DZHY4Et4tIdNrvBo+NbvctBIvGaCUNJP/Rq/rwDhGjVeRTsPBmyeHDqxRqcGelm28zjQOygBNdzWYO7oGZRQFGo+LPoHAbtSud+EFUgMOoJXfTRwMSjVWLZM7qAtCPJ7X5kbSZWdeKnyafn9p4blZcdqFg3QN+MA/JeK66EgfmYq8ztW9MJOpOEc0AhGymxAyR5pVGe3AWyfBNfHaPgoFk5osfBnUntP2g8hmZGF4FQ30YFPPLFwM94BdMzRV8WMaIrDsHFTGKRQ6mto0JylSajZvfaS8M4vBDIUp/Jjh/GNe7XLNrKwjWWiwpe7ii7s3a+VdbEosQ1EZmA5O+wvhvjm32YHaBV8V23ec2XINIJXXBGS5EC44pXgfic1TCwCj6O0Rg7Y+Kzcm4h7bmDTu3LFOqrfLOoTppYPG51o4bHPiQ0DP9W7jThLlXSSNuswv4yldvZLRTYLtwKPjRMS5nwA++vyaJdyPhaQaw1p43ID6GieFkkYCKcB+HmXriDXyiX3ewhmsfuEcWGz7i86rrc10zoQuUt0rjvTHuxOQqFtt8AntY38lECtASizwsNwjz4aFg72LWFtMkXjb3PQGgng++BtP0Z0eIePc3bpYyXZUUjh/u+fpIw/Q32kd+SGlg8neF+lYO+ongdxwY3XQmdCzkt+GbGGTyfC1Djfh1rbpBXpZdIBLNetzoj6dqvR73lE6bdb X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: e43449c7-8d04-48b5-4d69-08dc81a948e2 X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB4130.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2024 19:38:45.2618 (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: 5E6rJkENFqPkz4LVJD/Wtz1vXbZJQ9vYm4vEpY0tpYWjgmq7yuG0dRnOq/K108aKdI70GylbLVMMSWMU7AvsdA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB9008 These warnings are all of the form, "the format specified a short (signed or unsigned) int, but the value is a full length int". Signed-off-by: John Hubbard --- tools/testing/selftests/x86/sigreturn.c | 2 +- tools/testing/selftests/x86/test_vsyscall.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/testing/selftests/x86/sigreturn.c b/tools/testing/selftests/x86/sigreturn.c index 5d7961a5f7f6..0b75b29f794b 100644 --- a/tools/testing/selftests/x86/sigreturn.c +++ b/tools/testing/selftests/x86/sigreturn.c @@ -487,7 +487,7 @@ static void sigtrap(int sig, siginfo_t *info, void *ctx_void) greg_t asm_ss = ctx->uc_mcontext.gregs[REG_CX]; if (asm_ss != sig_ss && sig == SIGTRAP) { /* Sanity check failure. */ - printf("[FAIL]\tSIGTRAP: ss = %hx, frame ss = %hx, ax = %llx\n", + printf("[FAIL]\tSIGTRAP: ss = %hx, frame ss = %x, ax = %llx\n", ss, *ssptr(ctx), (unsigned long long)asm_ss); nerrs++; } diff --git a/tools/testing/selftests/x86/test_vsyscall.c b/tools/testing/selftests/x86/test_vsyscall.c index 1c9895cfc660..6de11b4df458 100644 --- a/tools/testing/selftests/x86/test_vsyscall.c +++ b/tools/testing/selftests/x86/test_vsyscall.c @@ -247,7 +247,7 @@ static void test_getcpu(int cpu) if (ret_sys == 0) { if (cpu_sys != cpu) - ksft_print_msg("syscall reported CPU %hu but should be %d\n", + ksft_print_msg("syscall reported CPU %u but should be %d\n", cpu_sys, cpu); have_node = true; @@ -265,10 +265,10 @@ static void test_getcpu(int cpu) if (cpu_vdso != cpu || node_vdso != node) { if (cpu_vdso != cpu) - ksft_print_msg("vDSO reported CPU %hu but should be %d\n", + ksft_print_msg("vDSO reported CPU %u but should be %d\n", cpu_vdso, cpu); if (node_vdso != node) - ksft_print_msg("vDSO reported node %hu but should be %hu\n", + ksft_print_msg("vDSO reported node %u but should be %u\n", node_vdso, node); ksft_test_result_fail("Wrong values\n"); } else { @@ -290,10 +290,10 @@ static void test_getcpu(int cpu) if (cpu_vsys != cpu || node_vsys != node) { if (cpu_vsys != cpu) - ksft_print_msg("vsyscall reported CPU %hu but should be %d\n", + ksft_print_msg("vsyscall reported CPU %u but should be %d\n", cpu_vsys, cpu); if (node_vsys != node) - ksft_print_msg("vsyscall reported node %hu but should be %hu\n", + ksft_print_msg("vsyscall reported node %u but should be %u\n", node_vsys, node); ksft_test_result_fail("Wrong values\n"); } else {