spi-ch341-usb icon indicating copy to clipboard operation
spi-ch341-usb copied to clipboard

implicit declaration of function ‘SPI_BIT_MASK’

Open jdevelop opened this issue 5 years ago • 2 comments

On the newer kernels ( 5.3.7 at least ) the compilation fails with

spi-ch341-usb/spi-ch341-usb.c:623:45: error: implicit declaration of function ‘SPI_BIT_MASK’; did you mean ‘SPI_BPW_MASK’? [-Werror=implicit-function-declaration]

jdevelop avatar Oct 22 '19 12:10 jdevelop

Same issue on my end

kreyren@leonid:~/Repositories/spi-ch341-usb$ make
make -C /usr/src/linux-headers-5.10.0-3-amd64/ M=/home/kreyren/Repositories/spi-ch341-usb  modules
make[1]: Entering directory '/usr/src/linux-headers-5.10.0-3-amd64'
  CC [M]  /home/kreyren/Repositories/spi-ch341-usb/spi-ch341-usb.o
/home/kreyren/Repositories/spi-ch341-usb/spi-ch341-usb.c: In function ‘ch341_spi_probe’:
/home/kreyren/Repositories/spi-ch341-usb/spi-ch341-usb.c:623:45: error: implicit declaration of function ‘SPI_BIT_MASK’; did you mean ‘SPI_BPW_MASK’? [-Werror=implicit-function-declaration]
  623 |     ch341_dev->master->bits_per_word_mask = SPI_BIT_MASK(8);
      |                                             ^~~~~~~~~~~~
      |                                             SPI_BPW_MASK
cc1: some warnings being treated as errors
make[3]: *** [/usr/src/linux-headers-5.10.0-3-common/scripts/Makefile.build:284: /home/kreyren/Repositories/spi-ch341-usb/spi-ch341-usb.o] Error 1
make[2]: *** [/usr/src/linux-headers-5.10.0-3-common/Makefile:1817: /home/kreyren/Repositories/spi-ch341-usb] Error 2
make[1]: *** [/usr/src/linux-headers-5.10.0-3-common/Makefile:185: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.10.0-3-amd64'
make: *** [Makefile:20: spi-ch341-usb.ko] Error 2

Kreyren avatar Mar 05 '21 00:03 Kreyren

Seem to be as simple as replacing SPI_BIT_MASK with SPI_BPW_MASK But I haven't been able to get past the other issue about irq_to_desc (which is unrelated to this. See issue 18)

SysGh-st avatar Apr 15 '21 14:04 SysGh-st