Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1231134ybi; Fri, 14 Jun 2019 10:50:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqysfLoetKrSAnWUGgejWedIO3BH+cMarte4yZvWdUNdvSw0grfFRArzvyRenFiJxhTaTYE/ X-Received: by 2002:a63:4185:: with SMTP id o127mr24768466pga.82.1560534602727; Fri, 14 Jun 2019 10:50:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560534602; cv=none; d=google.com; s=arc-20160816; b=DKXCjmOdhM7fVuOPCSB3RDAfeFgaKrQV4Kg/GcyQR/GlS+LRAt7HKOfaQRhkQvFsB8 eGoITKxQuemQu6pPiD41bBp3icerHyJlud5V1teyUujxvrbq4M8dpgUW5g6WXC4Ztr5e 4bFxXJK+NtNw6ZgK6uynU7dGuOcE1Bv08+DccO0PatZSWgXWKNzxL8A8jrnlJHMLVnd6 3yCmDUhyfRHML4/jGd0tPWYQ4trirN+R6SOZbOQAs6jhxQE9cVIH8UVKSqZuUYlqif/y 3M8Fsh0Hd5Cja8EyLeeLvuTjxp1u5gOBjseDg+n0atJI2oi1GNiCJqN+nADX49ER20f5 RkHg== 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=kWmxPayc+YnENrxC4+6/G0mrxeXGoOdzCLuhCGNpnB4=; b=Uj34DOUIEdnYODbfdt6qCiGBecAzLTIUAFov2bX1DNkuyTeglVhHPkIiZT2edscZas wDhMX2UtdMsi6U4FRm2k7FMdW9/widI7Z8c/BvEMom3cKGDmxX5WOf5gOeHVA53TkoPh zOovr71EUefbMXnVnXY+MMVgV3UpIzmR66ye7yiiqT2T4S7loo1FYd44+xOTU0mESjvY jSn98S6M6jNtItAnpXDfFfyN/UcVG/Pp0U+xLqGSYd3W0MGyRixFsgTe4MGkyuuR/ZhZ lOf9j0yrITetYAoZEERwbDuNTt1qR8qop8EVdCa2q4UmU+vMXdYDnaxyvT/cTw5CHkwV Fs8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="Kd/s2jGV"; 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 y6si3287198pgs.342.2019.06.14.10.49.48; Fri, 14 Jun 2019 10:50: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="Kd/s2jGV"; 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 S1726758AbfFNRtd (ORCPT + 99 others); Fri, 14 Jun 2019 13:49:33 -0400 Received: from mail-qt1-f195.google.com ([209.85.160.195]:36105 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726082AbfFNRtc (ORCPT ); Fri, 14 Jun 2019 13:49:32 -0400 Received: by mail-qt1-f195.google.com with SMTP id p15so3469791qtl.3; Fri, 14 Jun 2019 10:49:31 -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=kWmxPayc+YnENrxC4+6/G0mrxeXGoOdzCLuhCGNpnB4=; b=Kd/s2jGVdmnVLNfcOhHsrV2y/tcKOHfr/NsoriihRBpVzPMaJ/Qda9BLewQ9++0jOg xg1vOyoI/jW1FOPMLnLlnR3w3XGuMZzP+v0HNdJJzDAKhzEOwJrgtBKomqnDahD10/LK lN3Ou6hUo7Ht0xw/JwOqkoFv6yRs2pDT6vSkoj+f+zHp2icxyi0WSidfjZsKRGYJ9pjr A7iEoc4ft4RLCOJoXwWbvZGKLXU36i/yAvNJtOuqTiz9jjORUiWglcy7FYqqDvfT2XJQ SC4xqLuNAf73vTpuCCpxi6N0+Ai2KBfridI3MqckloDmwdRTx0vLM1TySW+vIJwZDNJp 5a4Q== 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=kWmxPayc+YnENrxC4+6/G0mrxeXGoOdzCLuhCGNpnB4=; b=fTa/IaU0RCgnjwWfYgk21f2cUhTA2N7bDz/7x7EjESTyCNwE+gAdQUaVY4wRjffOWo l3waprUvVuWwgTMwmRCJy+tuh/LLvsqLruImk2l8jl4a7Hv99UIHEXFAYeFVjE2nsi8h kKUKynA4NbenpXCWajH0SdOBlE2CH1ie2EDM662TEPOeXUoywzquNg/B6sFIyJCvWCg0 uXgz+y7HhBZy9L7e8OKIZAZ9dfz9qsnspoUEaTSspIbqhYXtf13o8+1AQx+C8UcQwFWh As9cmhG3e9uq9NeCDDA2oa6+lofGcZjc40CBffWj7QtdJaIH14ZhStnX2qEoJPllc4GA xRmQ== X-Gm-Message-State: APjAAAV2d6iavT4/SE00v+fxvnuN9UV1ZNDnF64WgGDX2ACUrYwqGkel djTvzEoo2ph5D5yG5ocWDuDjvHB3xz0= X-Received: by 2002:ac8:5485:: with SMTP id h5mr79526217qtq.253.1560534570806; Fri, 14 Jun 2019 10:49:30 -0700 (PDT) Received: from localhost (modemcable249.105-163-184.mc.videotron.ca. [184.163.105.249]) by smtp.gmail.com with ESMTPSA id t187sm1834028qkh.10.2019.06.14.10.49.29 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 14 Jun 2019 10:49:30 -0700 (PDT) From: Vivien Didelot To: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Vivien Didelot , "David S. Miller" , f.fainelli@gmail.com, andrew@lunn.ch Subject: [PATCH net-next v2 1/4] net: dsa: do not check orig_dev in vlan del Date: Fri, 14 Jun 2019 13:49:19 -0400 Message-Id: <20190614174922.2590-2-vivien.didelot@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190614174922.2590-1-vivien.didelot@gmail.com> References: <20190614174922.2590-1-vivien.didelot@gmail.com> 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 The current DSA code handling switchdev objects does not recurse into the lower devices thus is never called with an orig_dev member being a bridge device, hence remove this useless check. At the same time, remove the comments about the callers, which is unlikely to be updated if the code changes and thus will be confusing. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli --- net/dsa/port.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/net/dsa/port.c b/net/dsa/port.c index 585b6b9a9433..d2b65e8dc60c 100644 --- a/net/dsa/port.c +++ b/net/dsa/port.c @@ -336,9 +336,6 @@ int dsa_port_vlan_add(struct dsa_port *dp, .vlan = vlan, }; - /* Can be called from dsa_slave_port_obj_add() or - * dsa_slave_vlan_rx_add_vid() - */ if (!dp->bridge_dev || br_vlan_enabled(dp->bridge_dev)) return dsa_port_notify(dp, DSA_NOTIFIER_VLAN_ADD, &info); @@ -354,12 +351,6 @@ int dsa_port_vlan_del(struct dsa_port *dp, .vlan = vlan, }; - if (vlan->obj.orig_dev && netif_is_bridge_master(vlan->obj.orig_dev)) - return -EOPNOTSUPP; - - /* Can be called from dsa_slave_port_obj_del() or - * dsa_slave_vlan_rx_kill_vid() - */ if (!dp->bridge_dev || br_vlan_enabled(dp->bridge_dev)) return dsa_port_notify(dp, DSA_NOTIFIER_VLAN_DEL, &info); -- 2.21.0