ruckman@rdsrv403:~/projects/aes-stream-drivers/data_dev/driver$ uname -a
Linux rdsrv403 6.5.0-14-generic #14~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Nov 20 18:15:30 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
ruckman@rdsrv403:~/projects/aes-stream-drivers/data_dev/driver$ make
5.19.2-2-g33f2dbb
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/6.5.0-14-generic/build M=/afs/slac.stanford.edu/u/re/ruckman/projects/aes-stream-drivers/data_dev/driver modules
make[1]: Entering directory '/usr/src/linux-headers-6.5.0-14-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] /afs/slac.stanford.edu/u/re/ruckman/projects/aes-stream-drivers/data_dev/driver/src/dma_buffer.o
CC [M] /afs/slac.stanford.edu/u/re/ruckman/projects/aes-stream-drivers/data_dev/driver/src/dma_common.o
In file included from ./include/linux/linkage.h:7,
from ./arch/x86/include/asm/cache.h:5,
from ./include/linux/cache.h:6,
from ./include/linux/time.h:5,
from ./include/linux/ktime.h:24,
from ./include/linux/poll.h:7,
from /afs/slac.stanford.edu/u/re/ruckman/projects/aes-stream-drivers/data_dev/driver/src/dma_common.h:25,
from /afs/slac.stanford.edu/u/re/ruckman/projects/aes-stream-drivers/data_dev/driver/src/dma_common.c:23:
/afs/slac.stanford.edu/u/re/ruckman/projects/aes-stream-drivers/data_dev/driver/src/dma_common.c: In function ‘Dma_Init’:
./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 *
/afs/slac.stanford.edu/u/re/ruckman/projects/aes-stream-drivers/data_dev/driver/src/dma_common.c:163:31: note: in expansion of macro ‘THIS_MODULE’
163 | if ((gCl = class_create(THIS_MODULE, dev->devName)) == NULL) {
| ^~~~~~~~~~~
In file included from ./include/linux/device.h:31,
from ./include/linux/cdev.h:8,
from /afs/slac.stanford.edu/u/re/ruckman/projects/aes-stream-drivers/data_dev/driver/src/dma_common.h:26:
./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);
| ~~~~~~~~~~~~^~~~
/afs/slac.stanford.edu/u/re/ruckman/projects/aes-stream-drivers/data_dev/driver/src/dma_common.c:163:18: error: too many arguments to function ‘class_create’
163 | if ((gCl = class_create(THIS_MODULE, dev->devName)) == NULL) {
| ^~~~~~~~~~~~
./include/linux/device/class.h:230:29: note: declared here
230 | struct class * __must_check class_create(const char *name);
| ^~~~~~~~~~~~
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:251: /afs/slac.stanford.edu/u/re/ruckman/projects/aes-stream-drivers/data_dev/driver/src/dma_common.o] Error 1
make[2]: *** [/usr/src/linux-headers-6.5.0-14-generic/Makefile:2037: /afs/slac.stanford.edu/u/re/ruckman/projects/aes-stream-drivers/data_dev/driver] Error 2
make[1]: *** [Makefile:234: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.5.0-14-generic'
make: *** [Makefile:43: all] Error 2