From patchwork Thu Nov 9 19:53:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaldo Carvalho de Melo X-Patchwork-Id: 163564 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b129:0:b0:403:3b70:6f57 with SMTP id q9csp669364vqs; Thu, 9 Nov 2023 11:53:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IGQyUSPclRRxlVYxmrZFtj9VRRQmn/R8drIgMf7yTUpov5kdb68bffTASodDkCCbZO+kpQb X-Received: by 2002:a17:902:ea03:b0:1cc:6101:2094 with SMTP id s3-20020a170902ea0300b001cc61012094mr411073plg.14.1699559619038; Thu, 09 Nov 2023 11:53:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699559619; cv=none; d=google.com; s=arc-20160816; b=h+qQxdpJPd6L8ScxRobh0wXfLJmOmaJVLnGj6utpbyv3qXBfkt/v4PLp0wioW4y4D+ y115S4vX9RVlEDZO6qJIyMStHh6ANt3XZ/6QRntXagXyjvDQ3odFLbT1MlE8M2VKPSou rzZarNg6Qw5b5TB0o0IHZ56MBNaf87qttKtHb/vWhamd7CxzBekd3v/YLiNcdoef9Rtv A2WfG91PtO5rzoX8p/+kQhaybvcpyqNt1fSPXcLPh2y73jz15S7DJ8WNWqGyjpx/iqoo C6Pe25W5IuoWus/bmBP1uhViMQhPJOpPdgTqzLJ3tM87JD3yPqe+Ih4nI/CKvemm6cMX L/Sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=7EqcaQS1c2rOm/HtDlk6LK9xWwlSJrqEeftDj8TLNrk=; fh=wGkpNuzoAQz7Dj/ZEG9z3s+QzOdrD0rUmlsd77RTR9U=; b=CXG6FkrSNpwULWjlUfVe5cklaPDpQrZcjusHwNxyCyoaKq0LTZhtID9KDa6t2mI5HS rypvzOqZ6S6k+g12gmOCV56yUC1njLCjNxJwKt2C2hJuZfCnlwSiIckEJ40Hq4ze+G6O 8n6GPb6PZsbgbYgl0QaHQ9T3WTDkNZ+IREEcetSD7FWHNdk/0GhJSSTpR1lzsc0wJog9 JqAFi9QKQceTVgNulk4ln4ZV/v5xwZNXg3gog9+pBoAQ9GtvSEIcbWnN/xPWCbCh/zTf Y9xP0rb1gvE4z8K2tkH59CLwqirb+7bbbbFnaJ57BD/74nRopFT7gv66lqh0r1kfPrdb kJsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qNM1OXn2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id y12-20020a17090322cc00b001c3e732b8casi6251916plg.159.2023.11.09.11.53.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Nov 2023 11:53:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qNM1OXn2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 1733182A6EF3; Thu, 9 Nov 2023 11:53:36 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234623AbjKITxW (ORCPT + 30 others); Thu, 9 Nov 2023 14:53:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234622AbjKITxU (ORCPT ); Thu, 9 Nov 2023 14:53:20 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B5693C1B for ; Thu, 9 Nov 2023 11:53:18 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EB511C433C8; Thu, 9 Nov 2023 19:53:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1699559598; bh=K0AUQAMTIJSKGYrpxLpGFIhw+V6BY/dYaUiQAhNcbNo=; h=Date:From:To:Cc:Subject:From; b=qNM1OXn2sVzVmbd9yIKcxVqr4XPMp8yxwyryPiQqHElXVebxUYepeYvFZZcdv5lxk iMOtim6A9wkSSnJrTM4Ayq50vyovktKObS0+5aB0tYwAwPeq9OtINhMuKjIFSbchEp ULR6MecJ5xUoLBp40WeEpGNekywep0KKH3rD8qYic6R0whiG0gcuU4y/XYoPRBXgFF 8UzRY69H6isCyWl5GErWK1BCe3sbCdMRM3ON2k4+YXaFY4VLrGSt1QDQbjQM17nK+N luBGP2PINNnnibwF5DGrKbTNrGxoPs9xDVrM9NkC05PDqXZkuWzR/qP7Db8hhMGUtO crH8s/cQ929wg== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 7856440094; Thu, 9 Nov 2023 16:53:15 -0300 (-03) Date: Thu, 9 Nov 2023 16:53:15 -0300 From: Arnaldo Carvalho de Melo To: Adrian Hunter Cc: Ian Rogers , Jiri Olsa , Namhyung Kim , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: [PATCH 1/1] tools: Disable __packed attribute compiler warning due to -Werror=attributes Message-ID: MIME-Version: 1.0 Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 09 Nov 2023 11:53:36 -0800 (PST) X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782117426918071236 X-GMAIL-MSGID: 1782117426918071236 Noticed on several perf tools cross build test containers: [perfbuilder@five ~]$ grep FAIL ~/dm.log/summary 19 10.18 debian:experimental-x-mips : FAIL gcc version 12.3.0 (Debian 12.3.0-6) 20 11.21 debian:experimental-x-mips64 : FAIL gcc version 12.3.0 (Debian 12.3.0-6) 21 11.30 debian:experimental-x-mipsel : FAIL gcc version 12.3.0 (Debian 12.3.0-6) 37 12.07 ubuntu:18.04-x-arm : FAIL gcc version 7.5.0 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 42 11.91 ubuntu:18.04-x-riscv64 : FAIL gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04) 44 13.17 ubuntu:18.04-x-sh4 : FAIL gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04) 45 12.09 ubuntu:18.04-x-sparc64 : FAIL gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04) [perfbuilder@five ~]$ In file included from util/intel-pt-decoder/intel-pt-pkt-decoder.c:10: /tmp/perf-6.6.0-rc1/tools/include/asm-generic/unaligned.h: In function 'get_unaligned_le16': /tmp/perf-6.6.0-rc1/tools/include/asm-generic/unaligned.h:13:29: error: packed attribute causes inefficient alignment for 'x' [-Werror=attributes] 13 | const struct { type x; } __packed *__pptr = (typeof(__pptr))(ptr); \ | ^ /tmp/perf-6.6.0-rc1/tools/include/asm-generic/unaligned.h:27:28: note: in expansion of macro '__get_unaligned_t' 27 | return le16_to_cpu(__get_unaligned_t(__le16, p)); | ^~~~~~~~~~~~~~~~~ This comes from the kernel, where the -Wattributes and -Wpacked isn't used, -Wpacked is already disabled, do it for the attributes as well. Fixes: a91c987254651443 ("perf tools: Add get_unaligned_leNN()") Suggested-by: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/lkml/7c5b626c-1de9-4c12-a781-e44985b4a797@intel.com Signed-off-by: Arnaldo Carvalho de Melo Acked-by: Adrian Hunter --- tools/include/asm-generic/unaligned.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/include/asm-generic/unaligned.h b/tools/include/asm-generic/unaligned.h index 156743d399aed223..2fd551915c2025ee 100644 --- a/tools/include/asm-generic/unaligned.h +++ b/tools/include/asm-generic/unaligned.h @@ -8,6 +8,7 @@ */ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wpacked" +#pragma GCC diagnostic ignored "-Wattributes" #define __get_unaligned_t(type, ptr) ({ \ const struct { type x; } __packed *__pptr = (typeof(__pptr))(ptr); \