Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3566276ybl; Mon, 12 Aug 2019 02:40:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqz2lm4JWCmfAdNnFZWWC8nnw7pl9IYa7m1QW0+c35jJbTD5ZhMuLFc5mN1l09KCaEQM5nDW X-Received: by 2002:a65:4b89:: with SMTP id t9mr28940754pgq.55.1565602851977; Mon, 12 Aug 2019 02:40:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565602851; cv=none; d=google.com; s=arc-20160816; b=mnO9VkRcU59YzU34R5gYpsZbs60mILy7sQW5Cp8YfXwjN3RJlExyG3Y8n26GUs4wP9 0dqYMBGWYh4eAcy3vxcDV4liT4qq7zBMVQ5kdrpnqGxkVy576f954jBGTkLQhpuAEPFm OvYfw1kfP1Sk8U5XBV8jP1mLpUK0qL3rD8yZVW4a0L0JFt3Zu19UtECe++dDx2HMWrn0 SpsqLq9Ne5mSeZvYuHcDpeOTT/fttdG++0E4WggmZMmIACatEgbiaejcrUXZ+Ub7yLtn fH3mUwh01vTgVtGbu/S1CinVHnUtC8OMWpIYRSSxpR1Zqx+RRTw3+Zt/tUhcqPsV6zIx OCmQ== 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=7HD5VurEzSUFoz5UfKZVwLPiTgPDH7BhkcFI9oQkihY=; b=qNMHN2DvqHRF/CHZNbXWBC1ZMSIqiDQUa47WD4ntuaOSd3Z13fR1dt3NeOMBawWGeE lA7KhOZ86JwN0JFpTfcgRZ77kQhmiVmrm4tJUKqNiIRJbVXZ3IfnIuyug3+Vvd0r4SHU bq/g3mqdR6WNKdfy+iGeQe8AZENSL7/v6aYuhzKJ/mJxN8ljLrSZDf+pgxafHwdLXq7t idGYSspNbh1G+Chu3LAh6k3QDVBz4Q0TBTz8rAas6l6lIsAyRbRONxvT4Nkob9bxsvWm LeeJSO8cng+nqJwvCYy8YFl9TFCuZBUfPY/xEI7wLx+gNXd/X+kRr70ZRZnXlXO5WnQ7 wAOQ== 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 w2si32393090pgs.463.2019.08.12.02.40.36; Mon, 12 Aug 2019 02:40:51 -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 S1727562AbfHLJjx (ORCPT + 99 others); Mon, 12 Aug 2019 05:39:53 -0400 Received: from inva021.nxp.com ([92.121.34.21]:57608 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727480AbfHLJjg (ORCPT ); Mon, 12 Aug 2019 05:39:36 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 40026200638; Mon, 12 Aug 2019 11:39:35 +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 33794200112; Mon, 12 Aug 2019 11:39:35 +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 DD67A205ED; Mon, 12 Aug 2019 11:39:34 +0200 (CEST) From: Ioana Ciornei To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Cc: andrew@lunn.ch, ruxandra.radulescu@nxp.com, Ioana Ciornei Subject: [PATCH 07/10] staging: fsl-dpaa2/ethsw: remove redundant VLAN check Date: Mon, 12 Aug 2019 12:39:15 +0300 Message-Id: <1565602758-14434-8-git-send-email-ioana.ciornei@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1565602758-14434-1-git-send-email-ioana.ciornei@nxp.com> References: <1565602758-14434-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. Signed-off-by: Ioana Ciornei --- 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