Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp751511ybl; Tue, 13 Aug 2019 01:58:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqzzqXj2tQk7OWRz+weK3uwMXZ11x2s9l8aknryX1XebHjkS1cXBvfiV0q6bzT/rqVWyKsvo X-Received: by 2002:a17:902:654f:: with SMTP id d15mr34262957pln.253.1565686693520; Tue, 13 Aug 2019 01:58:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565686693; cv=none; d=google.com; s=arc-20160816; b=EU12AYCE9hgIaS8IlXzFrgS7SyDvwv2lQVtOxnXThKKmuA8znlj3iZbFjcE0yHaRuT x7vg9NXWqtQs/ei5nKHsr8L5g2/FN3uvCB5NR9odibaeUCHLoKkms9whpU8xEkWL5XsJ WM7Truv9gbfeGbaqK1LXekXUOJ3a6r9j9fFoJk+QyW4pDriCOszup+1P9v+xsbMBcx8G LW+JWNf+2P5KMNXki6ivPjLrak+cVmFkSiV4ett7/xd2BfIxJtR7O9r6+Rn7fmcq4+J6 AUTZlXu67VKGfer67oAE5dtI717RD2jtWX8t6M32On7HUH3L/nU7uWDQvnGgHDqw2YwA gpGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:reply-to:references:in-reply-to :message-id:date:subject:cc:to:from; bh=KLKZRpJv/PtjVVG7XSzWUWAIhDD0hE/pYku/2In/3JA=; b=wRtO8a5/65kjBUXJQR5KdoYuHDpU1kZfZbnxi+fGbUzXaXHWqnfTPhiKDPMZNSQEGa 7CvKyUN4iv9Q8FZlcSosGZ7GB6t1Au0uG8BWOgckv+2hCpFNRoVBbSA2eBhVw4wDOmAW NASrRPE0LgaKc5V3v5Pgw+bwAcl5aQBU8OWHQ0u2/Ay+qbwNv9yaNqf+yAWCn3G2byi7 Rehe3CLCgft/UkDy42DBnEIFqi9Sar1Ub8k8enINX5zLbeluYFzEx/VSRuzdaw5e3Vpi UqnlJvdeqt4IjCLbLStAMZzA6s6NBp3Ua+MoBYpDAQB5MPzuRyyMMb5WEm2LTErihQEY xF9g== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id go12si56746534plb.251.2019.08.13.01.57.57; Tue, 13 Aug 2019 01:58:13 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728294AbfHMIzN (ORCPT + 99 others); Tue, 13 Aug 2019 04:55:13 -0400 Received: from inva021.nxp.com ([92.121.34.21]:41610 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728284AbfHMIyy (ORCPT ); Tue, 13 Aug 2019 04:54:54 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 2B55020077B; Tue, 13 Aug 2019 10:54:53 +0200 (CEST) Received: from inva024.eu-rdc02.nxp.com (inva024.eu-rdc02.nxp.com [134.27.226.22]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 1F330200769; Tue, 13 Aug 2019 10:54:53 +0200 (CEST) Received: from fsr-ub1464-137.ea.freescale.net (fsr-ub1464-137.ea.freescale.net [10.171.82.114]) by inva024.eu-rdc02.nxp.com (Postfix) with ESMTP id C01C72060E; Tue, 13 Aug 2019 10:54:52 +0200 (CEST) From: Ioana Ciornei To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Cc: joe@perches.com, andrew@lunn.ch, ruxandra.radulescu@nxp.com, Ioana Ciornei Subject: [PATCH v2 07/10] staging: fsl-dpaa2/ethsw: remove redundant VLAN check Date: Tue, 13 Aug 2019 11:54:36 +0300 Message-Id: <1565686479-32577-8-git-send-email-ioana.ciornei@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1565686479-32577-1-git-send-email-ioana.ciornei@nxp.com> References: <1565686479-32577-1-git-send-email-ioana.ciornei@nxp.com> Reply-to: ioana.ciornei@nxp.com X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The ethsw_add_vlan() function is already called only when the VLAN is not yet configured on the switch. Remove the redundant check. Reported-by: Andrew Lunn Signed-off-by: Ioana Ciornei --- Changes in v2: - added Reported-by tag drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c index 20519af4d804..b69b2b7be972 100644 --- a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c +++ b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c @@ -34,11 +34,6 @@ static int ethsw_add_vlan(struct ethsw_core *ethsw, u16 vid) .fdb_id = 0, }; - if (ethsw->vlans[vid]) { - dev_err(ethsw->dev, "VLAN already configured\n"); - return -EEXIST; - } - err = dpsw_vlan_add(ethsw->mc_io, 0, ethsw->dpsw_handle, vid, &vcfg); if (err) { -- 1.9.1