diff options
| author | Kees Cook <kees@kernel.org> | 2025-04-25 23:15:27 -0700 |
|---|---|---|
| committer | Kees Cook <kees@kernel.org> | 2025-11-24 12:44:05 -0800 |
| commit | fbcc2150aa40655451c28b1a8d750f8468f3b092 (patch) | |
| tree | 1ab31e7d5b44307e3ef5f2c8ed23028998717d5f /tools/testing/selftests/net/lib/py/utils.py | |
| parent | 961c989c5fbbd9146d5cb134d3f663c20708b2be (diff) | |
media: iris: Cast iris_hfi_gen2_get_instance() allocation type
In preparation for making the kmalloc family of allocators type aware,
we need to make sure that the returned type from the allocation matches
the type of the variable being assigned. (Before, the allocator would
always return "void *", which can be implicitly cast to any pointer type.)
The assigned type is "struct iris_inst *", but the returned type is
"struct iris_inst_hfi_gen2 *". The allocation is intentionally larger as
the first member of struct iris_inst_hfi_gen2 is struct iris_inst, so
this is by design. Cast the allocation type to match the assignment.
Link: https://patch.msgid.link/20250426061526.work.106-kees@kernel.org
Signed-off-by: Kees Cook <kees@kernel.org>
Diffstat (limited to 'tools/testing/selftests/net/lib/py/utils.py')
0 files changed, 0 insertions, 0 deletions
