From patchwork Sun May 5 21:35:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hubbard X-Patchwork-Id: 13654672 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2076.outbound.protection.outlook.com [40.107.244.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 9037D6BFD2; Sun, 5 May 2024 21:35:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.244.76 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714944940; cv=fail; b=oOY+22uIFi9v2f4Bs+FXTjXx96uxzutZPtY0CGqBrrn2tqjLdYwEQHI5XtNiEmT3ZYj71juZJwwSMVJ2/NSpHat7KS9rRVvhZynSpoyl+lBBBkIbmRGFI9/19gS9cZFT+DBvCrjIbT2VrlbMK6485dz/0Zf9Khuj0foBxzLZqwU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714944940; c=relaxed/simple; bh=1RY+zWrw7pcPhN+7E1CJSjN3wBIXsxLamrYnV+7Ub1o=; h=From:To:Cc:Subject:Date:Message-ID:Content-Type:MIME-Version; b=bqzgSAakorrPcHUnqlU8JP6V9DJt/xAlzK44MwZxjL7yW/m3smQi0jlpJ3/Ix0+ZGzrJgzNvblOlliN2vDKxH6uXtdkoWkt/bMlaScucFwxXmhAS2m2vCjKNfQVBmZeBFHqix7B0guJxQgjz/NTHTl0oXAYy56Twn8BXXcESXRw= 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=XKaLDONy; arc=fail smtp.client-ip=40.107.244.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="XKaLDONy" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HCsWt2VcLu7qpa4qsWLO6DKZM8hyuMvOJLl3IbXICeOv6CjT5qkAu/fZGIQTtku6Zrkmwc4EpFTG7LTprm7PQE8KEq/BZH33C8W52yQQLZqyQioiCeoKFS+z2VPHiZ4w4yZgJATwkmJRfxlR8ULYKnqzbuoHtmMU1ge/Mj0VbMY60kM7EKhQ/Ifq+QMEFTi+ICH846Ds2lIWbQr33Ap27t1vwxhL8M6ogxpAdQhFuTa8a3taL2Ji3KFfiGE6m0LqW8PzKsrpEef/caWfV6iXWZJNpJKsSiilRDzj6j3cN7/RuSuqlwegOs1dsJjHotaCKgeBOyOaMEYApqiOOj4fRw== 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=Qfc1BG5kr5nwR7ndG+KyYQO2zsUXMJt2sD/zBV2LUN4=; b=VLEyijCNb/9vDQIGLQRPOc4IpQ8hrqsnmLhiZhvtsClRUrZHeEbxgJQfAHsZ3ZCIkWGcUuwI9ygjGdG+IJiWVwuEHXCWvUSLyVsUmHgUDZUAJISdsKA2zXYL54KAnwb8lT4JHtYjkJDysHUwT1r4K1nn545w5uyP3wsZqGjkKJGNBC2rE3jOWFpGN9fiTkKmxs2YvR6dSzDjGWyq0fNohio6dyeNfZeJ0EILCEsbRnUE3M8RaUQTn9j4EpfDVXdNq3eMQsSJN54dFojvrZQOe5UuwcbI5Vx2d1aZ2+Qve2W5/0wcxCRTLUUG50c5Bt8M35k/ou9nZF6Rg0NjP1wZDA== 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=Qfc1BG5kr5nwR7ndG+KyYQO2zsUXMJt2sD/zBV2LUN4=; b=XKaLDONyfF7F1TGJP8Hp4+f+8iaLh12do/UbiHFgYAALixWie17DO91xIcP7NHAwabTe2kTBbG9WrM/nju6a6Lr+Fet48e5pTLb0FjtLMgJBS4jWb+FGU12U3V8oseBgzdwpUHR9Bn2eWeVSBlC+DaMCU24zmWEpyj3U8CWTDrES0W7YGl345A3r+2RnFOULLtvsh4tPRZLt7Lg3+FQeRcVuGVwjAjNtn2HfKro0rPwD9RGxZX40MsvQASkW9c7jlUv+0pLP8IAE9Tw2SF8wQVNbRFvPC1fTtWdhlniUu8rZ2TeLdrAYFsG1xv7RgkjAFuhsJsYj4KrhorkadPEyIg== 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 CY5PR12MB6647.namprd12.prod.outlook.com (2603:10b6:930:40::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.41; Sun, 5 May 2024 21:35:36 +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.7544.041; Sun, 5 May 2024 21:35:36 +0000 From: John Hubbard To: Shuah Khan Cc: Beau Belgrave , Steven Rostedt , Mark Brown , Naresh Kamboju , sunliming , Masami Hiramatsu , Valentin Obst , linux-kselftest@vger.kernel.org, LKML , llvm@lists.linux.dev, John Hubbard Subject: [PATCH] selftests/user_events: silence a clang warning: address of packed member Date: Sun, 5 May 2024 14:35:23 -0700 Message-ID: <20240505213523.60492-1-jhubbard@nvidia.com> X-Mailer: git-send-email 2.45.0 X-NVConfidentiality: public X-ClientProxiedBy: BYAPR05CA0073.namprd05.prod.outlook.com (2603:10b6:a03:e0::14) 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_|CY5PR12MB6647:EE_ X-MS-Office365-Filtering-Correlation-Id: b2a5b1d5-9a49-4fb1-edec-08dc6d4b4ce0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|376005|1800799015|7416005|366007; X-Microsoft-Antispam-Message-Info: Rxq8zJPrZMa5WaASDZqIVllTWtAkKVfsbIPlcz8hbmTOwdhPOJ9v7YHdj1PaB5QpABAEarXme7mINvQUZSrrAcQiNS2YWzgqdoBjGDHWSZmBPCqxTpt+vQgAYmKxRlWSAtYmnD2VjOwi8HBrVb7QrY76teH/ERVPv+VvzC9qL8MkF53PBqhxvQyjh17TIeMui4osqkE5IAzHbByYuJPNqjkU4GcFefHlQF5UI/jnVMAu1n9z4X7/uJ6XwlY3kaIlV7ldEu/CS2J47QcHkx6Cldekoy+V+N9rNSDg7kYTIdoMFYFeX+XBOhmcdRzO2w7Pea6vxqE2YJ8pPsVJb56TcGADnggjJHaFcexyDdX5y5PuWU2VCuXu9OPmuONKue0z7f0NSWL+darBQYQfGykRPXoujYP+PjsYVGbQZbbidIUEpu/b6/MmkhjiUyOEooV+yx0AUw6bSIjHDf6jcwvo7XirW/voJMW0+ZUOwzQYk3oX1u5Agg+5zpXdtAD4IMVelITwikAn1mg53LfAlB8O/60juweifhFNUnK8Cv0q1KNh/ZyIPlCtTUfGulXZ9zKgDmpMewnp0cezfuTNfQ+k1E27GaphXSsmDnyjrMofNCoFJbj8ANdjMw9w0KF+kavZIKgUiymh4erMPRudoAlRZ63wM+zLhxY0ZL7aZWMLQzb0mQA2ZL9klgzAzilNwAURnXO2LoTnYltyjY3aFdLH4xfshgRuUx1mxSYnte6+938zXjSguG6tfs2berhWKVMxaKJf4gCTTYvNig0t4mZCjbyod6ec+dC7uW0gyURXLJ1YqM3fjzKlcj5A1wiUOstaquwdtAdo4b3HKXiSDHeQV1imLbK3lzd8m97me1rOSgQ1Cuk86dcAYHIQ//vE+/mpLeFQi2Kc0q9XcFGZZBLFChIuZp9et1BKTevBLvHJvt1Wqlhu2+3BqDEV5qAGv0K2y1Ok29zSmPShbgc7PUyS6DEHSRf8kEaCi1ZsGhDA1wIbWt0A0hfZXkH2tUjR/ZS9NkEzCa1GKTE1FE92R4F2UD5gj7KT70YjjppYLkU/xjI/3Xky81SmF66BQ86mZ0KnfkzOBMd+z1iUVVRessJxVZIhD29fnCXHMUctCUbTxBpSfekYwoRgrf/keUYQJKYgZsang/kBhE8fKXVIv2cLJg0tRGpXJFchWxVln0SGDri3SOQssVbkB42HldYpLUONylue1qFLQR+pQI1Wnh2BfjlFcikEhQi2pcrb0YY6r+JvUEPPFY5iR8krcy8DcOgA+ilAUZmejYigGMtBeJOWZw== 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)(1800799015)(7416005)(366007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: rHLjcwbyYuFC/3R5Ido/gfq0VqbtUBYq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AFjsxISInKFkU4dy5tFOH69e14ZZVGehODxOopQ/iisFOTUQWUXy6ETzLA5uyn32zm47FL5eNf8vxsyu1X3KsGf566znBfvZbjojW9NT4+5hkFUsCKVWbhcfDRkhQD5sPKiKxQxrBT/da1OtwIrtLQ9Cwqh0lR4FRjSTakIC9tKDWw0BCY3NLW3smViAk94LpcXBz6xTFQHSbKTbrlcZP/MDTdA5SXB8x7bUaIr+beuEfowCG17j81NajRUqnXwrh3bNAGGmvkpRIzSZDVsQ/gSpSdMpMfKCLLOLbhbN3RaIy+DMq3jqtqsAJSms3qgU8nLpTjlcVWDhVfncXNaQ+LC6veiMHhNuLMq/cojWkXyBrOAHSHwkrZ0I4e3uR9F7g98lzZTa8WhZGcs3XZcFvy7FMeGpaYnIiDJl7j/CZhmB+C7w/bnFQ8QZ1DtViWUihpgtmq+fnJa9sLywSjF0EMwzaOkKWQGOjSm8hZvb06xa7Ob/gStCtMW8OjFxrcxkaMg== X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: b2a5b1d5-9a49-4fb1-edec-08dc6d4b4ce0 X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB4130.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 May 2024 21:35:36.0757 (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: GVR0Sz4NqQoN9hjPaze/E/59a0R1BH7aAo0+BOUGe61mWo1mseUF04d4j/IBIllc8mX4NZQP6EYPdqlb1/2YGA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR12MB6647 When building with clang, via: make LLVM=1 -C tools/testing/selftest ...clang warns about "taking address of packed member 'write_index' ". This is not particularly helpful, because the test code really wants to write to exactly this location, and if it ends up being unaligned, then the test won't work (and may segfault, depending on the CPU type). If that ever comes up, it will be obvious and can be fixed. But all it's doing now is prevent a clean clang build, so disable the warning. Signed-off-by: John Hubbard --- tools/testing/selftests/user_events/Makefile | 5 +++++ 1 file changed, 5 insertions(+) base-commit: f462ae0edd3703edd6f22fe41d336369c38b884b prerequisite-patch-id: b901ece2a5b78503e2fb5480f20e304d36a0ea27 diff --git a/tools/testing/selftests/user_events/Makefile b/tools/testing/selftests/user_events/Makefile index 10fcd0066203..617e94344711 100644 --- a/tools/testing/selftests/user_events/Makefile +++ b/tools/testing/selftests/user_events/Makefile @@ -1,5 +1,10 @@ # SPDX-License-Identifier: GPL-2.0 CFLAGS += -Wl,-no-as-needed -Wall $(KHDR_INCLUDES) + +ifneq ($(LLVM),) + CFLAGS += -Wno-address-of-packed-member +endif + LDLIBS += -lrt -lpthread -lm TEST_GEN_PROGS = ftrace_test dyn_test perf_test abi_test