drivers/gpu/drm/panel/panel-himax-hx8279.c:807 hx8279_check_gmux_config() warn: impossible condition '(gmux->gout_r[i] > ((((0) + (((((1 << (8 * 4 - 1 - (((-1)) < 1))) - 1) + (1 << (8 * 4 - 1 - (((-1)) < 1))))) << (6) & ((((1 << (8 * 4 - 1 - (((-1)) < 1))...
kernel test robot <[email protected]> Sat, 25 Jul 2026 04:43:35 +0800
| Newsgroups | dev.linux.lists.oe-kbuild |
|---|---|
| Message-ID | <[email protected]> |
BCC: [email protected] CC: [email protected] CC: [email protected] TO: Vincent Mailhol <[email protected]> CC: Yury Norov <[email protected]> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 4539944e515183668109bdf4d0c3d7d228383d88 commit: 104ea1c84b91c9f452e497ba51602b903711cdd5 bits: unify the non-asm GENMASK*() date: 12 months ago :::::: branch date: 2 days ago :::::: commit date: 12 months ago config: riscv-randconfig-r071-20260723 (https://download.01.org/0day-ci/archive/20260725/[email protected]/config) compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 890b11e09e45e9d8b29f2f94f22052be3934e757) smatch: v0.5.0-9187-g5189e3fb 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 | Fixes: 104ea1c84b91 ("bits: unify the non-asm GENMASK*()") | Reported-by: kernel test robot <[email protected]> | Reported-by: Dan Carpenter <[email protected]> | Closes: https://lore.kernel.org/r/[email protected]/ New smatch warnings: drivers/gpu/drm/panel/panel-himax-hx8279.c:807 hx8279_check_gmux_config() warn: impossible condition '(gmux->gout_r[i] > ((((0) + (((((1 << (8 * 4 - 1 - (((-1)) < 1))) - 1) + (1 << (8 * 4 - 1 - (((-1)) < 1))))) << (6) & ((((1 << (8 * 4 - 1 - (((-1)) < 1))) - 1) + (1 << (8 * 4 - 1 - (((-1)) < 1))))) >> ((4 * 8) - 1 - (7))))) | (((0) + (((((1 << (8 * 4 - 1 - (((-1)) < 1))) - 1) + (1 << (8 * 4 - 1 - (((-1)) < 1))))) << (0) & ((((1 << (8 * 4 - 1 - (((-1)) < 1))) - 1) + (1 << (8 * 4 - 1 - (((-1)) < 1))))) >> ((4 * 8) - 1 - (5))))))) => (0-255 > 255)' Old smatch warnings: drivers/gpu/drm/panel/panel-himax-hx8279.c:801 hx8279_check_gmux_config() warn: impossible condition '(gmux->gout_l[i] > ((((0) + (((((1 << (8 * 4 - 1 - (((-1)) < 1))) - 1) + (1 << (8 * 4 - 1 - (((-1)) < 1))))) << (6) & ((((1 << (8 * 4 - 1 - (((-1)) < 1))) - 1) + (1 << (8 * 4 - 1 - (((-1)) < 1))))) >> ((4 * 8) - 1 - (7))))) | (((0) + (((((1 << (8 * 4 - 1 - (((-1)) < 1))) - 1) + (1 << (8 * 4 - 1 - (((-1)) < 1))))) << (0) & ((((1 << (8 * 4 - 1 - (((-1)) < 1))) - 1) + (1 << (8 * 4 - 1 - (((-1)) < 1))))) >> ((4 * 8) - 1 - (5))))))) => (0-255 > 255)' vim +807 drivers/gpu/drm/panel/panel-himax-hx8279.c 38d42c26138998 AngeloGioacchino Del Regno 2025-04-14 789 38d42c26138998 AngeloGioacchino Del Regno 2025-04-14 790 static int hx8279_check_gmux_config(struct hx8279 *hx, struct device *dev) 38d42c26138998 AngeloGioacchino Del Regno 2025-04-14 791 { 38d42c26138998 AngeloGioacchino Del Regno 2025-04-14 792 const struct hx8279_panel_desc *desc = hx->desc; 38d42c26138998 AngeloGioacchino Del Regno 2025-04-14 793 const struct hx8279_goa_mux *gmux = desc->gmux; 38d42c26138998 AngeloGioacchino Del Regno 2025-04-14 794 int i; 38d42c26138998 AngeloGioacchino Del Regno 2025-04-14 795 38d42c26138998 AngeloGioacchino Del Regno 2025-04-14 796 /* No gmux defined means we simply skip the GOA mux configuration */ 38d42c26138998 AngeloGioacchino Del Regno 2025-04-14 797 if (!gmux) 38d42c26138998 AngeloGioacchino Del Regno 2025-04-14 798 return 0; 38d42c26138998 AngeloGioacchino Del Regno 2025-04-14 799 38d42c26138998 AngeloGioacchino Del Regno 2025-04-14 800 for (i = 0; i < ARRAY_SIZE(gmux->gout_l); i++) { 38d42c26138998 AngeloGioacchino Del Regno 2025-04-14 801 if (gmux->gout_l[i] > (HX8279_GOUT_STB | HX8279_GOUT_SEL)) 38d42c26138998 AngeloGioacchino Del Regno 2025-04-14 802 return dev_err_probe(dev, -EINVAL, 38d42c26138998 AngeloGioacchino Del Regno 2025-04-14 803 "Invalid value found in gout_l[%d]\n", i); 38d42c26138998 AngeloGioacchino Del Regno 2025-04-14 804 } 38d42c26138998 AngeloGioacchino Del Regno 2025-04-14 805 38d42c26138998 AngeloGioacchino Del Regno 2025-04-14 806 for (i = 0; i < ARRAY_SIZE(gmux->gout_r); i++) { 38d42c26138998 AngeloGioacchino Del Regno 2025-04-14 @807 if (gmux->gout_r[i] > (HX8279_GOUT_STB | HX8279_GOUT_SEL)) 38d42c26138998 AngeloGioacchino Del Regno 2025-04-14 808 return dev_err_probe(dev, -EINVAL, 38d42c26138998 AngeloGioacchino Del Regno 2025-04-14 809 "Invalid value found in gout_r[%d]\n", i); 38d42c26138998 AngeloGioacchino Del Regno 2025-04-14 810 } 38d42c26138998 AngeloGioacchino Del Regno 2025-04-14 811 38d42c26138998 AngeloGioacchino Del Regno 2025-04-14 812 return 0; 38d42c26138998 AngeloGioacchino Del Regno 2025-04-14 813 } 38d42c26138998 AngeloGioacchino Del Regno 2025-04-14 814 :::::: The code at line 807 was first introduced by commit :::::: 38d42c261389985e8dd4739dbd97e2dc855e8dd0 drm: panel: Add driver for Himax HX8279 DDIC panels :::::: TO: AngeloGioacchino Del Regno <[email protected]> :::::: CC: Neil Armstrong <[email protected]> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki