Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3417716pxu; Mon, 19 Oct 2020 11:30:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUjli+no6lxbZvKVlRzWRt5EQoF8k8Cl7NDC5OAW7tAjVqQe7lHOCJ/6mK1uL7l4uEquS7 X-Received: by 2002:aa7:dc50:: with SMTP id g16mr1135284edu.95.1603132241138; Mon, 19 Oct 2020 11:30:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603132241; cv=none; d=google.com; s=arc-20160816; b=o+ONaRTYLpBjgosIx+u688mOK//lSKlgPf+wuRTCwhandN6Safps9KewSFTk+7z3Zp Okm4G7Kr4kwDXM4lGlhvMCHAZn+vy4dYwp8PYIkTlnxKpC6SNK5KaYjX+Wyim5fqXdYM 5vQvB0es2dV+jQNtrpDeZvJYMPcoOWFNb/FzyUaKPNslmEexFjpnI6lt6hQsbWuk4ieQ qKsCrpt5443LoHk7x9HZ7e+gqJ5EiYKUKE/WjEbEeSGWYIngDd0i3JBJeJ1OJCMRQiyb hcVd8cMp68rO50sATEded50nkb7YbD+P5NCjzS+ecDz7Gumcd98Uv9ZazAz0fuAZYLS7 yfyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=ZL5YDl6hNmbkB+VpLWE2qHhC7lZo4UK+RqjNiE2QNK4=; b=owuJXsIWBiPRwnqh9douoMmEyBG25DBNYPJNefwEQxEBbFJgO1rg5jY54pSV8z/EYx qtmuuQRGn8wxzOY2rfibGeIRICHVev9tHLef+Z0E1FFems23ImK61qsDorr0pFbs2fTW IRxF69EYNChbtf/hJlM4FOmHHXLsj3Zn/Y7k9CpDl/4qgB2zIPxaD79CuBT4ZQOjFk/d 1QOnXiGRwl/XFt4PZQNQ0IBGC3kYp40/Xk4cUz4qmJoYKh2EiSmcv8s+05mpE992TUoB YQz1ItfzVqENFMTqBBwjMX5KwblQqSexLQX+MhG1cqlT//GItt4zoFQgImKsfWFs4qrW ON3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EtoIW9Jh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id q26si505264ejb.579.2020.10.19.11.30.18; Mon, 19 Oct 2020 11:30:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EtoIW9Jh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1730783AbgJSS22 (ORCPT + 99 others); Mon, 19 Oct 2020 14:28:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729369AbgJSS21 (ORCPT ); Mon, 19 Oct 2020 14:28:27 -0400 Received: from mail-yb1-xb44.google.com (mail-yb1-xb44.google.com [IPv6:2607:f8b0:4864:20::b44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47A89C0613CE; Mon, 19 Oct 2020 11:28:26 -0700 (PDT) Received: by mail-yb1-xb44.google.com with SMTP id c3so426810ybl.0; Mon, 19 Oct 2020 11:28:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ZL5YDl6hNmbkB+VpLWE2qHhC7lZo4UK+RqjNiE2QNK4=; b=EtoIW9Jh2ojao1SiML3i0pk9oVO+o8TncTVzbAFpFbQtolDxYIvQZzSoPVGaYv6VXI 9iQplBLr9221apT92qhuI8c65N1y6mNzD866ckA66sfMVIZXshSe5bcvxG81x2vbPGfY +f6hHWLULw4axD0cw9Lh4s9iGZij7vR75YLAypDGmzzahnLHs+ZFGWhfJ3RqqQ0F+EAa 5Hb13YAFuEQzqlSt51DrWl+tj3CCvbP9MxFWj3iAKftCF9ssw313XfU2XymQd+32nfEV PhrGT5Lm/gXMLEJrMIWWlA4qVVYzpxEY3VT+wecLr3ZBFVLdi5z4O0C7PuACCacuBm3M G1uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ZL5YDl6hNmbkB+VpLWE2qHhC7lZo4UK+RqjNiE2QNK4=; b=aVNN03h+LE5rMl1dyjbMGV8R/pptlGvi+W8pIcWp/WTZWbRdyOlyg1YLN6Cwn2yYtF PRlubnGHE8B043G3Cj9PzoTzmpUP6iqm8FXmlC7sa0OinevZDjaI5Q34cJODl3bW50fx b+NPn1OxpEacJrDqK1k3ndmAzdtzaKH0vGFnlTArUs4w0xojTamDTXeyJKp8FUNs85Ys Z6bK653EXQckxZqISjvtgrkjBFP/ApP+uZnSLxOjsiSrjzOe6k09RH5ufOkPlrptIo7U ZinErnnYjpyVk0drFjnDMa90WGBGBQrtWCx9V0Qvc+nrdzTRPPMkt7nVeAoilTDoCyGD RDxA== X-Gm-Message-State: AOAM530CVD4LmxQZb36VkpWVSanz+VEb+0DcF2lWXeTGCYcuu/g+UCBl tVJPM/wkTPY36mU+PN4uR+AzkAD+xWspTTHLaMY= X-Received: by 2002:a25:cb10:: with SMTP id b16mr746460ybg.459.1603132105610; Mon, 19 Oct 2020 11:28:25 -0700 (PDT) MIME-Version: 1.0 References: <20201019173846.1021-1-trix@redhat.com> In-Reply-To: <20201019173846.1021-1-trix@redhat.com> From: Andrii Nakryiko Date: Mon, 19 Oct 2020 11:28:14 -0700 Message-ID: Subject: Re: [PATCH] bpf: remove unneeded break To: trix@redhat.com Cc: Alexei Starovoitov , Daniel Borkmann , Martin Lau , Song Liu , Yonghong Song , Andrii Nakryiko , john fastabend , KP Singh , Networking , bpf , open list Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 19, 2020 at 10:38 AM wrote: > > From: Tom Rix > > A break is not needed if it is preceded by a return > > Signed-off-by: Tom Rix > --- Probably refactoring left over, looks good: Acked-by: Andrii Nakryiko > kernel/bpf/syscall.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c > index 1110ecd7d1f3..8f50c9c19f1b 100644 > --- a/kernel/bpf/syscall.c > +++ b/kernel/bpf/syscall.c > @@ -2913,7 +2913,6 @@ attach_type_to_prog_type(enum bpf_attach_type attach_type) > case BPF_CGROUP_INET_INGRESS: > case BPF_CGROUP_INET_EGRESS: > return BPF_PROG_TYPE_CGROUP_SKB; > - break; > case BPF_CGROUP_INET_SOCK_CREATE: > case BPF_CGROUP_INET_SOCK_RELEASE: > case BPF_CGROUP_INET4_POST_BIND: > -- > 2.18.1 >