Received: by 2002:ab2:784b:0:b0:1fd:adc2:8405 with SMTP id m11csp405490lqp; Mon, 10 Jun 2024 07:40:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWGZezkiNBIb8V78vE+PXHgR5V6Y3oPCiw/dPOwg1MuFZxAJWKnvHNIEyl/o5Ot4X0lO1/qf5+JO6Wl1qHElsi9BHwpWXB0aTiEEKPdGA== X-Google-Smtp-Source: AGHT+IEhEDDdj1mnDaAj1HD5wOOMpfyubfvcT+OQMl8hDpE1fmocUcfIsM+InBeDjiF/kp9GDoj2 X-Received: by 2002:a05:6a00:13a1:b0:704:2f65:4996 with SMTP id d2e1a72fcca58-7042f654d5emr5645513b3a.11.1718030444175; Mon, 10 Jun 2024 07:40:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718030444; cv=pass; d=google.com; s=arc-20160816; b=ggz1liXj96omaDiMc27L8rfnMCAnzG5PNKABmMXGslHB5zgdzHtPTUJlnRzJKKaH9y XGbwtag0Yh3HpytddAs3QzJVxcz+9CJL8hjjOZ2FVgohJQufB0MbS0CvhAem/2M8sD2t sPkrrbUFo/wfqkxX9qx3Br2wRyC0mImlIRvgXDn/gZx+zlvTB6CRePKFL90OMq8M+xe9 OxRck/Bvsd7xw/UqYd8fy1TpkclmRx9Ysl5LOEPhCvPylKh+eE4ntdPm6N4v9V56BQ51 AOieMqoGTvjEiXVH65N0MCTRG3JpzEKpwm5nJMsMYSgZPI+T+dUbTuehDpIV1zZk3SJb rfIA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=GSjXDJ8onxhQ4nynvSPhVLtOLDzIY57JlLOtYQof3sY=; fh=Lh+JMPZo65h8qJAnE5jHWvKtvWM25xS7kSTjy8t+qRE=; b=uTVS4d8OxbkssD9B02S2HE4X8a5YDzTIl7wIUeXaRy6gl9/+NWbmXfiKZtQzQIQwJY dfKVK1MukhofoQy8eoMC1woTFugeX+bDXvCeWJCUVJeF+s5tlivOpMxs344w0thmreZT 2p5r1RXO0XQ/ODwCbQ7vSntXxwiK2zhPzxifkThlsBQDQYbEEr/VlgERbKGMnLo7TOIp 3kTMA0AD3UcdO4/rN4tgINGNoLyXff8quytX6weoJBrrThEsbZ9hI/sYyeRwTLXtu0g7 UcJUquvTD92TL1zi5URYVxh7hXAIHFW04IpXXyQepnmDiCVSOVMkjfP0zGGBym0iAzj2 HwWg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=dev.tdt.de); spf=pass (google.com: domain of linux-kernel+bounces-208324-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208324-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6de261c9acbsi7699450a12.375.2024.06.10.07.40.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 07:40:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-208324-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=dev.tdt.de); spf=pass (google.com: domain of linux-kernel+bounces-208324-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208324-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 06635B282F1 for ; Mon, 10 Jun 2024 14:06:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AF70F14F109; Mon, 10 Jun 2024 14:03:26 +0000 (UTC) Received: from mxout70.expurgate.net (mxout70.expurgate.net [194.37.255.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DA586132108; Mon, 10 Jun 2024 14:03:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.37.255.70 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718028206; cv=none; b=O5s/Wd27oxa1S3gpWw2N8PW027/8MzfM4UIRL+eugozBHBOmXSyOpF5URWbWh/lU7r+Pi2euS1MtKRsuR90iTuZduAeMyUa7dk+5HckE0LsjpzrxGjBLqwOHFvSNye3rLQDAPo078CclifLCAYyaudtNbu36hXnPkImYfVIxmxk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718028206; c=relaxed/simple; bh=9onUpucCUdaQ47RVEas5qURWppBYcOplNxRVA5xCvz8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tHc3D1biH8nQbKLkK2MSHHlSNnkK5CKn8j9hp4EkrHuavGMT7tb9k2o0+MIjHIzAIE6FzOKqYCoz0vaKUKdqiWYgr5rR8STI/crjtqW4KGB6/QbjUNv5+etion0bbnAZLaB00/SPdW/VxVoHJunE6uX/ivgsyeIRoOQ5JOPjnT0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=dev.tdt.de; spf=pass smtp.mailfrom=dev.tdt.de; arc=none smtp.client-ip=194.37.255.70 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=dev.tdt.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=dev.tdt.de Received: from [127.0.0.1] (helo=localhost) by relay.expurgate.net with smtp (Exim 4.92) (envelope-from ) id 1sGfcI-00A3b7-TX; Mon, 10 Jun 2024 16:03:22 +0200 Received: from [195.243.126.94] (helo=securemail.tdt.de) by relay.expurgate.net with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sGfcI-00CSZ8-CE; Mon, 10 Jun 2024 16:03:22 +0200 Received: from securemail.tdt.de (localhost [127.0.0.1]) by securemail.tdt.de (Postfix) with ESMTP id 1E6B5240053; Mon, 10 Jun 2024 16:03:22 +0200 (CEST) Received: from mail.dev.tdt.de (unknown [10.2.4.42]) by securemail.tdt.de (Postfix) with ESMTP id A97B1240050; Mon, 10 Jun 2024 16:03:21 +0200 (CEST) Received: from mschiller1.dev.tdt.de (unknown [10.2.3.20]) by mail.dev.tdt.de (Postfix) with ESMTPSA id 5A9BD36F2E; Mon, 10 Jun 2024 16:03:21 +0200 (CEST) From: Martin Schiller To: martin.blumenstingl@googlemail.com, hauke@hauke-m.de, andrew@lunn.ch, f.fainelli@gmail.com, olteanv@gmail.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ms@dev.tdt.de Subject: [PATCH net-next v3 10/12] net: dsa: lantiq_gswip: Remove dead code from gswip_add_single_port_br() Date: Mon, 10 Jun 2024 16:02:17 +0200 Message-ID: <20240610140219.2795167-11-ms@dev.tdt.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240610140219.2795167-1-ms@dev.tdt.de> References: <20240610140219.2795167-1-ms@dev.tdt.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-purgate-type: clean X-purgate-ID: 151534::1718028202-36936522-CE61F4A9/0/0 X-purgate: clean The port validation in gswip_add_single_port_br() is superfluous and can be omitted. Suggested-by: Vladimir Oltean Signed-off-by: Martin Schiller --- drivers/net/dsa/lantiq_gswip.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/net/dsa/lantiq_gswip.c b/drivers/net/dsa/lantiq_gswi= p.c index cd88b00cfdc1..2bbc7dd45418 100644 --- a/drivers/net/dsa/lantiq_gswip.c +++ b/drivers/net/dsa/lantiq_gswip.c @@ -655,14 +655,8 @@ static int gswip_add_single_port_br(struct gswip_pri= v *priv, int port, bool add) struct gswip_pce_table_entry vlan_active =3D {0,}; struct gswip_pce_table_entry vlan_mapping =3D {0,}; unsigned int cpu_port =3D priv->hw_info->cpu_port; - unsigned int max_ports =3D priv->hw_info->max_ports; int err; =20 - if (port >=3D max_ports) { - dev_err(priv->dev, "single port for %i supported\n", port); - return -EIO; - } - vlan_active.index =3D port + 1; vlan_active.table =3D GSWIP_TABLE_ACTIVE_VLAN; vlan_active.key[0] =3D 0; /* vid */ --=20 2.39.2