Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2191130rwd; Fri, 26 May 2023 03:10:32 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6Lal4zX5yygFpRcjicIGkomb8xOj2nb3mJGJPJX9fMwxhEM3D10arzOnTh4dViN2nWwIv2 X-Received: by 2002:a17:90a:9a8e:b0:24e:1177:f467 with SMTP id e14-20020a17090a9a8e00b0024e1177f467mr1950051pjp.12.1685095831889; Fri, 26 May 2023 03:10:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685095831; cv=none; d=google.com; s=arc-20160816; b=0cUVEQd29PyLUghU908HFmmWRxNn7ExcMGWzSsJnYQVE9gw2T9tpgcgN1cTdMdaRxj 3Q6hEdrrmhGKE3V+glKYeW9n9PAxIRDogh8O4tW8e1vFPURoDiIqc2CgVA1AeGmHbfOn P79arsPaHV9mGbEY7moh+jO+R9izvf2IcoMIa4ECDDWrXziVmNeo+x3QayNaN0L2Uc2Z lOX8PoNCvZffu7MPKNyuFYJ9McSgKL0+ZX9fEph0DAC9QT+3KS58e8gsifEISIpTmzml OE3DPVrw6tx9+brPneYDvYVIECv1wpcLlX0KT4o9yy1gBsRbZUOJMLBBVlx6MdFqi1nu liyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Cf6s+pRtDPBWZvHwWYLt5G+cdZWXh4lFysYNJBncOIM=; b=FC0gG6UxJJTWA03Y8wLyiIn7iDHaNXXBXb2HhnsMmP5qF3g0FlWQti6lUeUVYdq7m5 AYhQ5fG68ZR4w4tXVezbEcHDBivnOG1PPeA5kzilxNByAN2iq/M+stJCWoBcopK6MqjY 6gFeymPKdEIPWPao9shVGlYAIwHuyF+bHk4yvz6PuufEZqMiCNmTjh5LDfMk+kac0ffh uNtzJ7T1EDyoFcwLaIktbgHE4LQGzYo057ug5BcHkYJIftNTAMc8zxmARkcWlz7c756w eMn/f/c9RehwQONBRmlsULilmpQ5SWbuLcHUogBaRZD2/gCm6LYpeKF9NvWCCVduTI/f 5kSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="EiWwmP/O"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id li10-20020a17090b48ca00b0025374850796si556549pjb.176.2023.05.26.03.10.17; Fri, 26 May 2023 03:10:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="EiWwmP/O"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236671AbjEZJzp (ORCPT + 99 others); Fri, 26 May 2023 05:55:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229833AbjEZJzo (ORCPT ); Fri, 26 May 2023 05:55:44 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A90F9E; Fri, 26 May 2023 02:55:41 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-96f683e8855so71116766b.2; Fri, 26 May 2023 02:55:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685094940; x=1687686940; 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=Cf6s+pRtDPBWZvHwWYLt5G+cdZWXh4lFysYNJBncOIM=; b=EiWwmP/O7rlmQZ7mEXSsgAAapMTg6qODs7Jwglc3YXEBfnsgbNnSdLVfcuulzzGUQ/ n2gilogO8U2iId0i5lYVx1Ll9wTvw/NfXMCKzLg+IcGWvhOtN5m8Pr7Y6QEg1tjG2C4V 3BJAepfumdkC0DSJZBKVi5ZD2VZ9s6YJ2poGdNgSImROCDzq2eCR1Us/KGn553oyUd5j 4YAvi4xZmEtQ9v1xOb12eU/gMDK5xGGDC7Sk5rB5pA28u7+hsSgmC5SVUIzy7ZTPdgaz DEkQxEz0zR+g31H/K6QWnh85gSvo5y5wyj5CdcgAPYBObtzOFGNB7HM/syGpQpTk7FAE w9gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685094940; x=1687686940; 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=Cf6s+pRtDPBWZvHwWYLt5G+cdZWXh4lFysYNJBncOIM=; b=LZ99ZIW7NMuCjrT2Fou8abxIxmlNxJAmapCs55iW4eJCv78m/dgCV7ZIcMN3rFgLAL asJPQxzCq+I14YiDAWQ+v4CnvhlFZ8Z4140GOmDuWJDKVT/alu55YsYvMipq8qBpN6JM /UGbAzuMY0WYixLIJh7SL4z/Xjlc31r3rXG/awarxNztwMn44HU+jbgHC7XJ59dcH7nL E8qnmzMsOaop3WRqxjPoqngKPNpiBRT0Z/3TXoU2hSGQbQtJlUT7ln3tfqU0N0ZNl51M 1cIgJnOmenZzvIh7lWydICcp3YhUtqT45hQO2HvtfPZ+wm7FhaTkLOfgFbSUZ5fufn/r 1tTw== X-Gm-Message-State: AC+VfDyl8+BdRcbWK+4Fhu4GZ/dqaWJ5c+zeXDSRAYD4spqiKP+qjvZg 9znMgv6zVAmsKgSoY7rfTBM= X-Received: by 2002:a17:907:9627:b0:95e:d3f5:3d47 with SMTP id gb39-20020a170907962700b0095ed3f53d47mr1736888ejc.48.1685094939864; Fri, 26 May 2023 02:55:39 -0700 (PDT) Received: from skbuf ([188.27.184.189]) by smtp.gmail.com with ESMTPSA id gz15-20020a170906f2cf00b00965ac8f8a3dsm1932065ejb.173.2023.05.26.02.55.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 May 2023 02:55:39 -0700 (PDT) Date: Fri, 26 May 2023 12:55:37 +0300 From: Vladimir Oltean To: Oleksij Rempel Cc: "David S. Miller" , Andrew Lunn , Eric Dumazet , Florian Fainelli , Jakub Kicinski , Paolo Abeni , Woojung Huh , Arun Ramadoss , kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, UNGLinuxDriver@microchip.com, "Russell King (Oracle)" Subject: Re: [PATCH net-next v2 3/5] net: dsa: microchip: remove ksz_port:on variable Message-ID: <20230526095537.yaa3dgn56rwioxcv@skbuf> References: <20230526073445.668430-1-o.rempel@pengutronix.de> <20230526073445.668430-1-o.rempel@pengutronix.de> <20230526073445.668430-4-o.rempel@pengutronix.de> <20230526073445.668430-4-o.rempel@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230526073445.668430-4-o.rempel@pengutronix.de> <20230526073445.668430-4-o.rempel@pengutronix.de> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 26, 2023 at 09:34:43AM +0200, Oleksij Rempel wrote: > The only place where this variable would be set to false is the > ksz8_config_cpu_port() function. But it is done in a bogus way: > > for (i = 0; i < dev->phy_port_cnt; i++) { > if (i == dev->phy_port_cnt) <--- will be never executed. > break; > p->on = 1; > > So, we never have a situation where p->on = 0. In this case, we can just > remove it. > > Signed-off-by: Oleksij Rempel > Reviewed-by: Andrew Lunn > --- Reviewed-by: Vladimir Oltean