The module is still failing to build on my machine.

I believe the problem is that ddcci_device_remove() returns in two different places. The new patch wraps the return at the end of the function in an #if, but does not fix the mid-function `return -EINVAL;`.

(In case it is useful: there is a patch on the Ubuntu version of this bug that uses a wrapper function instead of conditional compilation within the function: https://bugs.launchpad.net/ubuntu/+source/ddcci-driver-linux/+bug/1951608 .)

Here's my make.log from today:


DKMS make.log for ddcci-0.4.1 for kernel 5.15.0-1-amd64 (x86_64)
Tue 23 Nov 11:25:56 GMT 2021
make: Entering directory '/var/lib/dkms/ddcci/0.4.1/build'
make -C "ddcci"
make[1]: Entering directory '/var/lib/dkms/ddcci/0.4.1/build/ddcci'
make -C "/lib/modules/5.15.0-1-amd64/build" M="/var/lib/dkms/ddcci/0.4.1/build/ddcci" modules
make[2]: Entering directory '/usr/src/linux-headers-5.15.0-1-amd64'
  CC [M]  /var/lib/dkms/ddcci/0.4.1/build/ddcci/ddcci.o
/var/lib/dkms/ddcci/0.4.1/build/ddcci/ddcci.c: In function ‘ddcci_device_remove’: /var/lib/dkms/ddcci/0.4.1/build/ddcci/ddcci.c:1283:24: error: ‘return’ with a value, in function returning void [-Werror=return-type]
 1283 |                 return -EINVAL;
      |                        ^
/var/lib/dkms/ddcci/0.4.1/build/ddcci/ddcci.c:1273:13: note: declared here
 1273 | static void ddcci_device_remove(struct device *dev)
      |             ^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[3]: *** [/usr/src/linux-headers-5.15.0-1-common/scripts/Makefile.build:282: /var/lib/dkms/ddcci/0.4.1/build/ddcci/ddcci.o] Error 1 make[2]: *** [/usr/src/linux-headers-5.15.0-1-common/Makefile:1892: /var/lib/dkms/ddcci/0.4.1/build/ddcci] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-5.15.0-1-amd64'
make[1]: *** [Makefile:38: ddcci.ko] Error 2
make[1]: Leaving directory '/var/lib/dkms/ddcci/0.4.1/build/ddcci'
make: *** [Makefile:28: ddcci] Error 2
make: Leaving directory '/var/lib/dkms/ddcci/0.4.1/build'

Reply via email to