From fb8fa05e54bf88e735c31177dead3ee283ef8766 Mon Sep 17 00:00:00 2001 From: Marc Fournier Date: Mon, 22 Apr 2024 07:51:35 +0200 Subject: [PATCH 1/2] fix compiler warning with kernel version 6.6 --- xmm7360.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xmm7360.c b/xmm7360.c index 1b5a90c..e24d1a3 100644 --- a/xmm7360.c +++ b/xmm7360.c @@ -1278,8 +1278,13 @@ static void xmm7360_tty_close(struct tty_struct *tty, struct file *filp) tty_port_close(&qp->port, tty, filp); } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 6, 0) +static long int xmm7360_tty_write(struct tty_struct *tty, + const unsigned char *buffer, long unsigned int count) +#else static int xmm7360_tty_write(struct tty_struct *tty, const unsigned char *buffer, int count) +#endif { struct queue_pair *qp = tty->driver_data; int written; From 3259b38e35ba72319c2c8a52ed57bccf7399c6e3 Mon Sep 17 00:00:00 2001 From: Marc Fournier Date: Tue, 11 Jun 2024 17:30:14 +0200 Subject: [PATCH 2/2] kernel 6.6: use ssize_t/size_t --- xmm7360.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xmm7360.c b/xmm7360.c index e24d1a3..a32b29f 100644 --- a/xmm7360.c +++ b/xmm7360.c @@ -1279,8 +1279,8 @@ static void xmm7360_tty_close(struct tty_struct *tty, struct file *filp) } #if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 6, 0) -static long int xmm7360_tty_write(struct tty_struct *tty, - const unsigned char *buffer, long unsigned int count) +static ssize_t xmm7360_tty_write(struct tty_struct *tty, + const unsigned char *buffer, size_t count) #else static int xmm7360_tty_write(struct tty_struct *tty, const unsigned char *buffer, int count)