Re: [PATCH v2] perf/x86/amd/uncore: Use kcalloc*() instead of kzalloc*()

2024-03-31 Thread Erick Archer
Hi Ingo, On Sat, Mar 30, 2024 at 10:11:23PM +0100, Ingo Molnar wrote: > > * Erick Archer wrote: > > > As noted in the "Deprecated Interfaces, Language Features, Attributes, > > and Conventions" documentation [1], size calculations (especially > > multiplication) should not be performed in memor

[PATCH] RDMA/mana_ib: Add flex array to struct mana_cfg_rx_steer_req_v2

2024-03-31 Thread Erick Archer
The "struct mana_cfg_rx_steer_req_v2" uses a dynamically sized set of trailing elements. Specifically, it uses a "mana_handle_t" array. So, use the preferred way in the kernel declaring a flexible array [1]. Also, avoid the open-coded arithmetic in the memory allocator functions [2] using the "str

Re: [PATCH] RDMA/mana_ib: Add flex array to struct mana_cfg_rx_steer_req_v2

2024-03-31 Thread Gustavo A. R. Silva
On 31/03/24 09:04, Erick Archer wrote: The "struct mana_cfg_rx_steer_req_v2" uses a dynamically sized set of trailing elements. Specifically, it uses a "mana_handle_t" array. So, use the preferred way in the kernel declaring a flexible array [1]. Also, avoid the open-coded arithmetic in the m

Re: [PATCH v4][next] net/smc: Avoid -Wflex-array-member-not-at-end warnings

2024-03-31 Thread Wen Gu
On 2024/3/29 05:52, Gustavo A. R. Silva wrote: -Wflex-array-member-not-at-end is coming in GCC-14, and we are getting ready to enable it globally. There are currently a couple of objects in `struct smc_clc_msg_proposal_area` that contain a couple of flexible structures: struct smc_clc_msg_pr