Xilinx / dma_ip_drivers

Xilinx QDMA IP Drivers
https://xilinx.github.io/dma_ip_drivers/
526 stars 398 forks source link

Ubuntu 24.04 -Werror=incompatible-pointer-types #279

Open AEW2015 opened 1 month ago

AEW2015 commented 1 month ago

Fresh install of Ubuntu 24.04 and other AMD-Xilinx tools installed.

Any clue how to resolve this?

                 from ./include/linux/kernel.h:31,
                 from /home/farmer/dma_ip_drivers/XDMA/linux-kernel/xdma/xdma_cdev.h:23,
                 from /home/farmer/dma_ip_drivers/XDMA/linux-kernel/xdma/xdma_cdev.c:22:
/home/farmer/dma_ip_drivers/XDMA/linux-kernel/xdma/xdma_cdev.c: In function ‘xdma_cdev_init’:
./include/linux/init.h:184:22: error: passing argument 1 of ‘class_create’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  184 | #define THIS_MODULE (&__this_module)
      |                     ~^~~~~~~~~~~~~~~
      |                      |
      |                      struct module *
/home/farmer/dma_ip_drivers/XDMA/linux-kernel/xdma/xdma_cdev.c:606:37: note: in expansion of macro ‘THIS_MODULE’
  606 |         g_xdma_class = class_create(THIS_MODULE, XDMA_NODE_NAME);
      |                                     ^~~~~~~~~~~
In file included from ./include/linux/device.h:31,
                 from ./include/linux/cdev.h:8,
                 from /home/farmer/dma_ip_drivers/XDMA/linux-kernel/xdma/xdma_mod.h:25,
                 from /home/farmer/dma_ip_drivers/XDMA/linux-kernel/xdma/xdma_cdev.h:27:
./include/linux/device/class.h:228:54: note: expected ‘const char *’ but argument is of type ‘struct module *’
  228 | struct class * __must_check class_create(const char *name);
      |                                          ~~~~~~~~~~~~^~~~
/home/farmer/dma_ip_drivers/XDMA/linux-kernel/xdma/xdma_cdev.c:606:24: error: too many arguments to function ‘class_create’
  606 |         g_xdma_class = class_create(THIS_MODULE, XDMA_NODE_NAME);
      |                        ^~~~~~~~~~~~
./include/linux/device/class.h:228:29: note: declared here
  228 | struct class * __must_check class_create(const char *name);
      |                             ^~~~~~~~~~~~
cc1: some warnings being treated as errors
AEW2015 commented 1 month ago

252 worked for me