$ uname -r
6.6.6-76060606-generic
$ make
make -C /lib/modules/6.6.6-76060606-generic/build M=/home/keith/src/open/ch341ser_linux/driver
make[1]: Entering directory '/usr/src/linux-headers-6.6.6-76060606-generic'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
You are using: gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
CC [M] /home/keith/src/open/ch341ser_linux/driver/ch341.o
/home/keith/src/open/ch341ser_linux/driver/ch341.c:1460:18: error: initialization of ‘ssize_t (*)(struct tty_struct *, const u8 *, size_t)’ {aka ‘long int (*)(struct tty_struct *, const unsigned char *, long unsigned int)’} from incompatible pointer type ‘int (*)(struct tty_struct *, const unsigned char *, int)’ [-Werror=incompatible-pointer-types]
1460 | .write = ch341_tty_write,
| ^~~~~~~~~~~~~~~
/home/keith/src/open/ch341ser_linux/driver/ch341.c:1460:18: note: (near initialization for ‘ch341_ops.write’)
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:243: /home/keith/src/open/ch341ser_linux/driver/ch341.o] Error 1
make[2]: *** [/usr/src/linux-headers-6.6.6-76060606-generic/Makefile:1919: /home/keith/src/open/ch341ser_linux/driver] Error 2
make[1]: *** [Makefile:234: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.6.6-76060606-generic'
make: *** [Makefile:5: default] Error 2
In 6.6, the signature for the tty write operation changed.
In 6.6, the signature for the tty write operation changed.
https://docs.kernel.org/6.6/driver-api/tty/tty_driver.html#c.tty_operations