[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230626064157.973984-1-guodongtai@kylinos.cn>
Date: Mon, 26 Jun 2023 14:41:56 +0800
From: George Guo <guodongtai@...inos.cn>
To: jesse.brandeburg@...el.com,
anthony.l.nguyen@...el.com,
davem@...emloft.net,
edumazet@...gle.com,
kuba@...nel.org,
pabeni@...hat.com,
netdev@...r.kernel.org
Subject: [PATCH] e1000e: Remove unnecessary local variable bufsz
here bufsz is not necessary, use adapter->rx_buffer_len is better.
Signed-off-by: George Guo <guodongtai@...inos.cn>
---
drivers/net/ethernet/intel/e1000e/netdev.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index bd7ef59b1f2e..c2b547aed79d 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -653,7 +653,6 @@ static void e1000_alloc_rx_buffers(struct e1000_ring *rx_ring,
struct e1000_buffer *buffer_info;
struct sk_buff *skb;
unsigned int i;
- unsigned int bufsz = adapter->rx_buffer_len;
i = rx_ring->next_to_use;
buffer_info = &rx_ring->buffer_info[i];
@@ -665,7 +664,7 @@ static void e1000_alloc_rx_buffers(struct e1000_ring *rx_ring,
goto map_skb;
}
- skb = __netdev_alloc_skb_ip_align(netdev, bufsz, gfp);
+ skb = __netdev_alloc_skb_ip_align(netdev, adapter->rx_buffer_len, gfp);
if (!skb) {
/* Better luck next round */
adapter->alloc_rx_buff_failed++;
--
2.34.1
Powered by blists - more mailing lists