linux-yocto/drivers/gpu/drm/panel
Nathan Chancellor 0228687423 drm/panel: himax-hx8279: Always initialize goa_{even,odd}_valid in hx8279_check_goa_config()
Clang warns (or errors with CONFIG_WERROR=y):

  drivers/gpu/drm/panel/panel-himax-hx8279.c:838:6: error: variable 'goa_even_valid' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
    838 |         if (num_zero == ARRAY_SIZE(desc->goa_even_timing))
        |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  drivers/gpu/drm/panel/panel-himax-hx8279.c:842:23: note: uninitialized use occurs here
    842 |         if (goa_odd_valid != goa_even_valid)
        |                              ^~~~~~~~~~~~~~
  drivers/gpu/drm/panel/panel-himax-hx8279.c:838:2: note: remove the 'if' if its condition is always true
    838 |         if (num_zero == ARRAY_SIZE(desc->goa_even_timing))
        |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    839 |                 goa_even_valid = false;
  drivers/gpu/drm/panel/panel-himax-hx8279.c:818:36: note: initialize the variable 'goa_even_valid' to silence this warning
    818 |         bool goa_odd_valid, goa_even_valid;
        |                                           ^
        |                                            = 0

Even though only the even valid variable gets flagged, both valid
variables appear to have the same issue of possibly being used
uninitialized if the if statement initializing them to false is not
taken.

Turn the if statement then variable assignment into a single variable
assignment, which states that the configuration is valid when there are
not all zeros, clearing up the warning since the variable will always be
initialized.

Fixes: 38d42c2613 ("drm: panel: Add driver for Himax HX8279 DDIC panels")
Suggested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250423-panel-himax-hx8279-fix-sometimes-uninitialized-v2-1-fc501c6558d9@kernel.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250423-panel-himax-hx8279-fix-sometimes-uninitialized-v2-1-fc501c6558d9@kernel.org
2025-04-24 10:19:10 +02:00
..
Kconfig drm/panel: Add Visionox G2647FB105 panel driver 2025-04-17 17:39:09 +02:00
Makefile drm/panel: Add Visionox G2647FB105 panel driver 2025-04-17 17:39:09 +02:00
panel-abt-y030xx067a.c panel/abt-y030xx067a: Use the refcounted allocation in place of devm_kzalloc() 2025-04-07 10:29:13 +02:00
panel-arm-versatile.c panel/arm-versatile: Use the refcounted allocation in place of devm_kzalloc() 2025-04-07 10:29:13 +02:00
panel-asus-z00t-tm5p5-n35596.c panel/z00t-tm5p5-n35596: Use refcounted allocation in place of devm_kzalloc() 2025-04-07 10:29:14 +02:00
panel-auo-a030jtn01.c drm/panel: auo-a030jtn01: Fix compilation build 2025-04-08 17:35:45 +03:00
panel-boe-bf060y8m-aj0.c drm/panel: boe-bf060y8m-aj0: transition to mipi_dsi wrapped functions 2025-04-16 09:11:28 -07:00
panel-boe-himax8279d.c drm/panel: boe-himax8279d: Don't call unprepare+disable at shutdown/remove 2024-06-11 09:58:40 +02:00
panel-boe-th101mb31ig002-28a.c drm/panel: boe-th101mb31ig002-28a: Fix compilation build 2025-04-08 17:35:52 +03:00
panel-boe-tv101wum-ll2.c drm/panel: boe-tv101wum-ll2: Fix compilation build 2025-04-08 17:35:56 +03:00
panel-boe-tv101wum-nl6.c drm/panel: boe-tv101wum-nl6: Break some CMDS into helper functions 2024-07-25 16:27:21 +02:00
panel-dsi-cm.c panel/dsi-cm: Use refcounted allocation in place of devm_kzalloc() 2025-04-07 10:29:16 +02:00
panel-ebbg-ft8719.c panel/ebbg-ft8719: Use refcounted allocation in place of devm_kzalloc() 2025-04-07 10:29:17 +02:00
panel-edp.c panel/panel-edp: Use refcounted allocation in place of devm_kzalloc() 2025-04-07 10:29:17 +02:00
panel-elida-kd35t133.c drm/panel: elida-kd35t133: transition to mipi_dsi wrapped functions 2024-10-01 14:27:48 -07:00
panel-feixin-k101-im2ba02.c
panel-feiyang-fy07024di26a30d.c
panel-himax-hx8279.c drm/panel: himax-hx8279: Always initialize goa_{even,odd}_valid in hx8279_check_goa_config() 2025-04-24 10:19:10 +02:00
panel-himax-hx8394.c drm/panel: himax-hx8394: transition to mipi_dsi wrapped functions 2025-03-30 21:09:49 +03:00
panel-himax-hx83102.c drm/panel: panel-himax-hx83102: support for starry-2082109qfh040022-50e MIPI-DSI panel 2025-02-10 07:33:52 -08:00
panel-himax-hx83112a.c drm/panel: himax-hx83112a: transition to mipi_dsi wrapped functions 2024-09-11 12:59:31 -07:00
panel-ilitek-ili9322.c drm/panel: ili9322: Constify struct regmap_bus 2024-10-19 17:26:32 +03:00
panel-ilitek-ili9341.c drm/panel: ili9341: Remove duplicate code 2024-09-02 11:53:49 +02:00
panel-ilitek-ili9805.c
panel-ilitek-ili9806e.c drm/panel/panel-ilitek-ili9806e: Add Densitron DMT028VGHMCMI-1D TFT to ILI9806E DSI TCON driver 2024-07-24 09:55:47 +02:00
panel-ilitek-ili9881c.c drm/panel: ilitek-ili9881c: Report subpixel order according to rotation 2024-10-09 09:48:45 +02:00
panel-ilitek-ili9882t.c drm/panel: ilitek-ili9882t: fix GPIO name in error message 2025-02-20 15:17:11 +01:00
panel-innolux-ej030na.c drm/panel: add missing MODULE_DESCRIPTION() macros 2024-06-10 10:35:00 +02:00
panel-innolux-p079zca.c
panel-jadard-jd9365da-h3.c drm: panel: jd9365da-h3: fix reset signal polarity 2025-02-13 17:46:51 +01:00
panel-jdi-fhd-r63452.c drm/panel: jdi-fhd-r63452: transition to mipi_dsi wrapped functions 2024-08-20 14:18:18 -07:00
panel-jdi-lpm102a188a.c
panel-jdi-lt070me05000.c drm/panel: jdi-lt070me05000: Don't call disable at shutdown/remove 2024-06-11 09:58:44 +02:00
panel-khadas-ts050.c drm/panel: khadas-ts050: make ts050[v2]_panel_data static 2024-09-13 11:05:08 +02:00
panel-kingdisplay-kd097d04.c
panel-leadtek-ltk050h3146w.c drm/panel: leadtek-ltk050h3146w: transition to mipi_dsi wrapped functions 2024-10-31 10:36:55 +01:00
panel-leadtek-ltk500hd1829.c
panel-lg-lb035q02.c
panel-lg-lg4573.c
panel-lg-sw43408.c drm-misc-next for 6.11: 2024-06-21 10:30:31 +10:00
panel-lincolntech-lcd197.c drm/panel: add lincolntech lcd197 support 2024-06-26 18:38:30 +02:00
panel-lvds.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
panel-magnachip-d53e6ea8966.c
panel-mantix-mlaf057we51.c drm/panel: mantix-mlaf057we51: write hex in lowercase 2024-08-20 11:27:42 +02:00
panel-nec-nl8048hl11.c
panel-newvision-nv3051d.c drm/panel: make prepare/enable and disable/unprepare calls return void 2025-04-22 16:49:11 +03:00
panel-newvision-nv3052c.c drm: panel: nv3052c: correct spi_device_id for RG35XX panel 2024-10-20 13:46:02 +03:00
panel-novatek-nt35510.c drm/panel: nt35510: Make new commands optional 2024-09-22 22:16:22 +02:00
panel-novatek-nt35560.c
panel-novatek-nt35950.c drm/panel: novatek-nt35950: fix return value check in nt35950_probe() 2024-12-13 10:51:39 +01:00
panel-novatek-nt36523.c drm/panel: novatek-nt36523: transition to mipi_dsi wrapped functions 2025-03-24 09:22:07 -07:00
panel-novatek-nt36672a.c
panel-novatek-nt36672e.c drm/panel: nt36672e: Break some CMDS into helper functions 2024-07-25 16:27:22 +02:00
panel-novatek-nt39016.c drm/panel: add missing MODULE_DESCRIPTION() macros 2024-06-10 10:35:00 +02:00
panel-olimex-lcd-olinuxino.c drm/panel: olimex-lcd-olinuxino: Don't call unprepare+disable at remove 2024-06-11 09:58:41 +02:00
panel-orisetech-ota5601a.c drm/panel: add missing MODULE_DESCRIPTION() macros 2024-06-10 10:35:00 +02:00
panel-orisetech-otm8009a.c drm/panel: panel-orisetech-otm8009a: Include <linux/mod_devicetable.h> 2024-12-13 15:21:02 +01:00
panel-osd-osd101t2587-53ts.c drm/panel: osd-osd101t2587-53ts: Don't call unprepare+disable at shutdown/remove 2024-06-11 09:58:42 +02:00
panel-panasonic-vvx10f034n00.c drm/panel: panasonic-vvx10f034n00: Don't call disable at shutdown/remove 2024-06-11 09:58:45 +02:00
panel-raspberrypi-touchscreen.c gpu: drm: replace of_graph_get_next_endpoint() 2024-11-12 13:05:35 +01:00
panel-raydium-rm692e5.c drm/panel: raydium-rm692e5: transition to mipi_dsi wrapped functions 2024-06-24 10:49:01 +02:00
panel-raydium-rm67191.c drm/panel: raydium-rm67191: Don't call unprepare+disable at shutdown 2024-06-11 09:58:49 +02:00
panel-raydium-rm67200.c drm/panel: add Raydium RM67200 panel driver 2025-02-27 09:43:16 +01:00
panel-raydium-rm68200.c
panel-raydium-rm69380.c drm/panel: raydium-rm69380: transition to mipi_dsi wrapped functions 2024-09-16 00:41:24 -07:00
panel-ronbo-rb070d30.c
panel-samsung-ams581vf01.c drm/panel: Add Samsung AMS581VF01 panel driver 2024-10-16 10:15:44 +02:00
panel-samsung-ams639rq08.c drm/panel: Add Samsung AMS639RQ08 panel driver 2024-10-09 09:51:29 +02:00
panel-samsung-atna33xc20.c
panel-samsung-db7430.c
panel-samsung-ld9040.c
panel-samsung-s6d7aa0.c drm/panel: samsung-s6d7aa0: transition to mipi_dsi wrapped functions 2025-03-24 09:19:49 -07:00
panel-samsung-s6d16d0.c
panel-samsung-s6d27a1.c
panel-samsung-s6e3fa7.c drm/panel: samsung-s6e3fa7: transition to mipi_dsi wrapped functions 2024-09-10 14:23:33 -07:00
panel-samsung-s6e3ha2.c drm/panel: panel-samsung-s6e3ha2: Use backlight power constants 2024-08-16 09:27:52 +02:00
panel-samsung-s6e3ha8.c drm/panel: s6e3ha8: add static modifier to supply list 2024-10-23 09:36:29 +02:00
panel-samsung-s6e8aa0.c
panel-samsung-s6e63j0x03.c drm/panel: panel-samsung-s6e3ha2: Include <linux/mod_devicetable.h> 2024-12-13 15:21:02 +01:00
panel-samsung-s6e63m0-dsi.c
panel-samsung-s6e63m0-spi.c
panel-samsung-s6e63m0.c drm/panel: panel-samsung-s6e63m0: Include <linux/property.h> 2024-12-13 15:21:02 +01:00
panel-samsung-s6e63m0.h
panel-samsung-s6e88a0-ams427ap24.c drm/panel: samsung-s6e88a0-ams427ap24: Add flip option 2024-10-31 10:36:36 +01:00
panel-samsung-s6e88a0-ams452ef01.c drm/panel: samsung-s6e88a0-ams452ef01: transition to mipi_dsi wrapped functions 2025-01-24 13:20:40 -08:00
panel-samsung-sofef00.c drm/panel: samsung-sofef00: Drop s6e3fc2x01 support 2025-04-22 09:40:14 +02:00
panel-seiko-43wvf1g.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
panel-sharp-lq101r1sx01.c drm/panel: sharp-lq101r1sx01: Fixed reversed "if" in remove 2024-07-09 08:24:05 -07:00
panel-sharp-ls037v7dw01.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
panel-sharp-ls043t1le01.c drm/panel/sharp-ls043t1le01: Use _multi variants 2025-03-30 20:11:46 +03:00
panel-sharp-ls060t1sx01.c drm/panel: sharp-ls060t1sx01: transition to mipi_dsi wrapped functions 2025-02-05 12:48:22 -08:00
panel-simple.c drm/panel: simple: add Tianma P0700WXF1MBAA panel 2025-04-17 17:38:18 +02:00
panel-sitronix-st7701.c drm/panel: st7701: Add prepare_prev_first flag to drm_panel 2024-12-13 10:51:56 +01:00
panel-sitronix-st7703.c drm/panel: sitronix-st7703: transition to mipi_dsi wrapped functions 2024-06-26 18:34:27 +02:00
panel-sitronix-st7789v.c drm/panel: sitronix-st7789v: Add check for of_drm_get_panel_orientation 2024-06-03 10:46:36 +02:00
panel-sony-acx565akm.c drm/panel: sony-acx565akm: Use %*ph to print small buffer 2024-09-13 11:11:02 +02:00
panel-sony-td4353-jdi.c drm/mipi-dsi: extend "multi" functions and use them in sony-td4353-jdi 2025-02-25 11:16:25 +01:00
panel-sony-tulip-truly-nt35521.c drm/panel: nt35521: Break some CMDS into helper functions 2024-07-25 16:27:22 +02:00
panel-startek-kd070fhfid015.c drm/panel: startek-kd070fhfid015: transition to mipi_dsi wrapped functions 2024-08-13 11:13:08 -07:00
panel-summit.c drm: panel: Add a panel driver for the Summit display 2025-02-25 11:18:33 +01:00
panel-synaptics-r63353.c drm/panel/synaptics-r63353: Use _multi variants 2025-03-24 09:26:10 -07:00
panel-tdo-tl070wsh30.c drm/panel: tdo-tl070wsh30: Don't call unprepare+disable at shutdown/remove 2024-06-11 09:58:43 +02:00
panel-tpo-td028ttec1.c
panel-tpo-td043mtea1.c
panel-tpo-tpg110.c
panel-truly-nt35597.c
panel-visionox-g2647fb105.c drm/panel: Add Visionox G2647FB105 panel driver 2025-04-17 17:39:09 +02:00
panel-visionox-r66451.c drm/panel: visionox-r66451: transition to mipi_dsi wrapped functions 2025-02-12 08:44:34 -08:00
panel-visionox-rm692e5.c drm/panel: Add Visionox RM692E5 panel driver 2025-02-27 09:43:38 +01:00
panel-visionox-rm69299.c drm/panel: visionox-rm69299: Remove redundant assignments of panel fields 2024-12-06 15:18:40 +08:00
panel-visionox-vtdr6130.c drm/panel: visionox-vtdr6130: switch to devm_regulator_bulk_get_const 2024-08-29 13:00:37 +02:00
panel-widechips-ws2401.c
panel-xinpeng-xpp055c272.c drm/panel: xinpeng-xpp055c272: transition to mipi_dsi wrapped functions 2025-01-13 08:22:30 -08:00