Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] Conditional compilation error on 32-bit architectures due to mismatched match arm types. --
--- Patch [4]: [PATCH v3 4/7] drm: nova: Add GETPARAM parameter to read the GPU chipid --- commit c560fdc21fe8a1d71109ee27e0b91d35e7283f2a Author: Alistair Popple <[email protected]> drm: nova: Add GETPARAM parameter to read the GPU chipid One of the first things a user needs to know about a GPU is its chipid, so add a GETPARAM parameter to return that. > diff --git a/drivers/gpu/drm/nova/file.rs b/drivers/gpu/drm/nova/file.rs > index 1156df51c533a..855f238777349 100644 > --- a/drivers/gpu/drm/nova/file.rs > +++ b/drivers/gpu/drm/nova/file.rs [ ... ] > @@ -43,6 +43,7 @@ pub(crate) fn get_param( > > let value = match getparam.param as u32 { > uapi::NOVA_GETPARAM_VRAM_BAR_SIZE => pdev.resource_len(1)?, > + uapi::NOVA_GETPARAM_GPU_CHIPID => reg_data.api.chipset() as u64, [Severity: Low] Does this cause a conditional compilation error on 32-bit architectures? In File::get_param(), all match arms must evaluate to exactly the same type. The first arm evaluates to pdev.resource_len(1)? which returns a bindings::resource_size_t. The newly added second arm evaluates to u64 via the explicit cast. On 32-bit kernel configurations without CONFIG_PHYS_ADDR_T_64BIT enabled, resource_size_t resolves to u32. This mismatch between u32 and u64 across the match arms will result in a hard build error. > _ => return Err(EINVAL), > }; > -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=4
