Received: by 2002:ab2:69cc:0:b0:1fd:c486:4f03 with SMTP id n12csp365201lqp; Tue, 11 Jun 2024 06:59:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVdD7eVV446C3ZkZGhP+tHowXHUOjcRM1YeD7iGfzT4WayBhDsOVv2n9T+9h4wjPYibhKX+kH3wAFLzjB/z/NP4Uxk4WVolPM5X9YYJXA== X-Google-Smtp-Source: AGHT+IHsEoS/jP4Vf6t1L7zyuNmQNY0bWEmJfjyx3dHoERJy7Q2zJKU7Z7d1PX/cSs/duUsxvPJw X-Received: by 2002:a17:907:76d8:b0:a6d:fb80:cbb1 with SMTP id a640c23a62f3a-a6dfb80cc85mr716198466b.60.1718114342298; Tue, 11 Jun 2024 06:59:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718114342; cv=pass; d=google.com; s=arc-20160816; b=Tuiwhn+56s2mNseeQkkwFACKam5FnTjp4+f560PeFmCQHf8b3OmgBzCdXU3RLwr0AW D2gF8pJDp4iDCVrXv970jwQITYhio3oIMTF4uj36Webtl5TbxfIpgO8xV5x7vejDt49u eTPItxP7P6yxea1vENocBlH7Lwrjbxy/8QzbQqqcSYfVHGegEh0MomieBKO/xhsoCGYo XhjSi7fQLgw5u5aO7K0k+YQGQZM9k6WG8VPMQDPh7uwr+/LFcn70mNv7pBHkMfyF98yb FsgFydMc2IqphxlymlxNzD+wqcO2HTficLXclq4Wq6nx4JF+aNvP/XyUrTyk/hhSCeMb sZpA== 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=c5cm38mo7T+DeKockGRMS195d8Vgj/HV03AB/WiV/6TlZcE95gctL9VuW+3yBP33Q4 97U60tVp6YS5u569DsU12moxYlGUbZWvHk2e0bk/m3BeNncVo2B8OjmMk7rilWu4HGM7 h06I++xGOvaFrtN1NUK1h+RSRWSAYE/EcYFRK+0eT3fFjbIpsFwqXjuLdwMAmIgGimU3 WduAMvWdc3f+lPepXYkbwa4ujhwYvKLFr+qru94ySKPfLwJ9U2B5doI0QNgZhV0qYrvX l2KeRuLhGSpnCRQs2zq8XfFFpU1vYFcRfiJBYFo5/abXyvgRXVb56U7XDnj9ScqVFvdE 1YMg==; 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-210019-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210019-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a6f3821d6ecsi73511166b.857.2024.06.11.06.59.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 06:59:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-210019-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=dev.tdt.de); spf=pass (google.com: domain of linux-kernel+bounces-210019-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210019-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 3668D1F25AF3 for ; Tue, 11 Jun 2024 13:58:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2BC961802B1; Tue, 11 Jun 2024 13:56:06 +0000 (UTC) Received: from mxout70.expurgate.net (mxout70.expurgate.net [91.198.224.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 4A9C017DE30; Tue, 11 Jun 2024 13:56:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.198.224.70 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718114165; cv=none; b=rcwD6vdMNuNgEryhZl/pYfnPbtlOEJsBGb0LUd+GbVpYIptkucAaW/SNsMWZ7wWZ5s4cP/4FPS9EG2XSx4OMhHKVYr4KugsHON1DSGY/7GgnEao7pZchKXHgtWq+2UCxG3m2wjzN+PRWd/GcDfTfZqGf3UE2i9j2IGx2VqRJ7+o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718114165; c=relaxed/simple; bh=9onUpucCUdaQ47RVEas5qURWppBYcOplNxRVA5xCvz8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eXKEw/33n8zE4BhwLwp1oCvo7IStd0lGDOVIGb+0+21TZqZu8ohjaF3rDz9D8dHzu88J4mi0MvqrHmTJPgK0c4MTDBwqbHoCH9YPHVptv9eDAQlsJm4hn5cpiI2oWlaY9UpZB170i4r+hoWuuKIYj8bt87f/r3kWA4/dlqKz87k= 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=91.198.224.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 1sH1yk-009QBn-7k; Tue, 11 Jun 2024 15:56:02 +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 1sH1yj-0012HD-Lx; Tue, 11 Jun 2024 15:56:01 +0200 Received: from securemail.tdt.de (localhost [127.0.0.1]) by securemail.tdt.de (Postfix) with ESMTP id 5AD11240053; Tue, 11 Jun 2024 15:56:01 +0200 (CEST) Received: from mail.dev.tdt.de (unknown [10.2.4.42]) by securemail.tdt.de (Postfix) with ESMTP id E2E94240050; Tue, 11 Jun 2024 15:56:00 +0200 (CEST) Received: from mschiller1.dev.tdt.de (unknown [10.2.3.20]) by mail.dev.tdt.de (Postfix) with ESMTPSA id ACD39376FA; Tue, 11 Jun 2024 15:56:00 +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 v5 10/12] net: dsa: lantiq_gswip: Remove dead code from gswip_add_single_port_br() Date: Tue, 11 Jun 2024 15:54:32 +0200 Message-ID: <20240611135434.3180973-11-ms@dev.tdt.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240611135434.3180973-1-ms@dev.tdt.de> References: <20240611135434.3180973-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: clean X-purgate-ID: 151534::1718114162-00EF9E81-FDCB0C6A/0/0 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