Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp245246rdh; Thu, 23 Nov 2023 02:56:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IEf9vGpSDPJmyJHdv5NI9s5OCLdG0jZhxz/LQ0U7zaz6ujhCdycfUNXM2mhO+szbTQruXf7 X-Received: by 2002:a05:6a20:9e4d:b0:187:b14f:a2a with SMTP id mt13-20020a056a209e4d00b00187b14f0a2amr5480834pzb.20.1700737006970; Thu, 23 Nov 2023 02:56:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700737006; cv=none; d=google.com; s=arc-20160816; b=FHoNHYeXYlXq6yzMUxj+6p1aUKkQkp75oTU+pNk/vuXTAJJ1HaUFdWtspvQUsMOhVU 5x/YoEwrYPJIRDObktnJVoaSjy5gNJ/PjkW+0xvSZYTau7Up4jxg7615C7YeL3cQRz/x B6wuabGqDdfaNrBBFVamsjRS9zvZJyvrnRgPj+5XK2h60cD/22ZPLov3KXrUC1qd10n4 T3lTadxpiTc1xKZ+93ewW1ynzb705CUmwvXlZJHAymO1qFBONVDnGN8tpSXpCs018YWE hmQqrxH3hsZO7LGs+W6nWTBuyQEePhr3ZitZg6kIYBDcuRv2ep9GYIrrGqZW4zS7BNUb KczA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=CjFVbEkEc3cCGzg7BPQSnbWJhLULm7Z08rp1xpQQ9kM=; fh=ZR+l6kp+tHorDNZ/hMkipXJfjq48aiHOgn04PG5Xuig=; b=o9ghea+Plw4p6FsPxJto4i89LJSGemjNAVRUUcrQj2d9j75RaSsi+X+MknHXFG4pRE WQ2U8bXY4D3Dez7B3uI7ycegKMFKZQSmyPLH5lBoA/9UyMWfTlHPrsVjh4xxBMlLeUw1 XzfbxPc966k0F6bB76ez26/yIZlMbbl9/cF80ygEzAJUOSRCoGzD+9ootUh2y8rzu8gf t4fyCEy0jyzMLcCI0Y/4jGgMPMjzAP6bw/K8DMS3MG7neiOjhf7ixenCJkiQbAT12a0L gY8qao9FMiShqWs6Qw4jE4oF7oRFs00Ika1538jKDW8THLiO06iExuxRsutP8F8n7yZp 8kuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BzgYlMpD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id v64-20020a632f43000000b00557531eafb0si1060874pgv.559.2023.11.23.02.56.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 02:56:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BzgYlMpD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id BE958813EA8C; Thu, 23 Nov 2023 02:55:13 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344880AbjKWKy7 (ORCPT + 99 others); Thu, 23 Nov 2023 05:54:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344883AbjKWKy5 (ORCPT ); Thu, 23 Nov 2023 05:54:57 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6E10D5A for ; Thu, 23 Nov 2023 02:55:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700736902; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CjFVbEkEc3cCGzg7BPQSnbWJhLULm7Z08rp1xpQQ9kM=; b=BzgYlMpDFpQGO21gavQAk5K/VqyC9q7VXuy93LF/2fqu9B+nvDVdPWvycy4yzTwZlnxot4 mIlhshgFYF+5VRH6kjETozw5zR8zw5Ct46KbQ5UbEWHbxm5PjhtW+Z8Bw0q+J2b/EwGPhH 3lAf2u6emLkEbmcqDaDP1yh/JTSdjw0= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-589-OctS9rEFMUy6J3p1M42inA-1; Thu, 23 Nov 2023 05:55:00 -0500 X-MC-Unique: OctS9rEFMUy6J3p1M42inA-1 Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-a02225ee165so14184666b.1 for ; Thu, 23 Nov 2023 02:55:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700736899; x=1701341699; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=CjFVbEkEc3cCGzg7BPQSnbWJhLULm7Z08rp1xpQQ9kM=; b=Z4A70HVKAmEMoRGrHGV5EQxL6uq/wNFidmowsi4FqqU78eb42+TTjCSKl1Avw2nHb4 AcyhCCzvP4Gam0o83JKRVuDwxrh7FU2men7hd8P6Nb5Ukp7pGbd8/GFiV+mLaBar0Ssw xlVL9BJX9NcN6Ec8dP1P076COfoiTRZ0BvqqimRnRDaK27An7n+PoQWR6v3l008PcZcZ B5zPf+kUuQ+9F+SeSgZAs5Vj9GsK/OSEWcAWMIAIpJpoh6E5rlPZSgLDSE+vOjGoRpds I4daaDALy2OSCOEa9H+a/TLYf8RiN9DSorhrpuRtBziGSXR8uY9yzvtcTWxO/IRp0ONU ezOw== X-Gm-Message-State: AOJu0Yy8/I+Jq37XgkhPG2d5Gr/6pZgIT7AnAWw2wQXbruO62oZmNAWr PDzl/USG6SQQhs1a6lvNvn7uuzEupTnJpEs7/oQp3R1PlZm+M/AVk5KnXZyen9pIYuUYA/l0jwr mf44mF6uKk38VK3kJwmfRHXol X-Received: by 2002:a05:6402:2903:b0:546:efd8:7f05 with SMTP id ee3-20020a056402290300b00546efd87f05mr3451049edb.1.1700736899221; Thu, 23 Nov 2023 02:54:59 -0800 (PST) X-Received: by 2002:a05:6402:2903:b0:546:efd8:7f05 with SMTP id ee3-20020a056402290300b00546efd87f05mr3451020edb.1.1700736898906; Thu, 23 Nov 2023 02:54:58 -0800 (PST) Received: from gerbillo.redhat.com (146-241-241-213.dyn.eolo.it. [146.241.241.213]) by smtp.gmail.com with ESMTPSA id f18-20020a05640214d200b005486228190dsm514274edx.42.2023.11.23.02.54.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 02:54:58 -0800 (PST) Message-ID: Subject: Re: [PATCH net-next v1 2/3] net: dsa: microchip: Remove redundant optimization in ksz8_w_phy_bmcr From: Paolo Abeni To: Oleksij Rempel , "David S. Miller" , Andrew Lunn , Eric Dumazet , Florian Fainelli , Jakub Kicinski , Vladimir Oltean , Woojung Huh , Arun Ramadoss Cc: kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, UNGLinuxDriver@microchip.com Date: Thu, 23 Nov 2023 11:54:57 +0100 In-Reply-To: <20231121152426.4188456-2-o.rempel@pengutronix.de> References: <20231121152426.4188456-1-o.rempel@pengutronix.de> <20231121152426.4188456-2-o.rempel@pengutronix.de> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 (3.46.4-1.fc37) MIME-Version: 1.0 X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE,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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 23 Nov 2023 02:55:13 -0800 (PST) On Tue, 2023-11-21 at 16:24 +0100, Oleksij Rempel wrote: > Remove the manual checks for register value changes in the > ksz8_w_phy_bmcr function. Instead, rely on regmap_update_bits() for > optimizing register updates. >=20 > Signed-off-by: Oleksij Rempel > --- > drivers/net/dsa/microchip/ksz8795.c | 95 +++++++++-------------------- > 1 file changed, 28 insertions(+), 67 deletions(-) >=20 > diff --git a/drivers/net/dsa/microchip/ksz8795.c b/drivers/net/dsa/microc= hip/ksz8795.c > index 835157815937..4c1e21fd87da 100644 > --- a/drivers/net/dsa/microchip/ksz8795.c > +++ b/drivers/net/dsa/microchip/ksz8795.c > @@ -951,107 +951,68 @@ static int ksz8_w_phy_ctrl(struct ksz_device *dev,= int port, u16 val) > static int ksz8_w_phy_bmcr(struct ksz_device *dev, int port, u16 val) > { > const u16 *regs =3D dev->info->regs; > - u8 restart, ctrl, speed, data; > + u8 restart, speed, ctrl, restart_mask; Very minor nit and only if you have to repost for some other reason, please respect the reverse x-mas tree above. Thanks, Paolo