Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp981457ybl; Tue, 13 Aug 2019 05:44:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqyMHcAtmwwWR6zSlmHG4uu/9g9JxvGRqUKLIKlPuFVg9n8IH0MRMGMa4iMaMF0ffkszq7n0 X-Received: by 2002:a17:902:7781:: with SMTP id o1mr37308608pll.205.1565700297916; Tue, 13 Aug 2019 05:44:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565700297; cv=none; d=google.com; s=arc-20160816; b=07RxzYrbQbujEVhjz23n0nLxhL1e4+z4hDL+aTH5CA5jN8BAZ5adHPGmd+TMhxHl8N Ra62Rj5WAFe+09ncTuUAXHBBQnKf9Cw6W4EhLdegPdx3EzSSGB+JH2GNKo43O6yD/Gl8 98pMIEKXcOLiGCDjujs3W/wnTJbpEvbOlyF7pHhGd26TQE3RgCvw64tr83Lu9+BpFuT4 vDPD3xojpJkz3ygHKhAxlhaLPLMWDbkhGIfseqfCHDBCM8L02NzPwSIIOiNCEkUgY9PY RPbpkgrFLJlZOznhxlCjL23o8TBhlR0u25J7rSrVPWErF8IQ3jzDsjXLKL1rqJQbmfdF Jd/Q== 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=UGqSr+X2/wZv+ARoPQz5oSKJ69IKkyB0sIO4x0fCT7s=; b=QdI5/8zn14sJ+lAG+jTseM1y3yGuGOWdC8YYYyZ3UG3MZvOCaD0d5g5hXDIzkfevDk Mz6AC++J+PU+qxEAvLvBclmq3VR8ixwRPBLOSIr+n0SvcZx96nO/zE0GrkApt7pH+LOu ge2XH3/2M5AkP1LHEZlVRS3otjE6yr1QTUXszg40TdS5i3ZuZ5Ca5lI/PaXPln8cwjdV YR66CNnA1dQ/T/bzCYBuIPPAhL22uasd/dwaKZObHXKue23LA9BLeBuHE06Q9NU3YykL hfORSaIgPrB+EZ4X+VI9Ahx8DJxDXiszb7XFaOzh+q+oqtWl5/nlV2tFnsB8dGeb0KKA aPRA== 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 a1si868845pjs.58.2019.08.13.05.44.41; Tue, 13 Aug 2019 05:44:57 -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 S1728576AbfHMMng (ORCPT + 99 others); Tue, 13 Aug 2019 08:43:36 -0400 Received: from inva020.nxp.com ([92.121.34.13]:59880 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728436AbfHMMnQ (ORCPT ); Tue, 13 Aug 2019 08:43:16 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 798EF1A032C; Tue, 13 Aug 2019 14:43:14 +0200 (CEST) Received: from inva024.eu-rdc02.nxp.com (inva024.eu-rdc02.nxp.com [134.27.226.22]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 6D6F31A0132; Tue, 13 Aug 2019 14:43:14 +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 1AB072060E; Tue, 13 Aug 2019 14:43:14 +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 v3 07/10] staging: fsl-dpaa2/ethsw: remove redundant VLAN check Date: Tue, 13 Aug 2019 15:43:04 +0300 Message-Id: <1565700187-16048-8-git-send-email-ioana.ciornei@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1565700187-16048-1-git-send-email-ioana.ciornei@nxp.com> References: <1565700187-16048-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 Changes in v3: - none 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