Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2865471ybb; Fri, 27 Mar 2020 13:35:21 -0700 (PDT) X-Google-Smtp-Source: ADFU+vt6/4VVvEgM9Qfb301EPkQUMMnLI3gFC+GsaEo8y8MbaWhGYMCgkgRFzALeeqoDM/LCQKmg X-Received: by 2002:a4a:d1a4:: with SMTP id z4mr1086770oor.52.1585341321522; Fri, 27 Mar 2020 13:35:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585341321; cv=none; d=google.com; s=arc-20160816; b=fdq4mTU2Lp/D7Ecm6gEuOX6o/kL52OpHWozlzPvrTmIJ5fPczVbPoaaP7BwRwTlluq H0j23Ix7K2s8jl+l2iiVc8780piHeWige3lLsVpSq8FF9KpfOD/I+2vdH6aIq31Z42Ap yoQEREei/gRni0QOqXpJjhAf9c/nA0DLDRNbhCz0Gyi8OB6+K5ac2du0koJPXwQeWOfh kPme1jPMZNS/92iciQiA4QUrYsAXYwoPNRRH3+BqnjsElmJg8xThIgKWwx7ql42s2bW+ cO76icxphwlmen6q8S4QaM7g2B/FGBgZ/o/yggosJYihX97wEehFjIA4fFnZQFlIeCcW +H1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=Jbh7zjexkSWFIpNB2wwLxoLR4kV4a/ztnE/hUT3V+Xo=; b=jCVhjzJ9qTKCj7XJX0MvWGyT8fUpX9vNO3MNTsGV8DxBnKMnXVrLl8Sv6jmwm1SHb2 TWnzk3y8k/GBlLpDYnynhVU6QXL84qLVcNxq7IJFIpi/z9dqoPQfpKeJGfqwr79mGWbZ jXw92jUUuppnTV76TVAc87wfDPnbswf5/p5lj0nrqCDjs5TmN1wC2FX+wjgOQlaRT8aO n9oZMsJBNZSL5HHrmtd3KJxGXnNpcZd2V0L8iejwdCUv5sNMqoDdYHJ8rZfuXKxdDwDw C4yOhmtYDTC1D/q+2NamFPPEiaL6sWjY1u/OS2wJgP7DSB7FwoaJ8SYQr1sh+NyHIMBa H6NQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o18si3029133otk.80.2020.03.27.13.35.08; Fri, 27 Mar 2020 13:35:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727801AbgC0UeL (ORCPT + 99 others); Fri, 27 Mar 2020 16:34:11 -0400 Received: from www62.your-server.de ([213.133.104.62]:39836 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727393AbgC0UeL (ORCPT ); Fri, 27 Mar 2020 16:34:11 -0400 Received: from sslproxy05.your-server.de ([78.46.172.2]) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1jHvg6-00089O-S4; Fri, 27 Mar 2020 21:34:06 +0100 Received: from [178.195.186.98] (helo=pc-9.home) by sslproxy05.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jHvg6-000Lpp-Dh; Fri, 27 Mar 2020 21:34:06 +0100 Subject: Re: [PATCH v3] bpf: fix build warning - missing prototype To: Jean-Philippe Menil , alexei.starovoitov@gmail.com Cc: kernel-janitors@vger.kernel.org, "David S. Miller" , Jakub Kicinski , Alexei Starovoitov , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org References: <20200326235426.ei6ae2z5ek6uq3tt@ast-mbp> <20200327075544.22814-1-jpmenil@gmail.com> From: Daniel Borkmann Message-ID: <3164e566-d54e-2254-32c4-d7fee47c37ea@iogearbox.net> Date: Fri, 27 Mar 2020 21:34:05 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20200327075544.22814-1-jpmenil@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.102.2/25764/Fri Mar 27 14:11:26 2020) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/27/20 8:55 AM, Jean-Philippe Menil wrote: > Fix build warnings when building net/bpf/test_run.o with W=1 due > to missing prototype for bpf_fentry_test{1..6}. > > Instead of declaring prototypes, turn off warnings with > __diag_{push,ignore,pop} as pointed by Alexei. > > Signed-off-by: Jean-Philippe Menil Looks better, but this doesn't apply cleanly. Please respin to latest bpf-next tree, thanks. > --- > net/bpf/test_run.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/net/bpf/test_run.c b/net/bpf/test_run.c > index d555c0d8657d..cc1592413fc3 100644 > --- a/net/bpf/test_run.c > +++ b/net/bpf/test_run.c > @@ -113,6 +113,9 @@ static int bpf_test_finish(const union bpf_attr *kattr, > * architecture dependent calling conventions. 7+ can be supported in the > * future. > */ > +__diag_push(); > +__diag_ignore(GCC, 8, "-Wmissing-prototypes", > + "Global functions as their definitions will be in vmlinux BTF); > int noinline bpf_fentry_test1(int a) > { > return a + 1; > @@ -143,6 +146,8 @@ int noinline bpf_fentry_test6(u64 a, void *b, short c, int d, void *e, u64 f) > return a + (long)b + c + d + (long)e + f; > } > > +__diag_pop(); > + > static void *bpf_test_init(const union bpf_attr *kattr, u32 size, > u32 headroom, u32 tailroom) > { >