mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Einon <mark.einon@gmail.com>
To: Yuesong Li <liyuesong@vivo.com>,
	davem@davemloft.net, edumazet@google.com,  kuba@kernel.org,
	pabeni@redhat.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	 opensource.kernel@vivo.com
Subject: Re: [PATCH v1] driver:net:et131x:Remove NULL check of list_entry()
Date: Thu, 22 Aug 2024 12:03:59 +0100	[thread overview]
Message-ID: <612c5209c635c3cb1fe3c6472fb2b0561d03c0fe.camel@gmail.com> (raw)
In-Reply-To: <20240822030535.1214176-1-liyuesong@vivo.com>

On Thu, 2024-08-22 at 11:05 +0800, Yuesong Li wrote:
> list_entry() will never return a NULL pointer, thus remove the
> check.
> 
> Signed-off-by: Yuesong Li <liyuesong@vivo.com>

Reviewed-by: Mark Einon <mark.einon@gmail.com>

Thanks,

Mark

> ---
>  drivers/net/ethernet/agere/et131x.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/drivers/net/ethernet/agere/et131x.c
> b/drivers/net/ethernet/agere/et131x.c
> index b325e0cef120..74fc55b9f0d9 100644
> --- a/drivers/net/ethernet/agere/et131x.c
> +++ b/drivers/net/ethernet/agere/et131x.c
> @@ -2244,11 +2244,6 @@ static struct rfd *nic_rx_pkts(struct
> et131x_adapter *adapter)
>  	element = rx_local->recv_list.next;
>  	rfd = list_entry(element, struct rfd, list_node);
>  
> -	if (!rfd) {
> -		spin_unlock_irqrestore(&adapter->rcv_lock, flags);
> -		return NULL;
> -	}
> -
>  	list_del(&rfd->list_node);
>  	rx_local->num_ready_recv--;
>  


  reply	other threads:[~2024-08-22 11:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-22  3:05 Yuesong Li
2024-08-22 11:03 ` Mark Einon [this message]
2024-08-22 12:07 ` Simon Horman

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=612c5209c635c3cb1fe3c6472fb2b0561d03c0fe.camel@gmail.com \
    --to=mark.einon@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liyuesong@vivo.com \
    --cc=netdev@vger.kernel.org \
    --cc=opensource.kernel@vivo.com \
    --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

all inboxes | Powered by JetHome®