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

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

Open
AEW2015 opened this issue May 15, 2024 · 1 comment
Open

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

AEW2015 opened this issue May 15, 2024 · 1 comment

Comments

@AEW2015
Copy link

AEW2015 commented May 15, 2024

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 AEW2015 changed the title Ubuntu 24.04 [-Werror=incompatible-pointer-types Ubuntu 24.04 -Werror=incompatible-pointer-types May 15, 2024
@AEW2015
Copy link
Author

AEW2015 commented May 15, 2024

#252 worked for me

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

1 participant