mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 0/3] net: use vmalloc_array() to simplify code
@ 2025-08-16  9:06 Qianfeng Rong
  2025-08-16  9:06 ` [PATCH v3 1/3] eth: intel: " Qianfeng Rong
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Qianfeng Rong @ 2025-08-16  9:06 UTC (permalink / raw)
  To: Tony Nguyen, Przemek Kitszel, Andrew Lunn, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Simon Horman,
	Alexei Starovoitov, Daniel Borkmann, Jesper Dangaard Brouer,
	John Fastabend, Stanislav Fomichev, Qianfeng Rong,
	moderated list:INTEL ETHERNET DRIVERS,
	open list:NETWORKING DRIVERS, open list,
	open list:NETRONOME ETHERNET DRIVERS,
	open list:XDP (eXpress Data Path):Keyword:(?:b|_)xdp(?:b|_)

Remove array_size() calls and replace vmalloc() with vmalloc_array() to
simplify the code and maintain consistency with existing kmalloc_array()
usage.

vmalloc_array() is also optimized better, resulting in less instructions
being used [1].

[1]: https://lore.kernel.org/lkml/abc66ec5-85a4-47e1-9759-2f60ab111971@vivo.com/

Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
---
v2: Submit wireless patches separately and modified the commit message
    and subject prefix.
v3: Fix -Wcalloc-transposed-args warning in nfp_flower_metadata_init()
    by correcting argument order in vmalloc_array() calls (swap count
    and sizeof arguments).
---
Qianfeng Rong (3):
  eth: intel: use vmalloc_array() to simplify code
  nfp: flower: use vmalloc_array() to simplify code
  ppp: use vmalloc_array() to simplify code

 drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c     | 2 +-
 drivers/net/ethernet/intel/igb/igb_ethtool.c         | 8 ++++----
 drivers/net/ethernet/intel/igc/igc_ethtool.c         | 8 ++++----
 drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c     | 2 +-
 drivers/net/ethernet/intel/ixgbevf/ethtool.c         | 6 +++---
 drivers/net/ethernet/netronome/nfp/flower/metadata.c | 4 ++--
 drivers/net/ppp/bsd_comp.c                           | 4 ++--
 7 files changed, 17 insertions(+), 17 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-08-19  1:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-16  9:06 [PATCH v3 0/3] net: use vmalloc_array() to simplify code Qianfeng Rong
2025-08-16  9:06 ` [PATCH v3 1/3] eth: intel: " Qianfeng Rong
2025-08-16  9:06 ` [PATCH v3 2/3] nfp: flower: " Qianfeng Rong
2025-08-16  9:06 ` [PATCH v3 3/3] ppp: " Qianfeng Rong
2025-08-19  1:00 ` [PATCH v3 0/3] net: " patchwork-bot+netdevbpf

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®