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

xpp, sysfs: device_driver struct is now const #63

Open
InterLinked1 opened this issue Sep 23, 2024 · 0 comments · May be fixed by #64
Open

xpp, sysfs: device_driver struct is now const #63

InterLinked1 opened this issue Sep 23, 2024 · 0 comments · May be fixed by #64

Comments

@InterLinked1
Copy link
Contributor

Build failure against mainline/next kernels, due to torvalds/linux@d69d804:

  CC [M]  /usr/src/dahdi-linux-3.4.0/drivers/dahdi/xpp/xbus-pcm.o
/usr/src/dahdi-linux-3.4.0/drivers/dahdi/xpp/xbus-sysfs.c:479:18: error: initialization of 'int (*)(struct device *, const struct device_driver *)' from incompatible pointer type 'int (*)(struct device *, struct device_driver *)' [-Werror=incompatible-pointer-types]
  479 |         .match = astribank_match,
      |                  ^~~~~~~~~~~~~~~
/usr/src/dahdi-linux-3.4.0/drivers/dahdi/xpp/xbus-sysfs.c:479:18: note: (near initialization for 'toplevel_bus_type.match')
/usr/src/dahdi-linux-3.4.0/drivers/dahdi/xpp/xbus-sysfs.c:835:18: error: initialization of 'int (*)(struct device *, const struct device_driver *)' from incompatible pointer type 'int (*)(struct device *, struct device_driver *)' [-Werror=incompatible-pointer-types]
  835 |         .match = xpd_match,
      |                  ^~~~~~~~~
/usr/src/dahdi-linux-3.4.0/drivers/dahdi/xpp/xbus-sysfs.c:835:18: note: (near initialization for 'xpd_type.match')
  CC [M]  /usr/src/dahdi-linux-3.4.0/drivers/dahdi/voicebus/vpmoct.o
cc1: all warnings being treated as errors
make[4]: *** [scripts/Makefile.build:244: /usr/src/dahdi-linux-3.4.0/drivers/dahdi/xpp/xbus-sysfs.o] Error 1
make[4]: *** Waiting for unfinished jobs....
  CC [M]  /usr/src/dahdi-linux-3.4.0/drivers/dahdi/dahdi-base.o
  LD [M]  /usr/src/dahdi-linux-3.4.0/drivers/dahdi/opvxa1200/opvxa1200.o
  CC [M]  /usr/src/dahdi-linux-3.4.0/drivers/dahdi/dahdi-sysfs.o
  LD [M]  /usr/src/dahdi-linux-3.4.0/drivers/dahdi/voicebus/dahdi_voicebus.o
  CC [M]  /usr/src/dahdi-linux-3.4.0/drivers/dahdi/dahdi-sysfs-chan.o
/usr/src/dahdi-linux-3.4.0/drivers/dahdi/dahdi-sysfs.c:283:27: error: initialization of 'int (*)(struct device *, const struct device_driver *)' from incompatible pointer type 'int (*)(struct device *, struct device_driver *)' [-Werror=incompatible-pointer-types]
  283 |         .match          = span_match,
      |                           ^~~~~~~~~~
/usr/src/dahdi-linux-3.4.0/drivers/dahdi/dahdi-sysfs.c:283:27: note: (near initialization for 'spans_bus_type.match')
make[3]: *** [scripts/Makefile.build:485: /usr/src/dahdi-linux-3.4.0/drivers/dahdi/xpp] Error 2
make[3]: *** Waiting for unfinished jobs....
/usr/src/dahdi-linux-3.4.0/drivers/dahdi/dahdi-sysfs-chan.c:234:27: error: initialization of 'int (*)(struct device *, const struct device_driver *)' from incompatible pointer type 'int (*)(struct device *, struct device_driver *)' [-Werror=incompatible-pointer-types]
  234 |         .match          = chan_match,
      |                           ^~~~~~~~~~
/usr/src/dahdi-linux-3.4.0/drivers/dahdi/dahdi-sysfs-chan.c:234:27: note: (near initialization for 'chan_bus_type.match')
cc1: all warnings being treated as errors
make[3]: *** [scripts/Makefile.build:244: /usr/src/dahdi-linux-3.4.0/drivers/dahdi/dahdi-sysfs.o] Error 1
cc1: all warnings being treated as errors
make[3]: *** [scripts/Makefile.build:244: /usr/src/dahdi-linux-3.4.0/drivers/dahdi/dahdi-sysfs-chan.o] Error 1
make[2]: *** [/usr/src/linux/Makefile:1926: /usr/src/dahdi-linux-3.4.0/drivers/dahdi] Error 2
make[1]: *** [Makefile:224: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux'
make: *** [Makefile:74: modules] Error 2
InterLinked1 added a commit to InterLinked1/dahdi-linux that referenced this issue Sep 23, 2024
Kernel commit d69d804845985c29ab5be5a4b3b1f4787893daf8
changed struct device_driver to be const, so make the
arguments const on kernels 6.11 and newer.

Resolves: asterisk#63
osmocom-gerrit pushed a commit to osmocom/dahdi-linux that referenced this issue Oct 3, 2024
Kernel commit d69d804845985c29ab5be5a4b3b1f4787893daf8
changed struct device_driver to be const, so make the
arguments const on kernels 6.11 and newer.

Resolves: asterisk#63
Change-Id: Ibc20d83adb9b5814b05ec38a33e307ab8c9f0d51
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

Successfully merging a pull request may close this issue.

1 participant