lkml.org 
[lkml]   [2021]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] [v2] i915: fix shift warning
From
Date
Quoting Arnd Bergmann (2021-01-03 13:51:44)
> From: Arnd Bergmann <arnd@arndb.de>
>
> Randconfig builds on 32-bit machines show lots of warnings for
> the i915 driver for passing a 32-bit value into __const_hweight64():
>
> drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c:2584:9: error: shift count >= width of type [-Werror,-Wshift-count-overflow]
> return hweight64(VDBOX_MASK(&i915->gt));
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> include/asm-generic/bitops/const_hweight.h:29:49: note: expanded from macro 'hweight64'
> #define hweight64(w) (__builtin_constant_p(w) ? __const_hweight64(w) : __arch_hweight64(w))
>
> Change it to hweight_long() to avoid the warning.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by:: Chris Wilson <chris@chris-wilson.co.uk>
-Chris

\
 
 \ /
  Last update: 2021-01-03 15:05    [W:0.028 / U:0.472 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site