diff options
author | Nam Cao <namcao@linutronix.de> | 2024-10-31 18:14:16 +0300 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2024-11-07 04:47:04 +0300 |
commit | 482a483cfe5bafeb5408532321cd607bae127a2b (patch) | |
tree | 6cdb90b5b6253f078b03084fa37e217fa7671614 /tools/perf/scripts/python/stackcollapse.py | |
parent | fbf920f255315974808ce91d934fe50198294d51 (diff) | |
download | linux-482a483cfe5bafeb5408532321cd607bae127a2b.tar.xz |
drm/i915/request: Remove unnecessary modification of hrtimer:: Function
When a request is created, the hrtimer is not initialized and only its
'function' field is set to NULL. The hrtimer is only initialized when the
request is enqueued. The point of setting 'function' to NULL is that, it
can be used to check whether hrtimer_try_to_cancel() should be called while
retiring the request.
This "trick" is unnecessary, because hrtimer_try_to_cancel() already does
its own check whether the timer is armed. If the timer is not armed,
hrtimer_try_to_cancel() returns 0.
Fully initialize the timer when the request is created, which allows to
make the hrtimer::function field private once all users of hrtimer_init()
are converted to hrtimer_setup(), which requires a valid callback function
to be set.
Because hrtimer_try_to_cancel() returns 0 if the timer is not armed, the
logic to check whether to call i915_request_put() remains equivalent.
Signed-off-by: Nam Cao <namcao@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/50f865045aa672a9730343ad131543da332b1d8d.1730386209.git.namcao@linutronix.de
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions