Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp1046041lqt; Fri, 7 Jun 2024 06:44:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUKe+Go0kkHzRSOSTG5V3Rrza31o4OWPbWrnrNhJ/XujdAd91LM7Y1UAznTIBoWydg7YzDtXUb/B2rcvD/tjaXiXilOzPcAfY6spiSh3Q== X-Google-Smtp-Source: AGHT+IF2ShPTzUe42pJWxqobBdsYaGhUe+f3zc8kQljkgSu6FdsKvdEbl79eJrPIr9ZFJPfWhEyT X-Received: by 2002:a17:903:189:b0:1f6:3750:5258 with SMTP id d9443c01a7336-1f6d039d055mr26932575ad.43.1717767840726; Fri, 07 Jun 2024 06:44:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717767840; cv=pass; d=google.com; s=arc-20160816; b=y1SChGqZe2tbCh9TXdb0R4nrHRzfrZQUtpcMih1ljMUzeIOQiGwegyvti1JuzVm1e9 dmv6gQZ6xSzStYxO14CHle6f0XirKwrtLhY7p6zDoFN0RrhMmFTjlwjW3PQ7Z5CF4qT3 BHCGNJIWjC1wXO2HkR3vH+9ehkWPpMYsVsgoUAcn9AOP+UYurazHvpFPtoi8EIOii1Ek 3TfTKhIVP2j9QxdeDDIUoJVu762z6e3LR+ibpfCsgWgSY3gZ5NPvZ3AZnKamOW4OJ12O c9/5sea/xzV+1GpZ+5VEF45Y4UlHJxGB9J29tEBfoTTc6RxwL6CesHtnzZfSultcIyRP b1Pg== 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=yNjYwdBDRYr/LJFtoxR/PJsQNGuLiRozQ3ADxtFWGHc=; fh=tZs145GEaRpRPd94tXd2oOgS8dsYTYmNF2MdEJfhwBc=; b=IRGWdGyUa4t4nxAhKJW3AYNRD/vnNNYUQa5asFxrltX/VMdqMFmRggkdz6Fh1ksIB0 G9U1Mkfi55mel2rYv/WLNjJ+mC0pHl+z5ucND+ziWW9lr8dtUjqnheYTFLUKHcZcAerX COeMAasczznArxbJhVCTgUpNlUnLCgt6eHF0QFljbzE4LlwoeodomX2BxcDlF8/6iCh0 4kszKIXuYWFsRb98fhlqHkfd/yZkIwMCsBMJ2h6P0CCj2tfMjZAkE+z6ElrBmFTGoFBs 3pLojqQ9ncQQZci9L9b6DFe6MCr6Hc/KiBEVUH6EKOpXgeY/g121ZBSHgqE81z1iU4F2 L2dA==; 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-206174-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206174-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f6bd7f3b5esi30610475ad.478.2024.06.07.06.44.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 06:44:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-206174-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::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-206174-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206174-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 4B99628E444 for ; Fri, 7 Jun 2024 13:38:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E374A196DA5; Fri, 7 Jun 2024 13:34:19 +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 C40601946AB; Fri, 7 Jun 2024 13:34:17 +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=1717767259; cv=none; b=hgU7bWYCTYHbkrpsEjk+2CZvCrOwphemYV64UcpZ7wS8i85nFy0QBIPPXorLm/i1WXzmFHw0VxoPMZuRan5RNx2VDPqndymW7eJMM1ZoOBLZON/tQrfouFyT6ncv9GWnR0sqwUXS8QdTVVcgB9EnEfKqXXgLN/WQ5hXaijZLF2Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717767259; c=relaxed/simple; bh=6p1R3jgBWGcBkfv4pBjSAmPrqdO5jpX7UsZJf+Dnvo8=; h=MIME-Version:Content-Type:Date:From:To:Cc:Subject:In-Reply-To: References:Message-ID; b=KglRpPehAiKDWkXBOBupnF7eUPG4H/VFB/uS8tIYFsadPTGZpXcmtEoITSypwxkq86uafxg+Gc4Yhsi34IfUDmzRw9v2SlX3UGkPNozAfAfp1dHnCmt6E3t3hPH5X07OaAtNiozrHQBVHalrilrdBpT2EzbXhe77LxOFNruSgus= 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 1sFZjT-005xhe-JY; Fri, 07 Jun 2024 15:34:15 +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 1sFZjT-00ENF4-2Z; Fri, 07 Jun 2024 15:34:15 +0200 Received: from securemail.tdt.de (localhost [127.0.0.1]) by securemail.tdt.de (Postfix) with ESMTP id BE735240053; Fri, 7 Jun 2024 15:34:14 +0200 (CEST) Received: from mail.dev.tdt.de (unknown [10.2.4.42]) by securemail.tdt.de (Postfix) with ESMTP id 53F0F240050; Fri, 7 Jun 2024 15:34:14 +0200 (CEST) Received: from mail.dev.tdt.de (localhost [IPv6:::1]) by mail.dev.tdt.de (Postfix) with ESMTP id 09FE238490; Fri, 7 Jun 2024 15:34:14 +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:34:13 +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: <20240607112710.gbqyhnwisnjfnxrl@skbuf> References: <20240606085234.565551-1-ms@dev.tdt.de> <20240606085234.565551-11-ms@dev.tdt.de> <20240607112710.gbqyhnwisnjfnxrl@skbuf> Message-ID: <07b91d4a519c698bb80c0f50a0d00067@dev.tdt.de> X-Sender: ms@dev.tdt.de User-Agent: Roundcube Webmail/1.3.17 X-purgate: clean X-purgate-ID: 151534::1717767255-36936522-0A96A253/0/0 X-purgate-type: clean On 2024-06-07 13:27, Vladimir Oltean wrote: > On Thu, Jun 06, 2024 at 10:52:31AM +0200, Martin Schiller wrote: >> From: Martin Blumenstingl >> >> The error message is printed when the port cannot be used. Update the >> error message to reflect that. >> >> Signed-off-by: Martin Blumenstingl >> >> --- >> drivers/net/dsa/lantiq_gswip.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/net/dsa/lantiq_gswip.c >> b/drivers/net/dsa/lantiq_gswip.c >> index d2195271ffe9..3c96a62b8e0a 100644 >> --- a/drivers/net/dsa/lantiq_gswip.c >> +++ b/drivers/net/dsa/lantiq_gswip.c >> @@ -658,7 +658,8 @@ static int gswip_add_single_port_br(struct >> gswip_priv *priv, int port, bool add) >> int err; >> >> if (port >= max_ports || dsa_is_cpu_port(priv->ds, port)) { >> - dev_err(priv->dev, "single port for %i supported\n", port); >> + dev_err(priv->dev, "single port for %i is not supported\n", >> + port); >> return -EIO; >> } >> >> -- >> 2.39.2 >> > > 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.