Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
1.8 kB
1
Indexable
/home/kilian/BSP/Aufgabe_4/devicenodes/devnun.c: In function ‘my_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 *
/home/kilian/BSP/Aufgabe_4/devicenodes/devnun.c:111:29: note: in expansion of macro ‘THIS_MODULE’
  111 |     my_class = class_create(THIS_MODULE, MODULE_NAME);
      |                             ^~~~~~~~~~~
In file included from ./include/linux/device.h:31,
                 from ./include/linux/cdev.h:8,
                 from /home/kilian/BSP/Aufgabe_4/devicenodes/devnun.c:5:
./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);
      |                                          ~~~~~~~~~~~~^~~~
/home/kilian/BSP/Aufgabe_4/devicenodes/devnun.c:111:16: error: too many arguments to function ‘class_create’
  111 |     my_class = class_create(THIS_MODULE, MODULE_NAME);
      |                ^~~~~~~~~~~~
./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: /home/kilian/BSP/Aufgabe_4/devicenodes/devnun.o] Error 1
make[2]: *** [/usr/src/linux-headers-6.5.0-14-generic/Makefile:2037: /home/kilian/BSP/Aufgabe_4/devicenodes] 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:4: all] Error 2
Leave a Comment