ddcci-dkms fails to install with linux 5.15 on focal

Bug #1959911 reported by Andrea Righi
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Undecided
Unassigned
Focal
In Progress
Undecided
Unassigned

Bug Description

[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.

Tags: patch
Revision history for this message
Andrea Righi (arighi) wrote :

debdiff in attach seems to fix the build issue on 5.15.

tags: added: patch
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1959911

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Changed in linux (Ubuntu Focal):
status: New → Incomplete
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Fix released in jammy; patch needed in focal still.

Changed in linux (Ubuntu):
status: Incomplete → Fix Released
Changed in linux (Ubuntu Focal):
status: Incomplete → Triaged
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

redid the patch from jammy for focal, and uploaded to sru unapproved.

Changed in linux (Ubuntu Focal):
status: Triaged → In Progress
Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

The focal fix for the dkms was tracked in bug 1951608.

This is bug is not a kernel issue, so marking it as duplicate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.