Thread (3 messages) 3 messages, 2 authors, 1d ago
WARM1d

[PATCH net-next] ixgbevf: use vmalloc_array() replace vmalloc()

From: Lei Zhu <hidden>
Date: 2026-06-12 06:58:39
Subsystem: intel ethernet drivers, networking drivers, the rest · Maintainers: Tony Nguyen, Przemek Kitszel, Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

From: Lei Zhu <redacted>

Replace vmalloc() with the equivalent and more readable
vmallc_array(). This change has no functional impact.

Signed-off-by: Lei Zhu <redacted>
---
 drivers/net/ethernet/intel/ixgbevf/ethtool.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbevf/ethtool.c b/drivers/net/ethernet/intel/ixgbevf/ethtool.c
index 537a60d5276f..72bdac8c0075 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ethtool.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ethtool.c
@@ -322,8 +322,9 @@ static int ixgbevf_set_ringparam(struct net_device *netdev,
 	}
 
 	if (new_rx_count != adapter->rx_ring_count) {
-		rx_ring = vmalloc(array_size(sizeof(*rx_ring),
-					     adapter->num_rx_queues));
+		rx_ring = vmalloc_array(adapter->num_rx_queues,
+					sizeof(*rx_ring));
+
 		if (!rx_ring) {
 			err = -ENOMEM;
 			goto clear_reset;
-- 
2.25.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help