Compilation error on Kernel 6.5.5
ich777 opened this issue · 1 comments
ich777 commented
Hi,
I'm encountering a compilation error on Kernel 6.5.5, can you please look into this:
Driver file (in) : /usr/src/px4_drv/fwtool/PXW3U4.sys
Firmware file (out) : /PX4DRV/lib/firmware/it930x-firmware.bin
Driver description: PX-W3U4 BDA Ver.1.0 64bit
Firmware length: 2169 bytes
Firmware CRC32: 0b41a994
OK.
Your branch is up to date with 'origin/develop'.
gcc -O2 -Wall -c -o fwtool.o fwtool.c
gcc -O2 -Wall -c -o tsv.o tsv.c
gcc -O2 -Wall -c -o crc32.o crc32.c
gcc -o fwtool fwtool.o tsv.o crc32.o
Archive: /usr/src/pxw3u4_BDA_ver1x64.zip
Made with MacWinZipper (http://tidajapan.com/macwinzipper)
inflating: PXW3U4.sys
'revision.h' was updated.
make[1]: Entering directory '/usr/src/linux-6.5.5-Unraid'
In file included from ./include/linux/linkage.h:7,
from ./include/linux/preempt.h:10,
from ./include/linux/spinlock.h:56,
from ./include/linux/kref.h:16,
from /usr/src/px4_drv/driver/ptx_chrdev.h:13,
from /usr/src/px4_drv/driver/ptx_chrdev.c:9:
/usr/src/px4_drv/driver/ptx_chrdev.c: In function 'ptx_chrdev_context_create':
./include/linux/export.h:29:22: error: passing argument 1 of 'class_create' from incompatible pointer type [-Werror=incompatible-pointer-types]
29 | #define THIS_MODULE (&__this_module)
| ~^~~~~~~~~~~~~~~
| |
| struct module *
/usr/src/px4_drv/driver/ptx_chrdev.c:573:35: note: in expansion of macro 'THIS_MODULE'
573 | ctx->class = class_create(THIS_MODULE, name);
| ^~~~~~~~~~~
In file included from ./include/linux/device.h:31,
from ./include/linux/cdev.h:8,
from /usr/src/px4_drv/driver/ptx_chrdev.h:16,
from /usr/src/px4_drv/driver/ptx_chrdev.c:9:
./include/linux/device/class.h:230:54: note: expected 'const char *' but argument is of type 'struct module *'
230 | struct class * __must_check class_create(const char *name);
| ~~~~~~~~~~~~^~~~
/usr/src/px4_drv/driver/ptx_chrdev.c:573:22: error: too many arguments to function 'class_create'
573 | ctx->class = class_create(THIS_MODULE, name);
| ^~~~~~~~~~~~
In file included from ./include/linux/device.h:31,
from ./include/linux/cdev.h:8,
from /usr/src/px4_drv/driver/ptx_chrdev.h:16,
from /usr/src/px4_drv/driver/ptx_chrdev.c:9:
./include/linux/device/class.h:230:29: note: declared here
230 | struct class * __must_check class_create(const char *name);
| ^~~~~~~~~~~~
In file included from ./include/linux/device.h:15,
from /usr/src/px4_drv/driver/px4_usb.c:17:
/usr/src/px4_drv/driver/px4_usb.c: In function 'px4_usb_probe':
./include/linux/dev_printk.h:150:31: warning: this statement may fall through [-Wimplicit-fallthrough=]
150 | dev_printk_index_wrap(_dev_info, KERN_INFO, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^
./include/linux/dev_printk.h:110:17: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~~~~~
/usr/src/px4_drv/driver/px4_usb.c:120:25: note: in expansion of macro 'dev_info'
120 | dev_info(dev, "Multi-device power control: %s\n",
| ^~~~~~~~
/usr/src/px4_drv/driver/px4_usb.c:123:17: note: here
123 | case USB_PID_PX_W3U4:
| ^~~~
/usr/src/px4_drv/driver/px4_usb.c:139:38: warning: this statement may fall through [-Wimplicit-fallthrough=]
139 | pxmlt5_model = PXMLT5U_MODEL;
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~
/usr/src/px4_drv/driver/px4_usb.c:141:17: note: here
141 | case USB_PID_PX_MLT5PE:
| ^~~~
/usr/src/px4_drv/driver/px4_usb.c:154:38: warning: this statement may fall through [-Wimplicit-fallthrough=]
154 | pxmlt8_model = PXMLT8PE3_MODEL;
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/usr/src/px4_drv/driver/px4_usb.c:156:17: note: here
156 | case USB_PID_PX_MLT8PE5:
| ^~~~
cc1: some warnings being treated as errors
Cheers,
Christoph