diff options
| author | Nam Cao <[email protected]> | 2025-07-27 17:31:12 +0000 |
|---|---|---|
| committer | Steven Rostedt (Google) <[email protected]> | 2025-07-28 14:39:34 +0000 |
| commit | e82aea50fe0600da176b2e50a6213f6057b719f9 (patch) | |
| tree | 4fef38410d24939a55159e2bf40fe2bcf3d3a42e /drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | |
| parent | rv: Remove struct rv_monitor::reacting (diff) | |
| download | kernel-e82aea50fe0600da176b2e50a6213f6057b719f9.tar.gz kernel-e82aea50fe0600da176b2e50a6213f6057b719f9.zip | |
rv: Fix wrong type cast in monitors_show()
Argument 'p' of monitors_show() is not a pointer to struct rv_monitor, it
is actually a pointer to the list_head inside struct rv_monitor. Therefore
it is wrong to cast 'p' to struct rv_monitor *.
This wrong type cast has been there since the beginning. But it still
worked because the list_head was the first field in struct rv_monitor_def.
This is no longer true since commit 24cbfe18d55a ("rv: Merge struct
rv_monitor_def into struct rv_monitor") moved the list_head, and this wrong
type cast became a functional problem.
Properly use container_of() instead.
Cc: Masami Hiramatsu <[email protected]>
Cc: Mathieu Desnoyers <[email protected]>
Link: https://lore.kernel.org/35e49e97696007919ceacf73796487a2e15a3d02.1753625621.git.namcao@linutronix.de
Fixes: 24cbfe18d55a ("rv: Merge struct rv_monitor_def into struct rv_monitor")
Signed-off-by: Nam Cao <[email protected]>
Reviewed-by: Gabriele Monaco <[email protected]>
Signed-off-by: Steven Rostedt (Google) <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c')
0 files changed, 0 insertions, 0 deletions
