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

[Fix?] Build fails with ipod_hid.c:632:45: error: too many arguments to function call, expected single argument 'name', have 2 arguments for Linux 6.9.10. #29

Open
dreirund opened this issue Jul 22, 2024 · 0 comments

Comments

@dreirund
Copy link

dreirund commented Jul 22, 2024

Ahoj,

I want to build this for Linux 6.9.10, compiled with clang 18.1.8.

When I run make LLVM=1 LLVM_IAS=1, build fails with ipod_hid.c:632:45: error: too many arguments to function call, expected single argument 'name', have 2 arguments:

make -C /lib/modules/`uname -r`/build M=/tmp/ipod-gadget/gadget modules
make[1]: Entering directory '/usr/lib/modules/6.9.10-xanmod-customconfig-clang/build'
  CC [M]  /tmp/ipod-gadget/gadget/ipod_hid.o
/tmp/ipod-gadget/gadget/ipod_hid.c:318:5: warning: no previous prototype for function 'ipod_hid_setup' [-Wmissing-prototypes]
  318 | int ipod_hid_setup(struct usb_function *func, const struct usb_ctrlrequest *ctrl)
      |     ^
/tmp/ipod-gadget/gadget/ipod_hid.c:318:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
  318 | int ipod_hid_setup(struct usb_function *func, const struct usb_ctrlrequest *ctrl)
      | ^
      | static 
/tmp/ipod-gadget/gadget/ipod_hid.c:377:5: warning: no previous prototype for function 'ipod_hid_set_alt' [-Wmissing-prototypes]
  377 | int ipod_hid_set_alt(struct usb_function *func, unsigned intf, unsigned alt)
      |     ^
/tmp/ipod-gadget/gadget/ipod_hid.c:377:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
  377 | int ipod_hid_set_alt(struct usb_function *func, unsigned intf, unsigned alt)
      | ^
      | static 
/tmp/ipod-gadget/gadget/ipod_hid.c:414:6: warning: no previous prototype for function 'ipod_hid_disable' [-Wmissing-prototypes]
  414 | void ipod_hid_disable(struct usb_function *func)
      |      ^
/tmp/ipod-gadget/gadget/ipod_hid.c:414:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
  414 | void ipod_hid_disable(struct usb_function *func)
      | ^
      | static 
/tmp/ipod-gadget/gadget/ipod_hid.c:422:5: warning: no previous prototype for function 'ipod_hid_bind' [-Wmissing-prototypes]
  422 | int ipod_hid_bind(struct usb_configuration *conf, struct usb_function *func)
      |     ^
/tmp/ipod-gadget/gadget/ipod_hid.c:422:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
  422 | int ipod_hid_bind(struct usb_configuration *conf, struct usb_function *func)
      | ^
      | static 
/tmp/ipod-gadget/gadget/ipod_hid.c:466:6: warning: no previous prototype for function 'ipod_hid_unbind' [-Wmissing-prototypes]
  466 | void ipod_hid_unbind(struct usb_configuration *conf, struct usb_function *func)
      |      ^
/tmp/ipod-gadget/gadget/ipod_hid.c:466:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
  466 | void ipod_hid_unbind(struct usb_configuration *conf, struct usb_function *func)
      | ^
      | static 
/tmp/ipod-gadget/gadget/ipod_hid.c:632:45: error: too many arguments to function call, expected single argument 'name', have 2 arguments
  632 |         ipod_hid_class = class_create(THIS_MODULE, "iap");
      |                          ~~~~~~~~~~~~              ^~~~~
./include/linux/device/class.h:228:29: note: 'class_create' declared here
  228 | struct class * __must_check class_create(const char *name);
      |                             ^            ~~~~~~~~~~~~~~~~
5 warnings and 1 error generated.
make[3]: *** [scripts/Makefile.build:244: /tmp/ipod-gadget/gadget/ipod_hid.o] Error 1
make[2]: *** [/usr/lib/modules/6.9.10-xanmod-customconfig-clang/build/Makefile:2070: /tmp/ipod-gadget/gadget] Error 2
make[1]: *** [Makefile:240: __sub-make] Error 2
make[1]: Leaving directory '/usr/lib/modules/6.9.10-xanmod-customconfig-clang/build'
make: *** [Makefile:20: all] Error 2

Building the fork github.com/dangerzau/ipod-gadget succeeds (with warnings).

Regards!

@dreirund dreirund changed the title Build fails with ipod_hid.c:632:45: error: too many arguments to function call, expected single argument 'name', have 2 arguments for Linux 6.9.10. [Fix?] Build fails with ipod_hid.c:632:45: error: too many arguments to function call, expected single argument 'name', have 2 arguments for Linux 6.9.10. Jul 22, 2024
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