diff options
| author | Ville Syrjälä <[email protected]> | 2024-03-07 17:18:09 +0200 |
|---|---|---|
| committer | Ville Syrjälä <[email protected]> | 2024-03-15 10:53:46 +0200 |
| commit | 89164fc86eb00e7d617a4e1d251898b7aede3a32 (patch) | |
| tree | 8e3a6ea759f50a66639cfb6114b29273730cf306 /tools/perf/scripts/python | |
| parent | 7e0c5caf944ab67f33592ecea628caefea1ebe85 (diff) | |
drm/i915: Use container_of_const() for states
commit 64f6a5d1922b ("container_of: add container_of_const()
that preserves const-ness of the pointer") is nice. Let's use
it so that we don't accidentally cast away the const from our
state pointers.
The only thing I don't particularly like about container_of_const()
is that it still accepts void* in addition to the proper pointer
types, but that's how most other things in C work anyway so I
guess we can live with it.
And while at it rename the macro arguments to be a bit more
descriptive than just 'x'.
TODO: maybe convert *all* container_of() uses to container_of_const()?
Signed-off-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Jani Nikula <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions