Skip to content

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

@AEW2015

Description

@AEW2015

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions