On 10/1/2026 5:04 AM, Dawid Osuchowski wrote:
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 <[email protected]>
Reviewed-by: Jeff Hugo <[email protected]>