Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp1083122lqh; Sun, 5 May 2024 15:51:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWmbenx9gjtXRW8YkdI5clhL4oLIYub1qqKVl1uZKm2PRy+enKn6+NqDqnim8bO//fJi/9L0DI06Tce2d8lUpyUxcrlLQVJaSbX9UMxIA== X-Google-Smtp-Source: AGHT+IFWFbEWia2zwTbB1x03iVgMgfY/K7J6WO7p8b/kaj+yL8vVi4747TCWN39pzRjTsOTYz5sP X-Received: by 2002:a50:d55e:0:b0:572:8aab:4415 with SMTP id f30-20020a50d55e000000b005728aab4415mr4374621edj.40.1714949484180; Sun, 05 May 2024 15:51:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714949484; cv=pass; d=google.com; s=arc-20160816; b=efX8p+QC3WPK9+J3cvuXlixJZTXSJ3KO23xJqG5bpgaxtMrYvuCT5gRse6pPcmiwV0 qv23Pghq2FU2C6gl+pVlUoxhScIDMxccYDFROfX8flIFknoPMdE9yrDEWe8Me1b9sQ33 773PFiRZxZvKCXkprrZTcSH7HZ9a2ITBrE0al0euK6mS8tFPJUXM/BMYFfYTWYKCjgt7 //wgIMV/HETbLamu9zkW2wOq0EMYhcmBrlguQTGrWE9QwISL4Rq27uspAVlyeDL1NurO Sga26l0F2AnKwc02VPbHzF275iotHBCFIkhlotf/l0dqY2l2qph3baUnk38ja+UIjBXj gp8A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=bWvCM7aeRoi6lgwtfQy24xl1Qmo4X0O7fN5TCKPn91E=; fh=AqQwPn1t9ju9TyWpGV0lZMHMyxowQh5KL4ZjMU/J448=; b=qXjklYFw14ZUNlcIgEWkpzGKelJhyPoN2WTsl1aSewrh2i9DNSivc0S4la5yT1Pi1B AAws7bQhQe95i7JNZhfoSJgbQhzRu1AICVot3bTIlM8G6RbICgNDEyjzSsDucjWmxKmE vlXiX4n8srFa0dlM+5Ggix1N1vCMVfoWMeIOZ+TbaDrWtd5tO7eFIUKkmqe4yThRYHQm /or/UHtSYJpU8JnnS6qUO639G/WHqrpXoy7ToBkfGNZ5NMpNYl4QJdJGzkf/Vr/uzK9u B4e6h9VhulIufSt4YT/01rtWO4U3NP+a52MD+n2SGbOMj8a17fAhF6uN0pC2YbWVPJ8F vtxw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KedS7YTF; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-169194-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169194-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id r25-20020a50d699000000b00572a8000ecbsi4164321edi.13.2024.05.05.15.51.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 May 2024 15:51:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-169194-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KedS7YTF; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-169194-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169194-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id E614B1F21872 for ; Sun, 5 May 2024 22:51:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 080EC140378; Sun, 5 May 2024 22:51:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="KedS7YTF" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 175D7136E20; Sun, 5 May 2024 22:51:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714949474; cv=none; b=EqWQxmEBIb+m4TblwWw/3xoM1CDZknf5qGGGw7B7nyBgf1/sXwtHBPX/wq9rQls03O+/1wcFKQQ4b1JAlfreVUSKlw+JmkJ/fEmFZ++xhcCZ+JqWDJq/QoQBqu/FxOYAMaHoQniXHSQPAkAv9M+Tn9KYyo8NskhP7bQTSIIzeEg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714949474; c=relaxed/simple; bh=PpREyaeRW9fmGEqzkui6H4Fz+fZHr5048DsvwArMj34=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=FV5XC2nALJ0cAxryKaAGSKahN9KEYXZSTEQiw+JDQrcUwxOZU5Zvgpnx6d1Zd3wq/n3L3qLNzHFNiw2Okls/0v84xj/okSmnSK+7U/J8aHfhgv/Wc2Jt8LanRWCvyGxTPVjiU58z/sNIsEpCFQEI6A5lYkmISe3wzMe1VD+iLBM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KedS7YTF; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C62A2C113CC; Sun, 5 May 2024 22:51:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714949473; bh=PpREyaeRW9fmGEqzkui6H4Fz+fZHr5048DsvwArMj34=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=KedS7YTFPShms2EW5vmctbeblHwEm1MRr50DJxSpBbw7O09IJeOBzr9lnJ8SxFh6r B5CNYYMnX1pXknonOt9+TLwLc/R7z1auYvCwf8/defzhp2/XSKMQFrHCjzjstic0Vw ZAWnnzTGW6be8MSe98YnsUG3/AEaxZDgzihz5+yVS7l1CBP5jIpsHYjYDGNcXALan+ NAQ1bfwOYHD2vFUPtZ3SwYe00jj0dNBjxawq1RrOtiNFvPIhNMxSfvbnavPt+VNUFd Ev8A04hMMTgpFS57QddgG39j+ofgsXTLzU8aKzdmUVUIl5cMUyh3HEO9samEhRDfvQ CdMVOG6MNry1w== Message-ID: Date: Sun, 5 May 2024 23:51:07 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Subject: Re: [PATCH] bpftool, selftests/hid/bpf: fix 29 clang warnings To: John Hubbard , Shuah Khan Cc: Jiri Kosina , Benjamin Tissoires , Justin Stitt , Peter Hutterer , Jason Gerecke , Joshua Dickens , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , bpf@vger.kernel.org, linux-input@vger.kernel.org, Valentin Obst , linux-kselftest@vger.kernel.org, LKML , llvm@lists.linux.dev References: <20240505215636.63592-1-jhubbard@nvidia.com> <4f947691-bf25-460b-bc08-da29de3fdaa6@kernel.org> From: Quentin Monnet Content-Language: en-GB In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 05/05/2024 23:48, John Hubbard wrote: > On 5/5/24 3:36 PM, Quentin Monnet wrote: >> On 05/05/2024 22:56, John Hubbard wrote: > ... >> Thanks! If possible, I'd rather keep the warning enabled, and fix the >> command line instead. Looking at the error and the Makefile, we may not >> need the -lLLVM in the CFLAGS at all, but only in $(LIBS). On >> my setup, I can build successfully, without the warnings, with the >> following patch: >> >> ------ >> diff --git a/tools/bpf/bpftool/Makefile b/tools/bpf/bpftool/Makefile >> index b67454b45a49..dfa4f1bebbb3 100644 >> --- a/tools/bpf/bpftool/Makefile >> +++ b/tools/bpf/bpftool/Makefile >> @@ -147,7 +147,7 @@ ifeq ($(feature-llvm),1) >>     # If LLVM is available, use it for JIT disassembly >>     CFLAGS  += -DHAVE_LLVM_SUPPORT >>     LLVM_CONFIG_LIB_COMPONENTS := mcdisassembler all-targets >> -  CFLAGS  += $(shell $(LLVM_CONFIG) --cflags --libs >> $(LLVM_CONFIG_LIB_COMPONENTS)) >> +  CFLAGS  += $(shell $(LLVM_CONFIG) --cflags) >>     LIBS    += $(shell $(LLVM_CONFIG) --libs >> $(LLVM_CONFIG_LIB_COMPONENTS)) >>     ifeq ($(shell $(LLVM_CONFIG) --shared-mode),static) >>       LIBS += $(shell $(LLVM_CONFIG) --system-libs >> $(LLVM_CONFIG_LIB_COMPONENTS)) >> ------ >> >> Could you please check whether that works on your side, too? >> > > Yes, that works, and of course that's much better. Please let me > know if you prefer me to post a v2 with that, or if you plan > on sending it yourself? Please go ahead! Quentin