From patchwork Fri May 25 21:33:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 136996 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp87568lji; Fri, 25 May 2018 14:34:04 -0700 (PDT) X-Google-Smtp-Source: AB8JxZov3tW4lEy+xDCYslruWFeDrBlw5DV1Lgs4STzg+oGJDZwvQAcGq3xb9jyv8q5bbBLXu4MS X-Received: by 2002:a17:902:6ac7:: with SMTP id i7-v6mr4147718plt.288.1527284044388; Fri, 25 May 2018 14:34:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527284044; cv=none; d=google.com; s=arc-20160816; b=EAA2JYcn2a0q4IlHkoZ9pmnsrTF9YBOYgY80CdRvmqDcXgUblRbeGpCrD7YxvyZxU2 C9YzFFpCV5teJw5VIERIxlxXBIORYIfk4OsH/HypFTDYYf7htC0Tgoari1cyz+dTkRuJ 2nsa9BY9kkc2uOgUSDZ0CfZ2ZFfQPk4Hs4FqOghAfgP9V4P2GAPT2QeDC/Nc3flx9+Rz F/jSJ4rq3IXtwF52ZQBDchHaQiinkzovtmcgd33vmmcesk6ze7accpfF77Xwp/JVNTe+ zT1aae7lmHJPGi56n44UDz1C3IDxktGVdqX5rardJ+yoRGYL5WFlWx5lqX0L/lGJsJb4 n5Xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=kYbqIsi+LiqIKrY8WEE8HK04Mc5n+yyGTZEdMaAWQRg=; b=kc8wFlaqMqKpaaTNGnSn88POFM2vjYEID/p6bLI7cfmKc48Ia0PeCi/Pw6tgVWCY59 Qb2D1qkWjv+nYwY6ILYmx1yENoJEtCxwCUpLAYdXQWKe+tvaWlMmibXtnAQHOpiCdlNS QNusIgPLgUND7IiTPX86ucFZHlp0/LWMiNNRzS0j282XZ0ZE84tgKevyO97idFh6xRTr TiuKnBeWFehXeBW9pMseh9itrXW9w6/CyaoZLGMTH+DUk99g3LaTYRQiVCrf8tdpGaK9 sdDTe9InVSLR40VkmzI2S7HJIdaVOQC1IcJR3aipa1LvO2sXK1aGvs8eKQxGMvBD0/DX /Z9A== 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 a5-v6si24889002pll.123.2018.05.25.14.34.04; Fri, 25 May 2018 14:34:04 -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 S1030436AbeEYVeC (ORCPT + 30 others); Fri, 25 May 2018 17:34:02 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:54717 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030216AbeEYVeA (ORCPT ); Fri, 25 May 2018 17:34:00 -0400 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue007 [212.227.15.129]) with ESMTPA (Nemesis) id 0MNATs-1fOYKc2gUy-006gzC; Fri, 25 May 2018 23:33:34 +0200 From: Arnd Bergmann To: Alexei Starovoitov , Daniel Borkmann Cc: Arnd Bergmann , Martin KaFai Lau , Song Liu , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH, net-next 1/2] bpf: btf: avoid -Wreturn-type warning Date: Fri, 25 May 2018 23:33:19 +0200 Message-Id: <20180525213331.2115471-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K1:yVV90sA6Eh8UbQLosTBJ/01CrbxUbLoorXerFl+UAztokMLIqJv cxSDnSRPlFWZzReHm2e6was45IZFgep7Katd7/9mrV1ihQgKjcjBuJCIy5arpguvUjPBzr5 /d/uVTbed4+wC3/HmkTGf/rQuV/HpvJSPXn90z8C8HH4l0jWNEXIpVYJjKK6wmq4FnbqM+M nK0AFYypmdjCMneg/dp8Q== X-UI-Out-Filterresults: notjunk:1; V01:K0:mxSvhcuP3FM=:A7fuER43f4DbT1A1l2CCRd 0JeCOzhe5XybE1vvAItY2x3v+cUO4/0MkS34+OMG2u+9EDwpWILiNKIcJ0oB5rSz7O1yflJIb ob+bwfx+CW9QpN+Wme+TWs6K9tx8dDNpGnR1i0SPfjZbsG857hof9ZC8sLNE9/iC+H9ownaTY yRvfDY9694ErLHgn3NBJrYc4DQ0dBndNxnnoT2/QH5mCtv2xskufnRekQkUkzhjqsZmkGIopl aerZPVqU/6DbAWOUQnIJnvsmIxsEauN+UZjwNbULslwCXhmsvgAI7oC4pN2eHzI7CNykxVrKd YWbekrjz2GV5m7sdm9O+ZPirvEZyw99qvexbYxCo5Pbu0vf7STmmF4YLJa7QMLFzDBb7xkYpf 80HFWXeZQR7Fwjqphetm9rxDdtnkill+eFWl9shq/2+DSVajeYOl+NsNX2t/LWaRzvPgc4xBX FXATYxuCo8vlKhr6i/IRCQBNSSjCTaIyM2ddV3aef2abYk1hIMSguGkUELUze+aB6uyByoDF+ vVVEZxxSx900pGNvy8o0ocWNcIjEYLEQ93s4+dbm384rP9DSCJC/11OG2jmLtVzF2EnZSZKs1 PkZbACrSRjF85MFDzg/JEdLrAlbjzVYNPTqBDRN+H9DutSi9akT6BthKrPq5YOROpufOBDCAP wepCby6aYm9/7yxtt8OvTKj/JC2z6Jl4N6ZfWXNL+LFIF5ikhF2CERUevkubakfjunrg= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org gcc warns about a noreturn function possibly returning in some configurations: kernel/bpf/btf.c: In function 'env_type_is_resolve_sink': kernel/bpf/btf.c:729:1: error: control reaches end of non-void function [-Werror=return-type] Using BUG() instead of BUG_ON() avoids that warning and otherwise does the exact same thing. Fixes: eb3f595dab40 ("bpf: btf: Validate type reference") Signed-off-by: Arnd Bergmann --- kernel/bpf/btf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.9.0 Acked-by: Song Liu diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c index 9cbeabb5aca3..2822a0cf4f48 100644 --- a/kernel/bpf/btf.c +++ b/kernel/bpf/btf.c @@ -749,7 +749,7 @@ static bool env_type_is_resolve_sink(const struct btf_verifier_env *env, !btf_type_is_array(next_type) && !btf_type_is_struct(next_type); default: - BUG_ON(1); + BUG(); } }