[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240210215147.77629-2-michael.zaidman@gmail.com>
Date: Sat, 10 Feb 2024 23:51:29 +0200
From: Michael Zaidman <michael.zaidman@...il.com>
To: chrysh@...istina-quast.de,
daniel.beer@...rinstitute.com,
jikos@...nel.org
Cc: linux-kernel@...r.kernel.org,
linux-input@...r.kernel.org,
linux-serial@...r.kernel.org,
ilpo.jarvinen@...ux.intel.com,
johan@...nel.org,
gregkh@...uxfoundation.org,
equinox@...c24.net,
michael.zaidman@...il.com
Subject: [PATCH v1 01/19] hid-ft260: fix incompatible-pointer-types error
Fixed compilation error introduced by "hid-ft260: Add serial driver" patch
https://lore.kernel.org/all/20231218093153.192268-1-contact@christina-quast.de/
You are using: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0
CC [M] /home/michael/sw/hid-ft260/hid-ft260.o
/home/michael/sw/hid-ft260/hid-ft260.c:1426:35: error: initialization of ‘int (*)(struct tty_struct *,
const unsigned char *, int)’ from incompatible pointer type ‘ssize_t (*)(struct tty_struct *,
const unsigned char *, size_t)’ {aka ‘long int (*)(struct tty_struct *, const unsigned char *,
long unsigned int)’} [-Werror=incompatible-pointer-types]
1426 | .write = ft260_uart_write,
| ^~~~~~~~~~~~~~~~
/home/michael/sw/hid-ft260/hid-ft260.c:1426:35: note: (near initialization for ‘ft260_uart_ops.write’)
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:251: /home/michael/sw/hid-ft260/hid-ft260.o] Error 1
make[2]: *** [/usr/src/linux-headers-6.5.0-14-generic/Makefile:2037: /home/michael/sw/hid-ft260] Error 2
make[1]: *** [Makefile:234: __sub-make] Error 2
Signed-off-by: Michael Zaidman <michael.zaidman@...il.com>
---
drivers/hid/hid-ft260.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/hid/hid-ft260.c b/drivers/hid/hid-ft260.c
index cc2cce3698e3..7273d401337a 100644
--- a/drivers/hid/hid-ft260.c
+++ b/drivers/hid/hid-ft260.c
@@ -1220,8 +1220,8 @@ static int ft260_uart_receive_chars(struct ft260_device *port,
return ret;
}
-static ssize_t ft260_uart_write(struct tty_struct *tty, const unsigned char *buf,
- size_t count)
+static int ft260_uart_write(struct tty_struct *tty, const unsigned char *buf,
+ int count)
{
struct ft260_device *port = tty->driver_data;
struct hid_device *hdev = port->hdev;
--
2.40.1
Powered by blists - more mailing lists