From patchwork Thu Jul 4 07:24:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 810195 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2074.outbound.protection.outlook.com [40.107.94.74]) (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 7A50A1A38C2; Thu, 4 Jul 2024 07:25:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.94.74 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720077936; cv=fail; b=myK4RoUsWW+6yS7p0ISUD445iz8el4ZxWzNZ6fz5cF+62Riv9pndwX1JUg8SuktD6uQ+uQN4qH/4+1Seb1RsRpPRhwwlf0g0S/2NYCZr0GetqmHi/dkct0Emii46VpTYzh4wqj+sKMpy6iJpRcynQUzR5QBzXjnp3p+1zbRIQP8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720077936; c=relaxed/simple; bh=SaE/0Pkfzvvk+suDwmTUuWvjvCY4+8vjETCePovQka4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=uqRt3dkcvH+M5aeOw6Qnf6fpmmrWjlRFDVS1D6BAAB2mOuRgg8snloxqC8DfoyLsugn3/HuvFjTb/9+R4fs5UZkFyGbJbX7KfS6hN9vuNFmLbSqR2c3OFpmIH+sOTLLEp9Z0x8PP9xXvNPqujX103SKg0ozJFNyEp+AKI8FCRu4= 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=M89PoW+s; arc=fail smtp.client-ip=40.107.94.74 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="M89PoW+s" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JTj2HEXJ2Pm/cZjiDrDg6Lx71UXPkb47WR4tpJNjfjy5E3WLbAnp+QC7Hwehfc77S0JbU0N/WByIVjMPc+5f1IKjr+W6M0p5G7XRHgRDJlwp13hYOt1uIhqyWlNoHfetdklX0d5eHufFMHmf7T+s72CIccYENOGlGitFQIBYCRcLrftDbt6MufApMAWcncRYr0+FyARuR7ZCsfFBNXrlQ5dggdWZYLsESJGMo8w7HAdQyrJbbKN9+NlGbg4qDLcSR7/jBPpN+0Vmm18RC1yyn3mfg8rL+1UTa2vuYaTWcMtHiCCc7ALnRpeCqbMg/T/Np8oEtTEOSRGTAAdJccVuXw== 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=zb5DkSrbT/a/sdIvEdu3XVmNC3ITCZ/3J3YC9+olM9k=; b=GEu9jXFr5AjLnLGTXF5VHkfQnDOVCh+Z9PNV8bkWS+UTiHT15jexGVaONxLUzWg+R66EaqL2L1XEYq72h8jda8V5zerEY3GY1H5FXjMS3o3wYQ8cXZcSblem0NQDauQcVD5Ltp99+I4EVZgq+oO9VaYBlywJeYUm8vtPCpQBbHzQ5yNooYgbJuyTbCBIF9NjwGzwj4OupmneQ+SJc+Bp+YhMEXOxeK189TPzoRfy2LgoDG8loL5Nx/Kgrk6gt3jFeZc0n/xTDRrS4+aF7oBgmDS6nRflrgR9umzgaWoenmIy8fBFUXT+HmpAFpQr8MeK3B33HR4+FaWXEDBUOdy5hA== 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=zb5DkSrbT/a/sdIvEdu3XVmNC3ITCZ/3J3YC9+olM9k=; b=M89PoW+siVqPjs4fzmdWHLM8RpWdUrB2+BDLkdLyxXHMJelAbNgryypzg/yKvXEj4PtSLMfi/+tO/bXiCVYfjc1JlZO/YtcqOGaP790psHPsX8mBnV/AtiJb3ZSH+ubWOO7Wy38Jmm7o6j1QNbBj/JpdDrzfBfKrAtqvKHpRnINH8ZfqPCtVTsf57o+EA8Wm1ltGyZww/jQoTXadefQ90tIO/bCOK3DRuKgm99w9Hdxl0jKn4utxhNPNuoNL1VBTFk9sxwwCSa4xbNI3FQGCtsR8mSnx3uwnQwu2EUvOs8bZsPKugZhhR3PxBIzbZhsJYK2ZQg2+nmjEJd5Le+8KBA== 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 PH7PR12MB6610.namprd12.prod.outlook.com (2603:10b6:510:212::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7719.33; Thu, 4 Jul 2024 07:25:25 +0000 Received: from BY5PR12MB4130.namprd12.prod.outlook.com ([fe80::2cf4:5198:354a:cd07]) by BY5PR12MB4130.namprd12.prod.outlook.com ([fe80::2cf4:5198:354a:cd07%6]) with mapi id 15.20.7741.017; Thu, 4 Jul 2024 07:25:25 +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 v4 7/7] selftests/x86: fix printk warnings reported by clang Date: Thu, 4 Jul 2024 00:24:31 -0700 Message-ID: <20240704072431.111640-8-jhubbard@nvidia.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240704072431.111640-1-jhubbard@nvidia.com> References: <20240704072431.111640-1-jhubbard@nvidia.com> X-NVConfidentiality: public X-ClientProxiedBy: BYAPR03CA0014.namprd03.prod.outlook.com (2603:10b6:a02:a8::27) 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_|PH7PR12MB6610:EE_ X-MS-Office365-Filtering-Correlation-Id: a684b971-c664-48b9-878f-08dc9bfa78bb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|1800799024|366016; X-Microsoft-Antispam-Message-Info: CTCE91FeZLm4FyUt/Nv//bzDW1NwjXQ6txH6JtBJB3/pWWO6wcR0vLqpX3+oK5/++Vg3Wupu1U2OQnv3lvYQ1ku1+4ZpNqq4oYdraOOb8dsdjvbJ4/4PWwlKGZ4+8J7dmol/xNGXvOKi6vv25Kq2sjZplUtacNa02/ZWV6RLcQeINIciWSebAQI0wlNhSnL4sezFkdjI4Yy3ve1fKUrTlLdEK+B9sUt7oJvZ9H5mXG3UH+LMDpnH2K/WnAmCan55ad4PtU5Y0L6Yw5q6OrVFO0LQN8cKVejImbsfU42ldZyldTfIHjraAPLRhT2V4f0lq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; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR12MB4130.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(7416014)(1800799024)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: DNQwpyPKko7Ysth6UupJPzFh5m2558jx15EA+TAJKMj2xfAYlfwbp3rgpa4pmehwsEypHZv3Ppo9FpiPBCmn4Spj9fsv73WzKfacuREhDm7fjg9qBqZa6czYYD5+MTCAv5gXkAbioiekFw74B2POKXVWJQbv54vga+Ahq15fLt8D/lSVHsWzHxhEzacvl9QFmi94pM23cs/1R1eYVsc7fW6k3Oa4YFonYqPL5ea/b2stQ8OnUB+5DxAg2fDYFPRkqxzsynCPotcKBo1vopnLggCrOhc8vWn0DOzdaBEYmGTOjMff3Nnl4CtkmvK8Wdqo0+nhT8h1wxKe56adzwx7G0fayp/Z0DBul5uP0+gwBQPcsX7GY6tceK7/hfSeiHvMUd5HGjC2EUeKZ0ONGqp1EtY9VnfyVLb5J/Xu2Ws11ygOci7GJfujjeG1CDQsS/LwxyEepeh8S2JoKjfvFKmd/97hh5HB63F0X+/YZqmZVsOBfMslMNpO/OFajgSQwMo1cxZ9PA0RzTvhzgtU8h67yCvHilNAukeiLX17ywDdiGvE03yXaUCC9t79N773Rl8aOYRf3ekgNgwiVwq44qJIayfKkXOVZbc2e3x+kOJqEx7z1DNEhxfvRhA4ns8sFGQ6Yklg79sDtJCCcWWe6PaTxjXn8f3WlKNFiOVSsMxg3HHL01z4dmcJEXdKqPF9SOBi6mrA193ywTS52pjS2JDQkt3m9Jor1OTe+CQm94O6PrjyR+IR9UIS+NnLlR4uvK9khA6Q3md80oG6x7rI6uBeaF0YxPT6zmuGra32z0NtWhuB6fvMusjgljjDGBInBy6hTc1VUVgNChqv9rRCs6RWuxzwMiDFg0F073NLZdhZaNxeT8T7qTwrNgz29ZYsQxlmUQyjW/obrVG7zvimqOcNS8FDPHvuMFFh8npNWsb9htqxSScacECQIpugioFsBqpTaRGX8HbRY+6h5UAw7w2OaChb2c+BxRlWn21SrRwzfG4BvUfLQuRUc6w0HrBkW94AAwFMm5SJ+JF4DRmWyvW369JurNJ/CmyKFBua43arGPWOAgLzTtCIORIX0RHz68tSeE8jgVSjHsMdgjAsXXx1ggW2ZoKA7V3E5gb677hOcc4TbrCYZ7ZBD9cHG8tA2LIJVfCpZzphXKDib3emVuqx6FR4jccBOcgfpdc+fRQXcu5SX8umI8sXCLKqoYvym/FG5J7tIRRtljSmqYqGfPqPX5ZMGotF3KnhMlEghM1DVoxwMJnNyfSJBQEdmZbv8oOrCiFlVGXGOIKscM2L1+9AImlx7kzcZu/KMv6QtujlOOPeojj6AhUoa8r5jusCdy8WetdvE6EDx+IMF3vQ2/pXL7q7R8tcji170Fckch+4iQqjtj3YsId41K/zLFSVQYYzC6Ju7LKKUD8rWa2DayCG/6cPasjPTek6T7jJ9FmteCmE+tzKFoxTd+71BlGsnjrre0Gy1R5atuHjJYw60QtS1zfurkmnOT7i+5ECgBIqWFcCc1gF7Epq7uAz0mp2zE+qYQR2/hnxZZlBcW1UN7Zb11fsNJyEt7Ro+3MhF+Z+srZQGmT+zNdcr2FY3jCsZXHjSfaqdmPuhS+blkzcl91EGw== X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: a684b971-c664-48b9-878f-08dc9bfa78bb X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB4130.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jul 2024 07:25:25.0244 (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: ubxRCafRkXZy/+NRojQF0AbTrqbNaI6Q4YoBH4UyPEn+o36n7PNwJHegaB0S6JPbx22McgdtZg4VCd3XvELjKg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6610 These warnings are all of the form, "the format specified a short (signed or unsigned) int, but the value is a full length int". Acked-by: Muhammad Usama Anjum 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 {