diff options
author | Gustavo A. R. Silva <gustavoars@kernel.org> | 2024-08-08 16:07:54 -0600 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-08-12 18:41:42 -0700 |
commit | 0a3e6939d4b33d68bce89477b9db01d68b744749 (patch) | |
tree | c41c70cb9935ab920a3990f906b958f0a2f9b49e /drivers/net/ethernet/intel/ice/ice_debugfs.c | |
parent | 46dd90fe51f3556deaf5af47aafcee10536a3978 (diff) |
net/smc: Use static_assert() to check struct sizes
Commit 9748dbc9f265 ("net/smc: Avoid -Wflex-array-member-not-at-end
warnings") introduced tagged `struct smc_clc_v2_extension_fixed` and
`struct smc_clc_smcd_v2_extension_fixed`. We want to ensure that when
new members need to be added to the flexible structures, they are
always included within these tagged structs.
So, we use `static_assert()` to ensure that the memory layout for
both the flexible structure and the tagged struct is the same after
any changes.
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Reviewed-by: Jan Karcher <jaka@linux.ibm.com>
Link: https://patch.msgid.link/ZrVBuiqFHAORpFxE@cute
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_debugfs.c')
0 files changed, 0 insertions, 0 deletions