Skip to content

ARRAY_SIZE fixups

Michael S. Tsirkin qemu-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 18 repliesIn review
  2. v24 patches 19 repliesSuperseded
  3. v14 patches 2 repliesSuperseded

Changes in v3 from the cover letter

- dropped the merged virtio patch
- whitespace changes
- rewrote BUG_ON macros from an array to a struct for portability

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4compiler: drop ; after BUILD_BUG_ONinclude/qemu/compiler.h+2 -11 reply
2/4compiler: rework BUG_ON using a structinclude/qemu/compiler.h+6 -310 replies
3/4compiler: expression version of QEMU_BUILD_BUG_ONinclude/qemu/compiler.h+3 -01 reply
4/4ARRAY_SIZE: check that argument is an arrayinclude/qemu/osdep.h+8 -15 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchMarkus ArmbrusterEric Blake
SeriesR-b
1/4R-b
2/4R-b
3/4R-b
4/4R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [Qemu-devel] [PATCH v3 0/4] ARRAY_SIZE fixups

Turns out virtio kept using ARRAY_SIZE on fields which stopped being arrays, this was noticed by a coverity scan.
I fixed this up, this patchset fixes up the ARRAY_SIZE macro so that this bug does not reappear in any other place.

changes from v2:
- dropped the merged virtio patch
- whitespace changes
- rewrote BUG_ON macros from an array to a struct for portability

Michael S. Tsirkin (4):
compiler: drop ; after BUILD_BUG_ON
compiler: rework BUG_ON using a struct
compiler: expression version of QEMU_BUILD_BUG_ON
ARRAY_SIZE: check that argument is an array

 include/qemu/compiler.h | 11 +++++++++--
 include/qemu/osdep.h    |  9 ++++++++-
 2 files changed, 17 insertions(+), 3 deletions(-)
Signature · 1 line
MST