diff options
| author | 2026-10-01 13:04:00 +0200 | |
|---|---|---|
| committer | 2026-10-05 09:05:09 +0200 | |
| commit | be3cf6bb94459523431f7ab1941f7b7d20979cc3 (patch) | |
| tree | 11676cd5e9ca57957f36c0b514c04427879b8c23 /scripts/Makefile.thinlto | |
| parent | accel/ivpu: Improve HW IP gen and buttress version checks (diff) | |
accel/ivpu: Convert hw_ip_gen/btrs_gen to enum types
Change the hw_ip_gen and btrs_gen members of struct ivpu_device, and
their accessors, from u32/int to enum vpu_hw_ip/enum vpu_hw_btrs, and
drop the default: labels from the switch statements in ivpu_hw_ip.c
that dispatch on them. Switching on the real enum types lets the
compiler treat these switches as exhaustive at compile time, so a
missing case for a new generation now warns instead of silently
hitting default:.
This compile-time guarantee holds because ivpu_ip_gen_init() now fails
probe on an unrecognized PCI device ID instead of leaving these fields
at 0, so the switches never see an unhandled value.
Signed-off-by: Dawid Osuchowski <dawid.osuchowski@linux.intel.com>
Reviewed-by: Karol Wachowski <karol.wachowski@linux.intel.com>
Reviewed-by: Andrzej Kacprowski <andrzej.kacprowski@linux.intel.com>
Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
Signed-off-by: Karol Wachowski <karol.wachowski@linux.intel.com>
Link: https://patch.msgid.link/20261001110401.2866557-3-dawid.osuchowski@linux.intel.com
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
