public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: Jerry Ray <jerry.ray@microchip.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
	Florian Fainelli <f.fainelli@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	jbe@pengutronix.de, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux@armlinux.org.uk
Subject: Re: [PATCH net-next v5 4/6] dsa: lan9303: Performance Optimization
Date: Mon, 12 Dec 2022 20:43:05 +0200	[thread overview]
Message-ID: <20221212184305.nlp54j3pnmau53n5@skbuf> (raw)
In-Reply-To: <20221209224713.19980-5-jerry.ray@microchip.com>

Similar comment as for "Whitespace Only" patch. There could be a million
different changes in contents for this driver which could all be summarized
as "Performance Optimization". Please use your common sense, and also
consider people who might be looking through the git log for this driver
and see what is worth backporting. This is a clickbait commit message
with disappointing contents. Find a more appropriate and descriptive
summary for it.

On Fri, Dec 09, 2022 at 04:47:11PM -0600, Jerry Ray wrote:
> As the regmap_write() is over a slow bus that will sleep, we can speed up
> the boot-up time a bit my not bothering to clear a bit that is already
> clear.
> 
> Signed-off-by: Jerry Ray <jerry.ray@microchip.com>
> ---
>  drivers/net/dsa/lan9303-core.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net/dsa/lan9303-core.c
> index b0f49d9c3d0c..694249aa1f19 100644
> --- a/drivers/net/dsa/lan9303-core.c
> +++ b/drivers/net/dsa/lan9303-core.c
> @@ -891,8 +891,11 @@ static int lan9303_check_device(struct lan9303 *chip)
>  	if (ret)
>  		return (ret);
>  
> -	reg &= ~LAN9303_VIRT_SPECIAL_TURBO;
> -	regmap_write(chip->regmap, LAN9303_VIRT_SPECIAL_CTRL, reg);
> +	/* Clear the TURBO Mode bit if it was set. */
> +	if (reg & LAN9303_VIRT_SPECIAL_TURBO) {
> +		reg &= ~LAN9303_VIRT_SPECIAL_TURBO;
> +		regmap_write(chip->regmap, LAN9303_VIRT_SPECIAL_CTRL, reg);
> +	}
>  
>  	return 0;
>  }
> -- 
> 2.17.1
> 

  reply	other threads:[~2022-12-12 18:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-09 22:47 [PATCH net-next v5 0/6] dsa: lan9303: Move to PHYLINK Jerry Ray
2022-12-09 22:47 ` [PATCH net-next v5 1/6] dsa: lan9303: align dsa_switch_ops members Jerry Ray
2022-12-09 22:47 ` [PATCH net-next v5 2/6] dsa: lan9303: move Turbo Mode bit initialization Jerry Ray
2022-12-10  4:13   ` Jakub Kicinski
2022-12-09 22:47 ` [PATCH net-next v5 3/6] dsa: lan9303: Add exception logic for read failure Jerry Ray
2022-12-09 22:47 ` [PATCH net-next v5 4/6] dsa: lan9303: Performance Optimization Jerry Ray
2022-12-12 18:43   ` Vladimir Oltean [this message]
2022-12-09 22:47 ` [PATCH net-next v5 5/6] dsa: lan9303: Determine CPU port based on dsa_switch ptr Jerry Ray
2022-12-11 22:46   ` Vladimir Oltean
2022-12-12 17:42     ` Jerry.Ray
2022-12-12 18:36       ` Vladimir Oltean
2022-12-09 22:47 ` [PATCH net-next v5 6/6] dsa: lan9303: Migrate to PHYLINK Jerry Ray

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221212184305.nlp54j3pnmau53n5@skbuf \
    --to=olteanv@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=jbe@pengutronix.de \
    --cc=jerry.ray@microchip.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox