[tip:irq/drivers 6/22] drivers/media/platform/mediatek/vpu/mtk_vpu.c:299:9: warning: comparison of different enumeration types ('enum ipi_id' and 'enum ipi_message_type')
From: kernel test robot
Date: Mon Sep 07 2026 - 21:02:14 EST
Hi GUO,
FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/drivers
head: 0c65a1331928d0207c385f03fb5eba0cfecce0e6
commit: 1ae91dc397eb1dbc0f4fc6b96f2481cbc02fe0f9 [6/22] riscv: smp: Move enum ipi_message_type to asm/smp.h
config: riscv-allyesconfig (https://download.01.org/0day-ci/archive/20260908/202609080837.vE9lfq1K-lkp@xxxxxxxxx/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 2362eeb5f75560740146975e9eabe84c6bd25a0d)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260908/202609080837.vE9lfq1K-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202609080837.vE9lfq1K-lkp@xxxxxxxxx/
All warnings (new ones prefixed by >>):
In file included from drivers/media/platform/mediatek/vpu/mtk_vpu.c:20:
drivers/media/platform/mediatek/vpu/mtk_vpu.h:63:2: error: redefinition of enumerator 'IPI_MAX'
63 | IPI_MAX,
| ^
arch/riscv/include/asm/smp.h:27:2: note: previous definition is here
27 | IPI_MAX
| ^
>> drivers/media/platform/mediatek/vpu/mtk_vpu.c:299:9: warning: comparison of different enumeration types ('enum ipi_id' and 'enum ipi_message_type') [-Wenum-compare]
299 | if (id < IPI_MAX && handler) {
| ~~ ^ ~~~~~~~
drivers/media/platform/mediatek/vpu/mtk_vpu.c:322:31: warning: comparison of different enumeration types ('enum ipi_id' and 'enum ipi_message_type') [-Wenum-compare]
322 | if (id <= IPI_VPU_INIT || id >= IPI_MAX ||
| ~~ ^ ~~~~~~~
2 warnings and 1 error generated.
vim +299 drivers/media/platform/mediatek/vpu/mtk_vpu.c
040d31ccf2bd87 drivers/media/platform/mtk-vpu/mtk_vpu.c Irui Wang 2020-10-29 286
3003a180ef6b94 drivers/media/platform/mtk-vpu/mtk_vpu.c Andrew-CT Chen 2016-05-03 287 int vpu_ipi_register(struct platform_device *pdev,
3003a180ef6b94 drivers/media/platform/mtk-vpu/mtk_vpu.c Andrew-CT Chen 2016-05-03 288 enum ipi_id id, ipi_handler_t handler,
3003a180ef6b94 drivers/media/platform/mtk-vpu/mtk_vpu.c Andrew-CT Chen 2016-05-03 289 const char *name, void *priv)
3003a180ef6b94 drivers/media/platform/mtk-vpu/mtk_vpu.c Andrew-CT Chen 2016-05-03 290 {
3003a180ef6b94 drivers/media/platform/mtk-vpu/mtk_vpu.c Andrew-CT Chen 2016-05-03 291 struct mtk_vpu *vpu = platform_get_drvdata(pdev);
3003a180ef6b94 drivers/media/platform/mtk-vpu/mtk_vpu.c Andrew-CT Chen 2016-05-03 292 struct vpu_ipi_desc *ipi_desc;
3003a180ef6b94 drivers/media/platform/mtk-vpu/mtk_vpu.c Andrew-CT Chen 2016-05-03 293
3003a180ef6b94 drivers/media/platform/mtk-vpu/mtk_vpu.c Andrew-CT Chen 2016-05-03 294 if (!vpu) {
3003a180ef6b94 drivers/media/platform/mtk-vpu/mtk_vpu.c Andrew-CT Chen 2016-05-03 295 dev_err(&pdev->dev, "vpu device in not ready\n");
3003a180ef6b94 drivers/media/platform/mtk-vpu/mtk_vpu.c Andrew-CT Chen 2016-05-03 296 return -EPROBE_DEFER;
3003a180ef6b94 drivers/media/platform/mtk-vpu/mtk_vpu.c Andrew-CT Chen 2016-05-03 297 }
3003a180ef6b94 drivers/media/platform/mtk-vpu/mtk_vpu.c Andrew-CT Chen 2016-05-03 298
c4abb192caca96 drivers/media/platform/mtk-vpu/mtk_vpu.c Hans Verkuil 2019-11-03 @299 if (id < IPI_MAX && handler) {
3003a180ef6b94 drivers/media/platform/mtk-vpu/mtk_vpu.c Andrew-CT Chen 2016-05-03 300 ipi_desc = vpu->ipi_desc;
3003a180ef6b94 drivers/media/platform/mtk-vpu/mtk_vpu.c Andrew-CT Chen 2016-05-03 301 ipi_desc[id].name = name;
3003a180ef6b94 drivers/media/platform/mtk-vpu/mtk_vpu.c Andrew-CT Chen 2016-05-03 302 ipi_desc[id].handler = handler;
3003a180ef6b94 drivers/media/platform/mtk-vpu/mtk_vpu.c Andrew-CT Chen 2016-05-03 303 ipi_desc[id].priv = priv;
3003a180ef6b94 drivers/media/platform/mtk-vpu/mtk_vpu.c Andrew-CT Chen 2016-05-03 304 return 0;
3003a180ef6b94 drivers/media/platform/mtk-vpu/mtk_vpu.c Andrew-CT Chen 2016-05-03 305 }
3003a180ef6b94 drivers/media/platform/mtk-vpu/mtk_vpu.c Andrew-CT Chen 2016-05-03 306
3003a180ef6b94 drivers/media/platform/mtk-vpu/mtk_vpu.c Andrew-CT Chen 2016-05-03 307 dev_err(&pdev->dev, "register vpu ipi id %d with invalid arguments\n",
3003a180ef6b94 drivers/media/platform/mtk-vpu/mtk_vpu.c Andrew-CT Chen 2016-05-03 308 id);
3003a180ef6b94 drivers/media/platform/mtk-vpu/mtk_vpu.c Andrew-CT Chen 2016-05-03 309 return -EINVAL;
3003a180ef6b94 drivers/media/platform/mtk-vpu/mtk_vpu.c Andrew-CT Chen 2016-05-03 310 }
3003a180ef6b94 drivers/media/platform/mtk-vpu/mtk_vpu.c Andrew-CT Chen 2016-05-03 311 EXPORT_SYMBOL_GPL(vpu_ipi_register);
3003a180ef6b94 drivers/media/platform/mtk-vpu/mtk_vpu.c Andrew-CT Chen 2016-05-03 312
:::::: The code at line 299 was first introduced by commit
:::::: c4abb192caca96a53c2e833d25b1f7f12b454bf4 media: mtk-vpu: fix two smatch warnings
:::::: TO: Hans Verkuil <hverkuil-cisco@xxxxxxxxx>
:::::: CC: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki