Netdev List
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Ruoyu Wang <ruoyuw560@gmail.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	davem@davemloft.net, Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: pch_gbe: handle TX skb allocation failure
Date: Sat, 13 Jun 2026 09:41:07 +0200	[thread overview]
Message-ID: <6bf63337-9382-4dc3-8940-3cfea00c5193@redhat.com> (raw)
In-Reply-To: <20260608163005.6-1-ruoyuw560@gmail.com>

On 6/8/26 6:30 PM, Ruoyu Wang wrote:
> diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
> index 62f05f4569b10..a426243a5fa34 100644
> --- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
> +++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
> @@ -1420,13 +1420,23 @@ pch_gbe_alloc_rx_buffers_pool(struct pch_gbe_adapter *adapter,
>  	return 0;
>  }
>  
> +static void pch_gbe_free_rx_buffers_pool(struct pch_gbe_adapter *adapter,
> +					 struct pch_gbe_rx_ring *rx_ring)
> +{
> +	dma_free_coherent(&adapter->pdev->dev, rx_ring->rx_buff_pool_size,
> +			  rx_ring->rx_buff_pool, rx_ring->rx_buff_pool_logic);
> +	rx_ring->rx_buff_pool_logic = 0;
> +	rx_ring->rx_buff_pool_size = 0;
> +	rx_ring->rx_buff_pool = NULL;
> +}
> +
>  /**
>   * pch_gbe_alloc_tx_buffers - Allocate transmit buffers
>   * @adapter:   Board private structure
>   * @tx_ring:   Tx descriptor ring
>   */
> -static void pch_gbe_alloc_tx_buffers(struct pch_gbe_adapter *adapter,
> -					struct pch_gbe_tx_ring *tx_ring)
> +static int pch_gbe_alloc_tx_buffers(struct pch_gbe_adapter *adapter,
> +				    struct pch_gbe_tx_ring *tx_ring)

With this change you should update accordingly the kdoc above
documenting the return value, to avoid this warning:

Warning: drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c:1439 No
description found for return value of 'pch_gbe_alloc_tx_buffers'

/P


      reply	other threads:[~2026-06-13  7:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-08 16:30 [PATCH] net: pch_gbe: handle TX skb allocation failure Ruoyu Wang
2026-06-13  7:41 ` Paolo Abeni [this message]

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=6bf63337-9382-4dc3-8940-3cfea00c5193@redhat.com \
    --to=pabeni@redhat.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=ruoyuw560@gmail.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