Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp1049950lqt; Fri, 7 Jun 2024 06:51:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU7Y918t/dePGwWcwlSQyxCnxRBwBXLqe0wfvbKWLphO1HS44Ew3aYMNzuOntbj84XVQ+xi7RM2CPiLW+YVOjGxtIvj4pIcDzR37NR6Jg== X-Google-Smtp-Source: AGHT+IFK/kjk7MzcHZzPK18YWFt6MaJ5EY3YvvwITgnRghCzv5awxkY+yMRnCwvftdbhqhikYfbN X-Received: by 2002:a05:6214:3b89:b0:6af:5262:7651 with SMTP id 6a1803df08f44-6b059cdd09dmr28751126d6.34.1717768275934; Fri, 07 Jun 2024 06:51:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717768275; cv=pass; d=google.com; s=arc-20160816; b=lX8teFXIRwdgFTshpPEkrHJUj1zg2CdSd57/9ANqtzf5oOxHFN/s4XQBqLZDWqWyAg knWu/GHiFDL99Zsl6xDv60WfRQx8FhgT1QaAm1D20SubptdBNi2m/BVglPjEwn9Ow9Us YFSNJgH74lnURJ9gpMHJKB89vLfMnP6Lzj2TN3xWOnkRDjkVuUIk36NAv55djuZRjiOX izXTz9u4TQ6cie8MRWeVReim7eYTMzZezQ1I3vzDu/UcCDvfOCOOjvDkljG/dPH8cOKj wRINphefe93T9oslGBuN5qp0mHqU1M1lef46KR0lAnFsP1UbcTu3CnQdShgpqPif8yCp E29A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=k9ILw3DW/LbfDC7ruUvOLnjFz5aQo28QFVXghAmH3qQ=; fh=GbEgdvZ6LsjoiPd/Tcc7olKV/xbmlke75IQ14rdQ+pQ=; b=gg8FOSVMh9X7R9bcu8KvUZJPWwXU1nIqjn7L/5tOTMAG0kz3SJqdtYymIQhqBMhTKL kRdnnZUP+RKg/OzlGzgLQQJVy3fgrpHvqPuI/D3EvgDMGrw7VmWxBB54l7pNze51njQZ rG1ZA7GzJhmRuuUpuXniUGxu3ToL/Zdn60UGyrYmCfEan1yVO0SOE+8yOWeMdSlf6J9u Y+M2VbrD2mQXCs/bnch0MSvbGWxZnR4Cszbz28RPoo1Q03HanGMHKtHUHUy+gopMrf8Q oxJR8L7l9clNjuM9+5lb6l6ZmVb7RWCQTAQ9K1wPoD24pYYfyMyoHSdYRT8MkTevHRf5 fUvQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=km+n87ht; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-206197-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206197-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6b04fa23d59si40156366d6.491.2024.06.07.06.51.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 06:51:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-206197-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=km+n87ht; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-206197-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206197-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id A502E1C20924 for ; Fri, 7 Jun 2024 13:51:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6D6081953B8; Fri, 7 Jun 2024 13:50:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="km+n87ht" Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2D58018732D; Fri, 7 Jun 2024 13:50:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717768256; cv=none; b=gJhHajpGZqz5REBK6qn9gU5I/zwmjKxVTS8NWWryHkiO/1FAb9zoTnXdHm3DONniSN/7pJlJTNjTFCCeRfiBqd7vX0z8Cej5thHHIKFWRVltdD0zrIxygGZ7TWRU/VRMRS0B1CP5nhekhvufPgPB9SFPGitYlObzixF8C+lJ/ho= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717768256; c=relaxed/simple; bh=K2yEhBrrJmzEMEJkO7h2wh02vSlcZThLBDjMqLRfL8k=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=lhR2bCtQHs8OORWHep7DqMapfH0du6Cbtrcv6JxQbMS8rblUjV5MTHgS36PYKWZK077Ef1p8nTSTOtUoPjomFN0SjLoWcDoZtwHwIvsjMyPnwRFx02GTNUpEAUp/D6OeSjPBTFuu4uEG6Z5JxzWzpYfXEgAV2h/1/34Q04dhoyY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=km+n87ht; arc=none smtp.client-ip=209.85.218.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f41.google.com with SMTP id a640c23a62f3a-a63359aaaa6so320636766b.2; Fri, 07 Jun 2024 06:50:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717768253; x=1718373053; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=k9ILw3DW/LbfDC7ruUvOLnjFz5aQo28QFVXghAmH3qQ=; b=km+n87htbd/s1nmzeYmEW0qXNCnE1dTmVueqlXUQ/aC5NaOEZLH09TGUN8jqB3NZcX Ho1NSGcBweFo5fN3jfZqVwzi+GJJI1WksRgQ+DJoPTqD8gnm/b29RAJBuXnaE+RmgY/m yg49w3aesFzcEAJFQh/ABvFca+pym1y2KejSC6WsStA3XcQfyDvkc1b23WePTKsYJp1r 13biQHCUW73UWfQzsSTKE4FpKCazHFRRCsPpRfckwGlc9r9abKDubvArUIu/G1b0c5zR buL9ENTjl4VYPH9V6/rlnuTHrkktQqKxbsXG//NEBs2/oL+gk4FmXYB++7XxZ8zgLQpO XeOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717768253; x=1718373053; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=k9ILw3DW/LbfDC7ruUvOLnjFz5aQo28QFVXghAmH3qQ=; b=BxUqun7GkmJ/6eH4/nuRgNn3GcZjVDjp4A7GgM0e1fw/ULBByvHTJqF0Sgu/O1IEVe ugIYdRPactjrzfEXhlvpvbQNtoRamq7RbC1m6KSB98WFRzKlp8cCaMWxcjqh0OhMCL8w Sug0khn4OduP1K0vazB2Kn/KMDORFLQ/XIy9Hma4gkj7n3ifAaYl3Ksbc9iFe4P+Vbxh k6/cNJ+q3btmOfAP5/2IqJv/F0csLOvi1Mh2/x+wtlPeNdzc3IHFa50HcYV5abXHUEff hoJ3ftEYR/K6DJ2xI0yEYYoAzOKsmKMmR+u1uagRPU/gFlc6YEt0Em1Aq3RK6nyaUAv9 UCvw== X-Forwarded-Encrypted: i=1; AJvYcCXyEVqmx+sH43LSPPnnbKqIzI8kkSs5w/z5PwBiJDjfkWo6B7NnHv3HciVTMSywLdle0ZRIKF8dYiwcEakFXLeql69sxcvrJypQn9PAuwOLlAx3J1yFQBXTAQ9KRF4RcoAY6Ur3e/DKqOBlEwbkkaqzIjFF12RFMgAFyCwP06mGog== X-Gm-Message-State: AOJu0YyVeguhwicGMvkPRarRCZ0rtXUYLkkVZ5LE5vX7wMC4czfuZN/V LihT5NE1Pt9zxOWb3urhayrZvc66W1gPoOniNg+4FJzUYBneaQhB X-Received: by 2002:a17:906:12c1:b0:a67:b440:e50f with SMTP id a640c23a62f3a-a6cdbcfa817mr178244666b.63.1717768253256; Fri, 07 Jun 2024 06:50:53 -0700 (PDT) Received: from skbuf ([188.25.55.166]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6c805c59a2sm248166166b.50.2024.06.07.06.50.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 06:50:46 -0700 (PDT) Date: Fri, 7 Jun 2024 16:50:41 +0300 From: Vladimir Oltean To: Martin Schiller 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() Message-ID: <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> 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 Content-Disposition: inline In-Reply-To: <07b91d4a519c698bb80c0f50a0d00067@dev.tdt.de> 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; }