diff options
author | Jani Nikula <jani.nikula@intel.com> | 2024-09-18 20:35:48 +0300 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2024-09-30 17:54:13 +0300 |
commit | 2edc6a75f26c112d90ca67ff412ba79622069818 (patch) | |
tree | c2e35c6ffb1756e8fed20b29d0bc8fb6a1bcd0c6 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | bc549f8fc6334cecc32bb2daf780e25da4ce8096 (diff) |
drm/i915: switch intel_wakeref_t underlying type to struct ref_tracker *
For intel_wakeref_t, opaque is reasonable, but disguising the underlying
struct ref_tracker * as an unsigned long is not so great. Update the
typedef to remove one level of disguise.
Although the kernel coding style strongly discourages pointer typedefs,
it's a better alternative, and an incremental improvement on the status
quo. It provides much better type safety than an unsigned long could,
and prevents passing magic -1 instead of INTEL_WAKEREF_DEF. Moreover, it
provides a gradual path for replacing intel_wakeref_t with struct
ref_tracker * if desired.
As an extra safety measure, check for error pointers in
intel_ref_tracker_free() before passing them on to ref_tracker_free(),
to catch any mistakes with mock gt special wakeref value.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/cca2b0631f816ad90461aa1bf4fe3f80c0e13464.1726680898.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions