Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp1101497lqt; Fri, 7 Jun 2024 08:04:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXOS5jvqwrhtPA8KVC7fTo3yUIdmesE7VnU8Ca8yfmkPEGqScUSf71r2A6Gq2irLrDlFLbyBKJIrDnZ/YGDrUfTENdSrgD9LCd2dX8HzQ== X-Google-Smtp-Source: AGHT+IGQq3u/pyh01GCud1jw4Q5+JYHGu92XPsNlURdzaoxtz+Jb8p3SSTjjPGBmGp8nHCyNJOCd X-Received: by 2002:a05:6a20:258a:b0:1af:dc40:bb34 with SMTP id adf61e73a8af0-1b2f97f6ecbmr3545626637.18.1717772670041; Fri, 07 Jun 2024 08:04:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717772670; cv=pass; d=google.com; s=arc-20160816; b=O28y7SkM/g8kzwpYIqAlKiJkHYp0R9mE+oAZaphA0Ce1byyudmt1u/wZJ7bgTNoXQR JdVy+aD+yBnMjDvbQLI/A3hMgQm7MfXNe2B7aqy9HdvOJNufrk2GbOrAalCDXl9y9LSl H/AUSsTO5AFrliBDbuSGjvnuEE9733QSlSRD+BdJV6U5SLmvhAuNiBbFNAYL9j7egOTn sYr4AD+OijTl7mkk/njWa9j+yOYvCXv3Dde9RQuBemBszTa0EO1whtR01CW7KCkl4u13 QyIDC3rRz4jYOAA9HHn9dnmftHvkhW5oVdzYwKkItiRf2G+cJ7Oi/DVNic2vGdM0UiUR x60Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:message-id:references:in-reply-to:organization:subject :cc:to:from:date:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence; bh=RwyKvrCE0cyILNLAYgzqAMupRP3NHHlwBddYMePklVI=; fh=tZs145GEaRpRPd94tXd2oOgS8dsYTYmNF2MdEJfhwBc=; b=P3396rTeM9PeYJwJvyG4aWePAVY8iBkQ1m5HtfI+ghQYCjnaCSREQWgGC0uIFYXpq7 1aVl+ACIrAUi7EZTKL7kNkGnKuy3RLueTOAaMyizgPPtyBK0rNSkDRGV+QTr1T2IV9GT 2amBBiaiY0zN32AEp3sxSXc5AB/lWx0n52lESFlQPFAk5N2SL1UktEEJYl9n09wbSQoQ CHPY3inKrsTGKxdIGROPxWgwWJo4abl4hYZzePwTAdg9KU0wYrN05bO/KmCrSlqEa9Dr TjXRSojElrlzeZUMAlbz71zbmHYTD8FOcO0g81TXZ52JmyeN10eG/epvUeInPqQ8xnXd HZhA==; 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-206202-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206202-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-6de294fbd90si2498593a12.722.2024.06.07.08.04.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 08:04:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-206202-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-206202-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206202-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 0C45AB268F9 for ; Fri, 7 Jun 2024 13:54:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9CF45195808; Fri, 7 Jun 2024 13:54:03 +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 BFFB919149E; Fri, 7 Jun 2024 13:54:01 +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=1717768443; cv=none; b=g/8KXIGOf1zD9Vz7P12raeCST7PS9VLJgYlid9bwxOJdpHUyduLgdBbI1SSQ0wgPTIB4cQA0x0eCWqa3Ze02FsI4HzzJu7UKep/HAfvZjrwNgdoZx9v8RNWUfmZJiKkmudg5h3/YNEhFhcvFXTrqPvPUlaBBfHUZIrQTZ34NI7Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717768443; c=relaxed/simple; bh=91otkUgIB0mhSgUT3Jf/hB6FYPgNDeYftqYvwzJmFRc=; h=MIME-Version:Content-Type:Date:From:To:Cc:Subject:In-Reply-To: References:Message-ID; b=X3EfSKlOWSdPZ7XG85NOMaGgLRcUSGkigfkdbl962OvUvYJdYY6+IYeTT5AO6vCHCa61tAH4qTQ02QMCVx0uwr1FMQi4sR8hQieDhmh+qQHLJrQ1hyRJk9iki1prM6UJ6F0AOumVaNM4K7RFEEfDM07SV0UdoB4JU9wtXj1keA8= 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 1sFa2Z-0065jU-HH; Fri, 07 Jun 2024 15:53:59 +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 1sFa2Z-008CvR-0N; Fri, 07 Jun 2024 15:53:59 +0200 Received: from securemail.tdt.de (localhost [127.0.0.1]) by securemail.tdt.de (Postfix) with ESMTP id B1C8C240053; Fri, 7 Jun 2024 15:53:58 +0200 (CEST) Received: from mail.dev.tdt.de (unknown [10.2.4.42]) by securemail.tdt.de (Postfix) with ESMTP id 44326240050; Fri, 7 Jun 2024 15:53:58 +0200 (CEST) Received: from mail.dev.tdt.de (localhost [IPv6:::1]) by mail.dev.tdt.de (Postfix) with ESMTP id 0AA0C2092B; Fri, 7 Jun 2024 15:53:58 +0200 (CEST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 07 Jun 2024 15:53:58 +0200 From: Martin Schiller To: Vladimir Oltean Cc: martin.blumenstingl@googlemail.com, hauke@hauke-m.de, andrew@lunn.ch, f.fainelli@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, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next 10/13] net: dsa: lantiq_gswip: Fix error message in gswip_add_single_port_br() Organization: TDT AG In-Reply-To: <20240607135041.4lo36yeybwa2tkue@skbuf> References: <20240606085234.565551-1-ms@dev.tdt.de> <20240606085234.565551-11-ms@dev.tdt.de> <20240607112710.gbqyhnwisnjfnxrl@skbuf> <07b91d4a519c698bb80c0f50a0d00067@dev.tdt.de> <20240607135041.4lo36yeybwa2tkue@skbuf> Message-ID: X-Sender: ms@dev.tdt.de User-Agent: Roundcube Webmail/1.3.17 X-purgate-ID: 151534::1717768439-1FCDB522-0293E6EC/0/0 X-purgate-type: clean X-purgate: clean On 2024-06-07 15:50, Vladimir Oltean wrote: > On Fri, Jun 07, 2024 at 03:34:13PM +0200, Martin Schiller wrote: >> On 2024-06-07 13:27, Vladimir Oltean wrote: >> > Isn't even the original condition (port >= max_ports) dead code? Why not >> > remove the condition altogether? >> >> I also agree here if we can be sure, that .port_enable, >> .port_bridge_join and >> .port_bridge_leave are only called for "valid" (<= max_ports) ports. > > dsa_switch_parse_ports_of() has: > > if (reg >= ds->num_ports) { > dev_err(ds->dev, "port %pOF index %u exceeds num_ports (%u)\n", > port, reg, ds->num_ports); > of_node_put(port); > err = -EINVAL; > goto out_put_node; > } OK, so I will remove this check altogether.