Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2876390ybb; Fri, 27 Mar 2020 13:48:02 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsY2fQ1w4ZIZfdD2OonmTRdBrII4MAELUreiSexeeLB/8G52NGBoSaoM6EEzbzViZfxALBI X-Received: by 2002:aca:5d04:: with SMTP id r4mr565654oib.94.1585342082559; Fri, 27 Mar 2020 13:48:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585342082; cv=none; d=google.com; s=arc-20160816; b=gxkGGWRqNC0we92QD5tvGip9EcMusjjbINgfhLRa1meCqizTfpS0rz7DGuvO87k6TC vPmtBNFpHLFxiqq0/GHmd/O8EeJvwDWFwr5nt0Fa1flbynykJBBBIJB9II/6EZ2hz1HZ 1cZzTc5xHUKVBPx1Uni/ztxl6Q679v2BJcPaz0LkVBtnjsJ17nt3lss3QxYeXAtefFl6 rQvt3KNcInHkQ7fsMcNYISpVFff/JW7yP2ISFmHJd9/SQKgJc7gdDtA3RHEOyUWwjYi+ m/jrrWvs6lfZjRGx1q+hG6wZqTKDGDiKahfLLeW/JrtWrfj1BY9cM9KB8GFhKzu8SDUN V0vw== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=KrwX+7IzzOcdtmf9GL8aP68WQccVqVWSmtAG1GU9fKQ=; b=e05pLsZkUMtxYJO3y6fgyJn3eHp/mOEKjsWv5XHpW9RVZ2T3070quYQQR/cE/UTFg7 yaGiDITif9ifVSezL8zTZxDxEQ4dHznwM0FL3+JvoIKP5Mh/c9WV1/ual0nsGgTTNU3R R8Q+ijYx16i4MxFhEIKS4kOtd/+VC3+9NlU4GZCay0UAFkwJVbGWd8vGh/eyrn/MrRgv 9BANrSJq8fGVStriBhd4PgmjT0MmlZ948kRFLda9BRGk0nz29NxII5mnSsEMOv8yzQRq PtJiMu4fXW5x4WCE/mY5O/b8Hlrv7pgWiELVODOqZfWJ9mhKrr6QBzJM719uK9zkbF0I /A8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZHJZ1sVa; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x35si2853002otb.99.2020.03.27.13.47.49; Fri, 27 Mar 2020 13:48:02 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZHJZ1sVa; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727696AbgC0Ur1 (ORCPT + 99 others); Fri, 27 Mar 2020 16:47:27 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:34341 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727322AbgC0Ur1 (ORCPT ); Fri, 27 Mar 2020 16:47:27 -0400 Received: by mail-ed1-f65.google.com with SMTP id i24so12946142eds.1; Fri, 27 Mar 2020 13:47:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KrwX+7IzzOcdtmf9GL8aP68WQccVqVWSmtAG1GU9fKQ=; b=ZHJZ1sVao15S3PsXnhgLvQKmGh+O3Mrw5UAt6NlaAgQyn2ZmDn/JZuh0bJ5DcWpSmt Pb8woPwR21dktkpk17yEH74bwFfUaqlH15wb0TupQEUwbiH95dVBaN0L0S8urJytHLM3 YnOgNEVJJcct8WA5h+ZjlYw7V/HoJ1P1h56E4g5/bOyXy15gq4P2hQ0Q8b51BoE0ChGD st/R7hd71pURtL2VPnBDAtacN7kPswlcWf+kzA+OO1vmbgcZFh0hC12JJsgixnuxMhvv A7IOrkb7zT1aZtU2fLMPD/BOjdz8kpURUT8qwMvIIwltjjtzks76Rry0+bwm/XbjJh4I JljA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KrwX+7IzzOcdtmf9GL8aP68WQccVqVWSmtAG1GU9fKQ=; b=S7duBvmKwYwJecfq5KIF2v6YyQW0U0dAB+FAzT+DbF5+Y12aoySAE/et3xA2pTtUfA 9H7GZbBTNoitlHaZBQRIO0whrOKBKnhbn4nh+/xl7PP9oPVmx5E3pfGfeVgwEzI0Omq4 q9Aexyo+deEjgMY7jCz82fWVilr9zBMweIv5iwC+48zCuHTQV78QfQfzM9TNLefo6O9U yySsNAXxgx1j7J0eV9W/JZHQp0wIpPJXM26w+1Jwj+eihT8eRX5kDL3qEovKPF4hHpQ3 u/UwWDeGAqNIGx5Rkas4wsGbq1kdNV3FTzcfnKi8YJkovah0O0314bYbU48LhyPiONsS WaMw== X-Gm-Message-State: ANhLgQ0dZsM+jajyALC9p1E9HCTxrOiXdwwzd7t3irzgnL56AyBYQDe3 yv1P011pRSX1EfA2CvS2UAM= X-Received: by 2002:a17:906:4e12:: with SMTP id z18mr868375eju.49.1585342045395; Fri, 27 Mar 2020 13:47:25 -0700 (PDT) Received: from localhost.localdomain (bbcs-97-49.pub.wingo.ch. [144.2.97.49]) by smtp.googlemail.com with ESMTPSA id p17sm1048552edq.57.2020.03.27.13.47.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Mar 2020 13:47:24 -0700 (PDT) From: Jean-Philippe Menil To: daniel@iogearbox.net Cc: kernel-janitors@vger.kernel.org, jpmenil@gmail.com, "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 Subject: [PATCH v4] bpf: fix build warning - missing prototype Date: Fri, 27 Mar 2020 21:47:13 +0100 Message-Id: <20200327204713.28050-1-jpmenil@gmail.com> X-Mailer: git-send-email 2.26.0 In-Reply-To: <3164e566-d54e-2254-32c4-d7fee47c37ea@iogearbox.net> References: <3164e566-d54e-2254-32c4-d7fee47c37ea@iogearbox.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 4c921f5154e0..73e703895343 100644 --- a/net/bpf/test_run.c +++ b/net/bpf/test_run.c @@ -114,6 +114,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; @@ -150,6 +153,8 @@ int noinline bpf_modify_return_test(int a, int *b) return a + *b; } +__diag_pop(); + ALLOW_ERROR_INJECTION(bpf_modify_return_test, ERRNO); static void *bpf_test_init(const union bpf_attr *kattr, u32 size, -- 2.26.0