Open deelerke opened 2 years ago
I have found a solution/workaround myself:
add "-Wno-incompatible-pointer-types" to the Makefile like this
ccflags-y := -Wno-multichar -Wno-incompatible-pointer-types
can this be rather a gcc10 error ?
hi. https://github.com/xmm7360/xmm7360-pci/issues/137 the same closed issue on Manjaro
the same closed issue on Arch……
我自己找到了解决方案/解决方法:
将“-Wno-incompatible-pointer-types”添加到 Makefile 像这样
ccflags-y := -Wno-multichar -Wno-incompatible-pointer-types
这可能是一个 gcc10 错误吗?
After I operated according to your method, the following errors were reported:
rmmod: ERROR: Module xmm7360 is not currently loaded make: [Makefile:18:load] Error 1 (Ignored) sudo /sbin/insmod xmm7360.ko
Correct solution is to correct bug, not turn warnings off.
I tried to compile it on OpenSuSE Tumbleweed with kernel 5.14.9. I hit the same error. After the patch below it compiles and loads cleanly:
--- xmm7360.c.orig 2021-10-15 12:12:12 +0000
+++ xmm7360.c 2021-10-15 13:13:13 +0000
@@ -1272,7 +1272,7 @@
return written;
}
-static int xmm7360_tty_write_room(struct tty_struct *tty)
+static unsigned int xmm7360_tty_write_room(struct tty_struct *tty)
{
struct queue_pair *qp = tty->driver_data;
if (!xmm7360_qp_can_write(qp))
正确的解决方案是纠正错误,而不是关闭警告。
我尝试使用内核 5.14.9 在 OpenSuSE Tumbleweed 上编译它。 我遇到了同样的错误。 在下面的补丁之后,它编译并干净地加载:
--- xmm7360.c.orig 2021-10-15 12:12:12 +0000 +++ xmm7360.c 2021-10-15 13:13:13 +0000 @@ -1272,7 +1272,7 @@ return written; } -static int xmm7360_tty_write_room(struct tty_struct *tty) +static unsigned int xmm7360_tty_write_room(struct tty_struct *tty) { struct queue_pair *qp = tty->driver_data; if (!xmm7360_qp_can_write(qp))
Thank you for your solution. This is a very good solution. I have successfully compiled it. Now the trouble is that you have to do it again every time you start up to identify the device. In addition, Lenovo is really a bad company.
HP the same :) no difference .
сб, 16 окт. 2021 г., 04:31 MingYu @.***>:
正确的解决方案是纠正错误,而不是关闭警告。
我尝试使用内核 5.14.9 在 OpenSuSE Tumbleweed 上编译它。 我遇到了同样的错误。 在下面的补丁之后,它编译并干净地加载:
--- xmm7360.c.orig 2021-10-15 12:12:12 +0000
+++ xmm7360.c 2021-10-15 13:13:13 +0000
@@ -1272,7 +1272,7 @@
return written;
}
-static int xmm7360_tty_write_room(struct tty_struct *tty)
+static unsigned int xmm7360_tty_write_room(struct tty_struct *tty)
{
struct queue_pair *qp = tty->driver_data; if (!xmm7360_qp_can_write(qp))
Thank you for your solution. This is a very good solution. I have successfully compiled it. Now the trouble is that you have to do it again every time you start up to identify the device. In addition, Lenovo is really a bad company.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/xmm7360/xmm7360-pci/issues/141#issuecomment-944834209, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGK6FGVWIIRX57ROB63H6JDUHDIV7ANCNFSM5ERBWA3A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Hey @deelerke @my2018
Now that these fixes have been merged, Can you please test that the master branch builds and works well with your current kernel versions?
Hey, I;m having a similar issue with an EPSOLAR Charge controller, when compiling the driver I get the following error.
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] 1711 | .write =
xr_usb_serial_tty_write,`
I've tried making it so that the write_room function is unsigned, and cant find the edit for making the driver write actually work. How would I solve this?
Hi all, I'm having this error on my freshly updated debian system now running 5.14
root@bewardeb:/home/deeler/xmm7360-pci# make && make load make -C /lib/modules/5.14.0-1-amd64/build M=/home/deeler/xmm7360-pci modules make[1]: Entering directory '/usr/src/linux-headers-5.14.0-1-amd64' CC [M] /home/deeler/xmm7360-pci/xmm7360.o /home/deeler/xmm7360-pci/xmm7360.c:1322:16: error: initialization of ‘unsigned int ()(struct tty_struct )’ from incompatible pointer type ‘int ()(struct tty_struct )’ [-Werror=incompatible-pointer-types] 1322 | .write_room = xmm7360_tty_write_room, | ^
~~~~~ /home/deeler/xmm7360-pci/xmm7360.c:1322:16: note: (near initialization for ‘xmm7360_tty_ops.write_room’) cc1: some warnings being treated as errors make[3]: [/usr/src/linux-headers-5.14.0-1-common/scripts/Makefile.build:276: /home/deeler/xmm7360-pci/xmm7360.o] Error 1 make[2]: [/usr/src/linux-headers-5.14.0-1-common/Makefile:1882: /home/deeler/xmm7360-pci] Error 2 make[1]: [/usr/src/linux-headers-5.14.0-1-common/Makefile:232: __sub-make] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-5.14.0-1-amd64' make: [Makefile:9: default] Error 2 root@bewardeb:/home/deeler/xmm7360-pci#