linux/drivers/gpu/drm/tiny
Nathan Chancellor 0265d0ebb4 drm/pixpaper: Fix return type of pixpaper_mode_valid()
When building with -Wincompatible-function-pointer-types-strict, a
warning designed to catch kernel control flow integrity (kCFI) issues at
build time, there is an instance in the new tiny DRM pixpaper driver:

  drivers/gpu/drm/tiny/pixpaper.c:982:16: error: incompatible function pointer types initializing 'enum drm_mode_status (*)(struct drm_crtc *, const struct drm_display_mode *)' with an expression of type 'int (struct drm_crtc *, const struct drm_display_mode *)' [-Werror,-Wincompatible-function-pointer-types-strict]
    982 |         .mode_valid = pixpaper_mode_valid,
        |                       ^~~~~~~~~~~~~~~~~~~

While 'int' and 'enum drm_mode_status' are ABI compatible, hence no
regular warning from -Wincompatible-function-pointer-types, the mismatch
will trigger a kCFI violation when pixpaper_mode_valid() is called
indirectly.

Update the return type of pixpaper_mode_valid() to be
'enum drm_mode_status' to clear up the warning and kCFI violation.

Fixes: c9e70639f5 ("drm: tiny: Add support for Mayqueen Pixpaper e-ink panel")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://lore.kernel.org/r/20250908-drm-pixpaper-fix-mode_valid-return-type-v1-1-705ceaf03757@kernel.org
2025-09-15 12:29:37 +02:00
..
appletbdrm.c drm/appletbdrm: use %p4cl instead of %p4cc 2025-04-21 10:18:30 -04:00
arcpgu.c drm/tiny: move to devm_platform_ioremap_resource() usage 2025-02-26 15:27:08 +01:00
bochs.c drm/tiny/bochs: Convert dev_err() to drm_err() 2025-09-08 14:50:35 +02:00
cirrus-qemu.c drm/cirrus: Use non-hybrid PCI devres API 2025-05-09 10:34:40 +02:00
gm12u320.c drm/gm12u320: Set struct drm_device.dma_dev 2025-03-12 09:03:55 +01:00
hx8357d.c drm: remove driver date from struct drm_driver and all drivers 2024-12-05 12:35:42 +02:00
ili9163.c drm: remove driver date from struct drm_driver and all drivers 2024-12-05 12:35:42 +02:00
ili9225.c drm: remove driver date from struct drm_driver and all drivers 2024-12-05 12:35:42 +02:00
ili9341.c drm: remove driver date from struct drm_driver and all drivers 2024-12-05 12:35:42 +02:00
ili9486.c drm: remove driver date from struct drm_driver and all drivers 2024-12-05 12:35:42 +02:00
Kconfig drm: tiny: Add support for Mayqueen Pixpaper e-ink panel 2025-09-05 14:53:07 +02:00
Makefile drm: tiny: Add support for Mayqueen Pixpaper e-ink panel 2025-09-05 14:53:07 +02:00
mi0283qt.c drm: remove driver date from struct drm_driver and all drivers 2024-12-05 12:35:42 +02:00
panel-mipi-dbi.c drm/tiny: panel-mipi-dbi: Use drm_client_setup_with_fourcc() 2025-05-12 08:57:04 +02:00
pixpaper.c drm/pixpaper: Fix return type of pixpaper_mode_valid() 2025-09-15 12:29:37 +02:00
repaper.c drm/repaper: Do not access GEM-DMA vaddr directly 2025-08-11 18:49:05 +02:00
sharp-memory.c drm/sharp-memory: Do not access GEM-DMA vaddr directly 2025-08-11 18:49:55 +02:00