Skip to contentSkip to conversation

drivers/gpu/drm/i915/display/intel_cmtg.c:96:17: error: arithmetic between different enumeration types ('enum transcoder' and 'enum intel_display_power_domain')

PATCH kernel test robot 1 participant 1 message Feb 12, 2025

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   df5d6180169ae06a2eac57e33b077ad6f6252440
commit: f14d81b7102bdbf062f90b3910e986850f5f86c2 [529/2407] drm/i915/cmtg: Disable the CMTG
config: x86_64-randconfig-005-20250212 (https://download.01.org/0day-ci/archive/20250212/[email protected]/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250212/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

In file included from drivers/gpu/drm/i915/display/intel_cmtg.c:12:
In file included from ./gpu/drm/xe/compat-i915-headers/i915_drv.h:16:
In file included from ./gpu/drm/xe/compat-i915-headers/intel_runtime_pm.h:10:
In file included from gpu/drm/xe/xe_device_types.h:9:
In file included from include/linux/pci.h:1644:
In file included from include/linux/dmapool.h:14:
In file included from include/linux/scatterlist.h:8:
In file included from include/linux/mm.h:2223:
include/linux/vmstat.h:504:43: error: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Werror,-Wenum-enum-conversion]

     504 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     505 |                            item];
         |                            ~~~~
   include/linux/vmstat.h:511:43: error: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Werror,-Wenum-enum-conversion]
     511 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     512 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
   include/linux/vmstat.h:518:36: error: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Werror,-Wenum-enum-conversion]
     518 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
   include/linux/vmstat.h:524:43: error: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Werror,-Wenum-enum-conversion]
     524 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     525 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/i915/display/intel_cmtg.c:96:17: error: arithmetic between different enumeration types ('enum transcoder' and 'enum intel_display_power_domain') [-Werror,-Wenum-enum-conversion]
      96 |         power_domain = POWER_DOMAIN_TRANSCODER(trans);
         |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/i915/display/intel_display_power.h:126:10: note: expanded from macro 'POWER_DOMAIN_TRANSCODER'
     126 |          (tran) + POWER_DOMAIN_TRANSCODER_A)
         |          ~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~

5 errors generated.

vim +96 drivers/gpu/drm/i915/display/intel_cmtg.c

    84	
    85	static bool intel_cmtg_transcoder_is_secondary(struct intel_display *display,
    86						       enum transcoder trans)
    87	{
    88		struct drm_i915_private *i915 = to_i915(display->drm);
    89		enum intel_display_power_domain power_domain;
    90		intel_wakeref_t wakeref;
    91		u32 val = 0;
    92	
    93		if (!HAS_TRANSCODER(display, trans))
    94			return false;
    95	
  > 96		power_domain = POWER_DOMAIN_TRANSCODER(trans);
    97	
    98		with_intel_display_power_if_enabled(i915, power_domain, wakeref)
    99			val = intel_de_read(display, TRANS_DDI_FUNC_CTL2(display, trans));

100
101 return val & CMTG_SECONDARY_MODE;
102 }
103

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