Skip to content

UAPI: net/ethtool: Avoid thousands of -Wflex-array-member-not-at-end warnings

Gustavo A. R. Silva linux-hardening lkml netdev 2 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 9 repliesApplied 2/2
  2. v11 patch 6 repliesSuperseded

Changes in v2 from the cover letter

- Update changelog text in patch 2/2 to better reflect the changes made. (Jakub)
- Adjust variable declarations to follow the reverse xmas tree convention. (Jakub)

Patches in v2 All 2 applied

#Subject and filesSizeRepliesApplied
1/2UAPI: ethtool: Use __struct_group() in struct ethtool_link_settingsinclude/uapi/linux/ethtool.h+18 -159 repliesApplied
2/2net: ethtool: Avoid thousands of -Wflex-array-member-not-at-end warningsdrivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c +6 more+26 -220 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/2][next] UAPI: net/ethtool: Avoid thousands of -Wflex-array-member-not-at-end warnings

Small patch series aimed at fixing thousands of -Wflex-array-member-not-at-end warnings by creating a new tagged struct within a flexible structure. We then use this new struct type to fix problematic middle-flex-array declarations in multiple composite structs, as well as to update the type of some variables in various functions.

Changes in v2:
- Update changelog text in patch 2/2 to better reflect the changes made. (Jakub)
- Adjust variable declarations to follow the reverse xmas tree convention. (Jakub)

v1:
- Link: https://lore.kernel.org/linux-hardening/[email protected]

Gustavo A. R. Silva (2):
UAPI: ethtool: Use __struct_group() in struct ethtool_link_settings
net: ethtool: Avoid thousands of -Wflex-array-member-not-at-end
warnings

 .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c |  6 ++--
 .../ethernet/chelsio/cxgb4/cxgb4_ethtool.c    |  4 +--
 .../ethernet/chelsio/cxgb4vf/cxgb4vf_main.c   |  2 +-
 .../net/ethernet/cisco/enic/enic_ethtool.c    |  2 +-
 .../net/ethernet/qlogic/qede/qede_ethtool.c   |  4 +--
 include/linux/ethtool.h                       |  2 +-
 include/uapi/linux/ethtool.h                  | 33 ++++++++++---------
 net/ethtool/ioctl.c                           |  2 +-
 net/ethtool/linkinfo.c                        |  8 ++---
 net/ethtool/linkmodes.c                       | 18 ++++++----
 10 files changed, 44 insertions(+), 37 deletions(-)
Signature · 1 line
2.43.0