Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debian buster build error #4

Open
KnightSch opened this issue Sep 22, 2021 · 2 comments
Open

debian buster build error #4

KnightSch opened this issue Sep 22, 2021 · 2 comments

Comments

@KnightSch
Copy link

error information:

make -C /lib/modules/4.19.0-17-amd64/build M=/home/ys/workdir/ch343ser_linux/driver
make[1]: 进入目录“/usr/src/linux-headers-4.19.0-17-amd64”
CC [M] /home/ys/workdir/ch343ser_linux/driver/ch343.o
In file included from /usr/src/linux-headers-4.19.0-17-common/include/linux/bitops.h:19,
from /usr/src/linux-headers-4.19.0-17-common/include/linux/kernel.h:11,
from /home/ys/workdir/ch343ser_linux/driver/ch343.c:26:
/home/ys/workdir/ch343ser_linux/driver/ch343.c: In function ‘ch343_resume’:
/home/ys/workdir/ch343ser_linux/driver/ch343.c:2332:15: error: ‘ASYNCB_INITIALIZED’ undeclared (first use in this function); did you mean ‘RCU_INITIALIZER’?
if (test_bit(ASYNCB_INITIALIZED, &ch343->port.flags)) {
^~~~~~~~~~~~~~~~~~
/usr/src/linux-headers-4.19.0-17-common/arch/x86/include/asm/bitops.h:342:25: note: in definition of macro ‘test_bit’
(__builtin_constant_p((nr))
^~
/home/ys/workdir/ch343ser_linux/driver/ch343.c:2332:15: note: each undeclared identifier is reported only once for each function it appears in
if (test_bit(ASYNCB_INITIALIZED, &ch343->port.flags)) {
^~~~~~~~~~~~~~~~~~
/usr/src/linux-headers-4.19.0-17-common/arch/x86/include/asm/bitops.h:342:25: note: in definition of macro ‘test_bit’
(__builtin_constant_p((nr))
^~
/home/ys/workdir/ch343ser_linux/driver/ch343.c: In function ‘ch343_reset_resume’:
/home/ys/workdir/ch343ser_linux/driver/ch343.c:2363:15: error: ‘ASYNCB_INITIALIZED’ undeclared (first use in this function); did you mean ‘RCU_INITIALIZER’?
if (test_bit(ASYNCB_INITIALIZED, &ch343->port.flags))
^~~~~~~~~~~~~~~~~~
/usr/src/linux-headers-4.19.0-17-common/arch/x86/include/asm/bitops.h:342:25: note: in definition of macro ‘test_bit’
(__builtin_constant_p((nr))
^~
make[4]: *** [/usr/src/linux-headers-4.19.0-17-common/scripts/Makefile.build:315:/home/ys/workdir/ch343ser_linux/driver/ch343.o] 错误 1
make[3]: *** [/usr/src/linux-headers-4.19.0-17-common/Makefile:1562:module/home/ys/workdir/ch343ser_linux/driver] 错误 2
make[2]: *** [Makefile:146:sub-make] 错误 2
make[1]: *** [Makefile:8:all] 错误 2
make[1]: 离开目录“/usr/src/linux-headers-4.19.0-17-amd64”
make: *** [Makefile:5:default] 错误 2

@megastorage
Copy link

Dear,

I solve it on my debian and mageia.

I replace in the line 2332 and 2363 in ch343.c

ASYNCB_INITIALIZED => tty_port_initialized

Best regards,
Stéphane.

@archie83
Copy link

I tried Stéphane's fix, but I got this error message:
ch343.c:2363:15: warning: passing argument 1 of ‘test_bit’ makes integer from pointer without a cast [-Wint-conversion]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants