Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp74717imm; Fri, 25 May 2018 14:34:41 -0700 (PDT) X-Google-Smtp-Source: ADUXVKItnOCIY8XvdaWkRpFZGxJw9fnt9MdASfTfeZKSXG26v10YDRnEtes5L/pfQQjqLeBFGH+f X-Received: by 2002:a17:902:7d89:: with SMTP id a9-v6mr282369plm.238.1527284081522; Fri, 25 May 2018 14:34:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527284081; cv=none; d=google.com; s=arc-20160816; b=u8y2oKdW2UkVPIhEFrsHrM0WatuMyjZyQHzcRnxX3aBnZUSMD4zG6Fr29auzfcltA4 sGH4Kc4U9KD+TpqLNrCIF/JzvK64fVU6+NYxRJ2yqQEjZS2iDrHcCdH0jgv9Y6F5NM3a mgKGCJ+gBbOpCGCcUD45XfZvDf13cfd1L88K+UarmbBeDje6Qz4Z9tLa3WFUkaMwmdKD 1KuQ4XaopKVKdEdFuClB9KJ6TgyEZperdt8FkTjzNow/mFWUyFd6pBsn3WxDMYQJFaux 8ANYNqBfyQWg5SKnIieGJTGDGw4P1dbSQAiNQZMQH2TvMYDOZc2vo/e2KhfpCU5LEz/3 G02A== 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 w8-v6si7799088pgo.316.2018.05.25.14.34.26; Fri, 25 May 2018 14:34:41 -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 S1030424AbeEYVeC (ORCPT + 99 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(-) 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(); } } -- 2.9.0