[PATCH 5/6][SRU][N] UBUNTU: SAUCE: dell_uart_backlight: size_t -> ssize_t

AceLan Kao acelan.kao at canonical.com
Wed Oct 1 04:39:08 UTC 2025


From: "Chia-Lin Kao (AceLan)" <acelan.kao at canonical.com>

BugLink: https://bugs.launchpad.net/bugs/2083800

The prototype will be changed after v6.9-rc1, but we don't want to
introduce this commit, because it affects all drivers which uses serdev.
fed99212acae ("treewide, serdev: change receive_buf() return type to size_t")
Manually change the backlight driver prototype to ssize_t to fix the issue.

drivers/platform/x86/dell/dell-uart-backlight.c:265:24: error: initialization of 'ssize_t (*)(struct serdev_device *, const u8 *, size_t)' {aka 'long int (*)(struct serdev_device *, const unsigned char *, long unsigned int)'} from incompatible pointer type 'size_t (*)(struct serdev_device *, const u8 *, size_t)' {aka 'long unsigned int (*)(struct serdev_device *, const unsigned char *, long unsigned int)'} [-Werror=incompatible-pointer-types]
  265 |         .receive_buf = dell_uart_bl_receive,
      |                        ^~~~~~~~~~~~~~~~~~~~

Signed-off-by: Chia-Lin Kao (AceLan) <acelan.kao at canonical.com>
---
 drivers/platform/x86/dell/dell-uart-backlight.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/x86/dell/dell-uart-backlight.c b/drivers/platform/x86/dell/dell-uart-backlight.c
index 87d2a20b4cb3d..f3bedb740e526 100644
--- a/drivers/platform/x86/dell/dell-uart-backlight.c
+++ b/drivers/platform/x86/dell/dell-uart-backlight.c
@@ -204,7 +204,7 @@ static const struct backlight_ops dell_uart_backlight_ops = {
 	.get_brightness = dell_uart_get_brightness_op,
 };
 
-static size_t dell_uart_bl_receive(struct serdev_device *serdev, const u8 *data, size_t len)
+static ssize_t dell_uart_bl_receive(struct serdev_device *serdev, const u8 *data, size_t len)
 {
 	struct dell_uart_backlight *dell_bl = serdev_device_get_drvdata(serdev);
 	size_t i;
-- 
2.43.0




More information about the kernel-team mailing list