Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [drm-i915:for-linux-next 5/6] drivers/gpu/drm/i915/display/intel_de.c:350:18: warning: use of bitwise '|' with boolean operands
@ 2026-11-24 13:42 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-11-24 13:42 UTC (permalink / raw)
  To: Ville Syrjälä 
  Cc: llvm, oe-kbuild-all, intel-gfx, dri-devel, Jani Nikula

tree:   https://gitlab.freedesktop.org/drm/i915/kernel.git for-linux-next
head:   6d00cec4c9becea6540f75820bc0837d14ea7611
commit: 1a6684ee830ff0a15147e332991e1a5d34c55592 [5/6] drm/i915/de: Optimize the mmio_debug checks in intel_de_{read,write}()
config: riscv-randconfig-2005-20261124 (https://download.01.org/0day-ci/archive/20261124/20261124143710.bu4mng1e-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261124/20261124143710.bu4mng1e-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/20261124143710.bu4mng1e-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/i915/display/intel_de.c:350:18: warning: use of bitwise '|' with boolean operands [-Wbitwise-instead-of-logical]
     350 |         return unlikely(!!READ_ONCE(display->params.mmio_debug) |
         |                ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                                                                 ||
     351 |                         READ_ONCE(display->mmio.mmio_debug_oneshot));
         |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:47:41: note: expanded from macro 'unlikely'
      47 | #  define unlikely(x)   (__branch_check__(x, 0, __builtin_constant_p(x)))
         |                          ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:32:34: note: expanded from macro '__branch_check__'
      32 |                         ______r = __builtin_expect(!!(x), expect);      \
         |                                                      ~^~
   drivers/gpu/drm/i915/display/intel_de.c:350:18: note: cast one or both operands to int to silence this warning
>> drivers/gpu/drm/i915/display/intel_de.c:350:18: warning: use of bitwise '|' with boolean operands [-Wbitwise-instead-of-logical]
     350 |         return unlikely(!!READ_ONCE(display->params.mmio_debug) |
         |                ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                                                                 ||
     351 |                         READ_ONCE(display->mmio.mmio_debug_oneshot));
         |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:47:68: note: expanded from macro 'unlikely'
      47 | #  define unlikely(x)   (__branch_check__(x, 0, __builtin_constant_p(x)))
         |                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
   include/linux/compiler.h:34:19: note: expanded from macro '__branch_check__'
      34 |                                              expect, is_constant);      \
         |                                                      ^~~~~~~~~~~
   drivers/gpu/drm/i915/display/intel_de.c:350:18: note: cast one or both operands to int to silence this warning
   2 warnings generated.


vim +350 drivers/gpu/drm/i915/display/intel_de.c

   345	
   346	static __always_inline bool
   347	__mmio_debug_is_enabled(struct intel_display *display)
   348	{
   349		/* with || gcc emits two branches for this */
 > 350		return unlikely(!!READ_ONCE(display->params.mmio_debug) |
   351				READ_ONCE(display->mmio.mmio_debug_oneshot));
   352	}
   353	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-24 13:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-24 13:42 [drm-i915:for-linux-next 5/6] drivers/gpu/drm/i915/display/intel_de.c:350:18: warning: use of bitwise '|' with boolean operands kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox