Building driver...
If you want to use secure communication with target,
you might choose [y] to enable the SSL function.
Note: This function support RealCOM with secure mode only.
Do you want to enable secure function? [y/N].
n
make -C /lib/modules/5.15.6-100.fc34.x86_64/build M=/home/user/WORK/moxa2/moxa EXTRA_CFLAGS=" -DTTYNAME='"ttyr"'" modules
make[1]: Entering directory '/usr/src/kernels/5.15.6-100.fc34.x86_64'
CC [M] /home/user/WORK/moxa2/moxa/npreal2.o
/home/user/WORK/moxa2/moxa/npreal2.c:490:31: error: initialization of ‘unsigned int (*)(struct tty_struct *)’ from incompatible pointer type ‘int (*)(struct tty_struct *)’ [-Werror=incompatible-pointer-types]
490 | .write_room = npreal_write_room,
| ^~~~~~~~~~~~~~~~~
/home/user/WORK/moxa2/moxa/npreal2.c:490:31: note: (near initialization for ‘mpvar_ops.write_room’)
/home/user/WORK/moxa2/moxa/npreal2.c:491:36: error: initialization of ‘unsigned int (*)(struct tty_struct *)’ from incompatible pointer type ‘int (*)(struct tty_struct *)’ [-Werror=incompatible-pointer-types]
491 | .chars_in_buffer = npreal_chars_in_buffer,
| ^~~~~~~~~~~~~~~~~~~~~~
/home/user/WORK/moxa2/moxa/npreal2.c:491:36: note: (near initialization for ‘mpvar_ops.chars_in_buffer’)
/home/user/WORK/moxa2/moxa/npreal2.c: In function ‘npreal2_module_exit’:
/home/user/WORK/moxa2/moxa/npreal2.c:570:9: error: implicit declaration of function ‘put_tty_driver’ [-Werror=implicit-function-declaration]
570 | put_tty_driver(DRV_VAR);
| ^~~~~~~~~~~~~~
/home/user/WORK/moxa2/moxa/npreal2.c: In function ‘npreal_init’:
/home/user/WORK/moxa2/moxa/npreal2.c:663:25: error: implicit declaration of function ‘alloc_tty_driver’ [-Werror=implicit-function-declaration]
663 | npvar_sdriver = alloc_tty_driver(NPREAL_PORTS+1);
| ^~~~~~~~~~~~~~~~
/home/user/WORK/moxa2/moxa/npreal2.c:663:23: warning: assignment to ‘struct tty_driver *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
663 | npvar_sdriver = alloc_tty_driver(NPREAL_PORTS+1);
| ^
/home/user/WORK/moxa2/moxa/npreal2.c: In function ‘npreal_close’:
/home/user/WORK/moxa2/moxa/npreal2.c:1065:34: error: ‘struct task_struct’ has no member named ‘state’; did you mean ‘__state’?
1065 | current->state = TASK_INTERRUPTIBLE;
| ^~~~~
| __state
/home/user/WORK/moxa2/moxa/npreal2.c: In function ‘npreal_ldisc_flush_buffer’:
/home/user/WORK/moxa2/moxa/npreal2.c:1326:18: error: ‘struct task_struct’ has no member named ‘state’; did you mean ‘__state’?
1326 | current->state = TASK_INTERRUPTIBLE;
| ^~~~~
| __state
/home/user/WORK/moxa2/moxa/npreal2.c: In function ‘npreal_ioctl’:
/home/user/WORK/moxa2/moxa/npreal2.c:1434:26: error: ‘struct task_struct’ has no member named ‘state’; did you mean ‘__state’?
1434 | current->state = TASK_RUNNING;
| ^~~~~
| __state
/home/user/WORK/moxa2/moxa/npreal2.c: In function ‘npreal_block_til_ready’:
/home/user/WORK/moxa2/moxa/npreal2.c:1755:18: error: ‘struct task_struct’ has no member named ‘state’; did you mean ‘__state’?
1755 | current->state = TASK_RUNNING;
| ^~~~~
| __state
/home/user/WORK/moxa2/moxa/npreal2.c: In function ‘npreal_startup’:
/home/user/WORK/moxa2/moxa/npreal2.c:1792:18: error: ‘struct task_struct’ has no member named ‘state’; did you mean ‘__state’?
1792 | current->state = TASK_RUNNING;
| ^~~~~
| __state
/home/user/WORK/moxa2/moxa/npreal2.c:1939:34: error: ‘struct task_struct’ has no member named ‘state’; did you mean ‘__state’?
1939 | current->state = TASK_INTERRUPTIBLE;
| ^~~~~
| __state
/home/user/WORK/moxa2/moxa/npreal2.c: In function ‘npreal_shutdown’:
/home/user/WORK/moxa2/moxa/npreal2.c:2052:26: error: ‘struct task_struct’ has no member named ‘state’; did you mean ‘__state’?
2052 | current->state = TASK_INTERRUPTIBLE;
| ^~~~~
| __state
/home/user/WORK/moxa2/moxa/npreal2.c: In function ‘npreal_wait_and_set_command’:
/home/user/WORK/moxa2/moxa/npreal2.c:3935:34: error: ‘struct task_struct’ has no member named ‘state’; did you mean ‘__state’?
3935 | current->state = TASK_INTERRUPTIBLE;
| ^~~~~
| __state
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:277: /home/user/WORK/moxa2/moxa/npreal2.o] Error 1
make[1]: *** [Makefile:1872: /home/user/WORK/moxa2/moxa] Error 2
make[1]: Leaving directory '/usr/src/kernels/5.15.6-100.fc34.x86_64'
make: *** [Makefile:75: module] Error 2
FAILED !!! Please check above message.