Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implicit declaration of function ‘SPI_BIT_MASK’ #9

Open
jdevelop opened this issue Oct 22, 2019 · 2 comments
Open

implicit declaration of function ‘SPI_BIT_MASK’ #9

jdevelop opened this issue Oct 22, 2019 · 2 comments

Comments

@jdevelop
Copy link
Contributor

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 added a commit to jdevelop/spi-ch341-usb that referenced this issue Oct 22, 2019
@Kreyren
Copy link

Kreyren commented Mar 5, 2021

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

@SysGh-st
Copy link

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)

gschorcht added a commit that referenced this issue Oct 23, 2021
implicit declaration of function ‘SPI_BIT_MASK’ #9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants