netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Horatiu Vultur <horatiu.vultur@microchip.com>
Cc: <andrew@lunn.ch>, <hkallweit1@gmail.com>, <linux@armlinux.org.uk>,
	<davem@davemloft.net>, <edumazet@google.com>, <pabeni@redhat.com>,
	<richardcochran@gmail.com>, <vadim.fedorenko@linux.dev>,
	<vladimir.oltean@nxp.com>, <viro@zeniv.linux.org.uk>,
	<quentin.schulz@bootlin.com>, <atenart@kernel.org>,
	<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net v3] phy: mscc: Stop taking ts_lock for tx_queue and use its own lock
Date: Wed, 3 Sep 2025 17:05:58 -0700	[thread overview]
Message-ID: <20250903170558.73054e68@kernel.org> (raw)
In-Reply-To: <20250902121259.3257536-1-horatiu.vultur@microchip.com>

On Tue, 2 Sep 2025 14:12:59 +0200 Horatiu Vultur wrote:
> -	len = skb_queue_len(&ptp->tx_queue);
> +	len = skb_queue_len_lockless(&ptp->tx_queue);
>  	if (len < 1)
>  		return;
>  
>  	while (len--) {
> -		skb = __skb_dequeue(&ptp->tx_queue);
> +		skb = skb_dequeue(&ptp->tx_queue);
>  		if (!skb)
>  			return;

Isn't checking len completely unnecessary? skb_dequeue() will return
null if the list is empty, which you are already handling.
-- 
pw-bot: cr

  reply	other threads:[~2025-09-04  0:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-02 12:12 [PATCH net v3] phy: mscc: Stop taking ts_lock for tx_queue and use its own lock Horatiu Vultur
2025-09-04  0:05 ` Jakub Kicinski [this message]
2025-09-04  7:55   ` Horatiu Vultur
2025-09-04 15:00 ` patchwork-bot+netdevbpf

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=20250903170558.73054e68@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=atenart@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=horatiu.vultur@microchip.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=quentin.schulz@bootlin.com \
    --cc=richardcochran@gmail.com \
    --cc=vadim.fedorenko@linux.dev \
    --cc=viro@zeniv.linux.org.uk \
    --cc=vladimir.oltean@nxp.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;
as well as URLs for NNTP newsgroup(s).