Skip to content

[PATCH] Fails to build with GCC 14.1.1: error: too many arguments to function call, expected single argument 'name', have 2 arguments #11

Description

@dreirund

Patch in this comment


With GCC 14.1.1/ Linux 6.8 and 6.9, I get the following build error:

make -C /lib/modules/6.8.10-vanilla-customconfig-clang/build M=/var/lib/dkms/dev_one/r15.20230110.0171589/build modules
make[1]: Entering directory '/usr/lib/modules/6.8.10-vanilla-customconfig-clang/build'
  CC [M]  /var/lib/dkms/dev_one/r15.20230110.0171589/build/one.o
/var/lib/dkms/dev_one/r15.20230110.0171589/build/one.c:69:41: error: too many arguments to function call, expected single argument 'name', have 2 arguments
   69 |     if ((cl = class_create(THIS_MODULE, "chardrv")) == NULL) {
      |               ~~~~~~~~~~~~              ^~~~~~~~~
./include/linux/device/class.h:228:29: note: 'class_create' declared here
  228 | struct class * __must_check class_create(const char *name);
      |                             ^            ~~~~~~~~~~~~~~~~
/var/lib/dkms/dev_one/r15.20230110.0171589/build/one.c:51:5: warning: no previous prototype for function 'register_device' [-Wmissing-prototypes]
   51 | int register_device(void) {
      |     ^
/var/lib/dkms/dev_one/r15.20230110.0171589/build/one.c:51:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   51 | int register_device(void) {
      | ^
      | static 
/var/lib/dkms/dev_one/r15.20230110.0171589/build/one.c:103:6: warning: no previous prototype for function 'unregister_device' [-Wmissing-prototypes]
  103 | void unregister_device(void) {
      |      ^
/var/lib/dkms/dev_one/r15.20230110.0171589/build/one.c:103:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
  103 | void unregister_device(void) {
      | ^
      | static 
2 warnings and 1 error generated.
make[3]: *** [scripts/Makefile.build:243: /var/lib/dkms/dev_one/r15.20230110.0171589/build/one.o] Error 1
make[2]: *** [/usr/lib/modules/6.8.10-vanilla-customconfig-clang/build/Makefile:1921: /var/lib/dkms/dev_one/r15.20230110.0171589/build] Error 2
make[1]: *** [Makefile:240: __sub-make] Error 2
make[1]: Leaving directory '/usr/lib/modules/6.8.10-vanilla-customconfig-clang/build'
make: *** [Makefile:69: build] Error 2

Regards!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions