Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1116947pxu; Wed, 2 Dec 2020 11:26:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJyGa31+t/S3hz8IvxsB0w3GqZh5ZBukPPWpiIbXGr0JdSQqObA4+ir0Qo5mZz0+f2and+vI X-Received: by 2002:a50:bf4a:: with SMTP id g10mr1465131edk.288.1606937201060; Wed, 02 Dec 2020 11:26:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606937201; cv=none; d=google.com; s=arc-20160816; b=T828YemIHncb1gznmLsKu8Sz7vADdtvJsotqdgQVJsfg2f5R+M6jW/bCg3pc8uWn0d PxdtJkAohGdYNtbM7sPTo/ReklVb8NtrRGUBh1n/4/yAigU8mMQV7fPvZGyM2lz68W5p MEANIPk/3o3L2Iox3mxg94JxaIZ8St4L/SbEa1bvDzI0ummkFLGWtdazJdLqWTUmaLuJ 69HPhuRitW5mHVzpN6AbHABGyNbuUgcm0fqg6F6wvjyF6TY0YpkF1DV1Luda43VcZOCk T4RkewG+B6CCWmMZxYcdGwFgdYGO2HSX+/kS8O1NwAaBIUuShROmWoJWGmzfgzLbYQN/ muOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:dkim-signature :date; bh=c64OyaNyQFY4/BUYuJU+iCqUTTtbiI0reV43F1qYPqg=; b=Dd9pTIVKw+jBC9+oEFSzp0uUkClY7BwjgFm2dlrPiCVXksVsE3f0HIXFqYd+HI8r2E AXKu6JcXj5mCkbQCfYqhUcCy4eUrslBlDA6M2jUGMDBzWkjJGX24KVLtXPDDrmaTB+/2 jL6Wi54xLEs3fE6WWd0Cgv3Y4D8mi3m5Z6zHaAU3vtylZUQxBxkaIYsJV+nfQ4qlPTlM eIGFmThtBCf/ORofXFPB3xvdVuUFEhQUhSjOLTyOK0e5882qZHCZv4uUX/yusHeGwWW+ ghlfFkNZht1U1pGR8JDaLM8MZe8/EDJfjSW+DeWt/SsufxT9/d/x0WTaQzyfv0qMkQDE nwyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BE7f4bre; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p13si536836edy.540.2020.12.02.11.26.17; Wed, 02 Dec 2020 11:26:41 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=BE7f4bre; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731085AbgLBTXj (ORCPT + 99 others); Wed, 2 Dec 2020 14:23:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:51674 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726663AbgLBTXj (ORCPT ); Wed, 2 Dec 2020 14:23:39 -0500 Date: Wed, 2 Dec 2020 11:22:56 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1606936978; bh=eE4wkwdnCkkKc5Q/e8KLbvCiySlz0HmT79nBF/ov03o=; h=From:To:Cc:Subject:In-Reply-To:References:From; b=BE7f4breaEQLDOj/BX8e54YZqVid5/salXCQ7rDaI7Z7pOtFRpSoqaFsyjCGlPCGA UzcVvA62XzrngV6IFdKaJ4+Ik/mUjV64OTKyb//4NuEbaXk5MqBQIeICGkeh4RHP6b 5tD9UjpqnAQZUXcsKbObo9S8qVpuDX8KQ3J2Qdr9Nms0fsx/wUSfOEdQISWbuPzuDo xlxgMroU5qD+uBaRLyH4IYxE7fe3ev//F97ekgpQAxdvUn7CJqIt458t16TipBbuvJ 5Z7zxbZvGc97MzHkkAfSKzU5gbnA7YYTGPcIGfWCDkE3rijH0f5q1cBpaLpNW35vf4 VWVbN5L0aGaAQ== From: Jakub Kicinski To: Jarod Wilson Cc: LKML , Ivan Vecera , Jay Vosburgh , Veaceslav Falico , Andy Gospodarek , "David S. Miller" , Thomas Davis , Netdev Subject: Re: [PATCH net v2] bonding: fix feature flag setting at init time Message-ID: <20201202112256.59a97b9c@kicinski-fedora-pc1c0hjn.DHCP.thefacebook.com> In-Reply-To: References: <20201123031716.6179-1-jarod@redhat.com> <20201202173053.13800-1-jarod@redhat.com> <20201202095320.7768b5b3@kicinski-fedora-pc1c0hjn.DHCP.thefacebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2 Dec 2020 14:03:53 -0500 Jarod Wilson wrote: > On Wed, Dec 2, 2020 at 12:53 PM Jakub Kicinski wrote: > > > > On Wed, 2 Dec 2020 12:30:53 -0500 Jarod Wilson wrote: > > > + if (bond->dev->reg_state != NETREG_REGISTERED) > > > + goto noreg; > > > + > > > if (newval->value == BOND_MODE_ACTIVEBACKUP) > > > bond->dev->wanted_features |= BOND_XFRM_FEATURES; > > > else > > > bond->dev->wanted_features &= ~BOND_XFRM_FEATURES; > > > - netdev_change_features(bond->dev); > > > + netdev_update_features(bond->dev); > > > +noreg: > > > > Why the goto? > > Seemed cleaner to prevent an extra level of indentation of the code > following the goto and before the label, but I'm not that attached to > it if it's not wanted for coding style reasons. Yes, please don't use gotos where a normal if statement is sufficient. If you must avoid the indentation move the code to a helper. Also - this patch did not apply to net, please make sure you're developing on the correct base.