Package: reform2-lpc-dkms
Version: 1.66-1
Severity: important
Tags: upstream

Hi,

reform2-lpc-dkms fails to build a module for Linux 6.13 in experimental:

DKMS (dkms-3.1.5) make.log for reform2_lpc/1.66 for kernel 6.13-amd64 (x86_64)
Wed Feb 12 13:02:57 UTC 2025

Cleaning build area
# command: make -C /lib/modules/6.13-amd64/build 
M=/var/lib/dkms/reform2_lpc/1.66/build clean
make: Entering directory '/usr/src/linux-headers-6.13-amd64'
make[1]: Entering directory '/var/lib/dkms/reform2_lpc/1.66/build'
make[1]: Leaving directory '/var/lib/dkms/reform2_lpc/1.66/build'
make: Leaving directory '/usr/src/linux-headers-6.13-amd64'

# exit code: 0
# elapsed time: 00:00:00
----------------------------------------------------------------

Building module(s)
# command: make -j14 KERNELRELEASE=6.13-amd64 -C /lib/modules/6.13-amd64/build 
M=/var/lib/dkms/reform2_lpc/1.66/build
make: Entering directory '/usr/src/linux-headers-6.13-amd64'
make[1]: Entering directory '/var/lib/dkms/reform2_lpc/1.66/build'
  CC [M]  reform2_lpc.o
reform2_lpc.c: In function 'lpc_probe':
reform2_lpc.c:178:21: error: implicit declaration of function 
'power_supply_register_no_ws'; did you mean 'power_supply_register'? 
[-Wimplicit-function-declaration]
  178 |         data->bat = power_supply_register_no_ws(&spi->dev, &bat_desc, 
&psy_cfg);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                     power_supply_register
reform2_lpc.c:178:19: error: assignment to 'struct power_supply *' from 'int' 
makes pointer from integer without a cast [-Wint-conversion]
  178 |         data->bat = power_supply_register_no_ws(&spi->dev, &bat_desc, 
&psy_cfg);
      |                   ^
make[3]: *** [/usr/src/linux-headers-6.13-common/scripts/Makefile.build:201: 
reform2_lpc.o] Error 1
make[2]: *** [/usr/src/linux-headers-6.13-common/Makefile:2013: .] Error 2
make[1]: *** [/usr/src/linux-headers-6.13-common/Makefile:263: __sub-make] 
Error 2
make[1]: Leaving directory '/var/lib/dkms/reform2_lpc/1.66/build'
make: *** [/usr/src/linux-headers-6.13-common/Makefile:263: __sub-make] Error 2
make: Leaving directory '/usr/src/linux-headers-6.13-amd64'

# exit code: 2
# elapsed time: 00:00:02
----------------------------------------------------------------


And while you are at it, please add to debian/reform2-lpc-dkms.dkms

    # struct spi_device changed API in v5.18
    BUILD_EXCLUSIVE_KERNEL_MIN="5.18"

to document the minimal supported kernel version.
There is no need to add support for ancient kernels.

The error observed up to Linux 5.17 is

/var/lib/dkms/reform2_lpc/1.66/build/reform2_lpc.c:539:15: error: 
initialization of 'int (*)(struct spi_device *)' from incompatible pointer type 
'void (*)(struct spi_device *)' [-Werror=incompatible-pointer-types]
  539 |     .remove = lpc_remove,
      |               ^~~~~~~~~~

Your module simply uses the new struct spi_device API introduced
by Linux commit a0386bba70934d42f586eaf68b21d5eeaffa7bd0
"spi: make remove callback a void function" in v5.18-rc1


Andreas

Reply via email to