Public bug reported:

[Impact]

dcci-dkms is failing with the following build error on focal with the
new 5.15 hwe kernel:

 CC [M]  /var/lib/dkms/ddcci/0.3.3/build/ddcci/ddcci.o
/var/lib/dkms/ddcci/0.3.3/build/ddcci/ddcci.c:1222:13: error: initialization of 
‘void (*)(struct device *)’ from incompatible pointer type ‘int (*)(struct 
device *)’ [-Werror=incompatible-pointer-types]
 1222 |  .remove  = ddcci_device_remove
      |             ^~~~~~~~~~~~~~~~~~~
/var/lib/dkms/ddcci/0.3.3/build/ddcci/ddcci.c:1222:13: note: (near 
initialization for ‘ddcci_bus_type.remove’)
cc1: some warnings being treated as errors

[Fix]

Prototype of bus_type->remove() is changed starting with kernel 5.15
(function is not returning an int anymore, now it's a void function).

Fix with a proper #ifdef macro to support both prototypes, based on the
specific kernel version that we are building against to.

[Test case]

$ sudo apt install ddcci-dkms

[Regression potential]

We may see stale devices / resource leaking on removal of ddcci devices,
because with kernels >= 5.15 there's basically no error handling in
bus_type->remove(). Previous kernels are unaffected, because the code
remains identical.

** Affects: linux (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: linux (Ubuntu Focal)
     Importance: Undecided
         Status: New

** Also affects: linux (Ubuntu Focal)
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1959911

Title:
  ddcci-dkms fails to install with linux 5.15 on focal

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1959911/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to