Skip to content

Switch to container_of_const() in macros

Sakari Ailus linux-media 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3media: v4l2-subdev: Make media_entity_to_v4l2_subdev() const-awareinclude/media/v4l2-subdev.h+1 -10 replies
2/3media: v4l2-dev: Make macros to obtain containers const-awareinclude/media/v4l2-dev.h+3 -30 replies
3/3media: mc: Make macros to obtain containers const-awareinclude/media/media-entity.h+5 -50 replies
3/3media: v4l2-dev: Make macros to obtain containers const-awareinclude/media/media-entity.h+5 -51 reply

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/3] Switch to container_of_const() in macros

Hi all,

This set switches to container_of_const(), in order to add constness check for the users of macros obtaining a container struct of a struct field.

The good thing was that these patches didn't add any warnings but the added checks will also prevent the issues from happening in the future, too.

Sakari Ailus (3):
media: v4l2-subdev: Make media_entity_to_v4l2_subdev() const-aware
media: v4l2-dev: Make macros to obtain containers const-aware
media: mc: Make macros to obtain containers const-aware

 include/media/media-entity.h | 10 +++++-----
 include/media/v4l2-dev.h     |  6 +++---
 include/media/v4l2-subdev.h  |  2 +-
 3 files changed, 9 insertions(+), 9 deletions(-)
Signature · 1 line
2.47.3