Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] Incomplete 64-bit conversion in `drm_debug_enabled_raw()` prevents checking categories >= 32 on 32-bit architectures. --
commit 9ed1108f13f83f85b038d937d383fae3b647f69a Author: Jim Cromie <[email protected]> dyndbg: Upgrade class param storage to u64 for 64-bit classmaps This commit upgrades the dynamic debug class parameter storage to u64 to support 64-bit classmaps without truncation on 32-bit architectures. It also updates __drm_debug to use u64. > diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h > index ab017b05e1751..21a0ced0b2f20 100644 > --- a/include/drm/drm_print.h > +++ b/include/drm/drm_print.h > @@ -39,7 +39,7 @@ struct drm_device; > struct seq_file; > > /* Do *not* use outside of drm_print.[ch]! */ > -extern unsigned long __drm_debug; > +extern u64 __drm_debug; [Severity: Low] With __drm_debug upgraded to u64, does drm_debug_enabled_raw() also need to be updated to use BIT_ULL() instead of BIT()? Currently it evaluates using BIT(): static inline bool drm_debug_enabled_raw(enum drm_debug_category category) { return unlikely(__drm_debug & BIT(category)); } On 32-bit architectures, BIT() evaluates to a 32-bit unsigned long. While this might not cause issues right now with the current number of debug categories, it limits the 64-bit conversion and prevents checking categories >= 32 since the bitwise operation would evaluate as 32-bit before the check against __drm_debug. Since the commit message notes "further changes to drm later", is this already planned for a follow-up patch? -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=18
