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 #10

Merged
merged 1 commit into from
Oct 23, 2021

Conversation

jdevelop
Copy link
Contributor

Use SPI_BPW_MASK on the newer kernels.

#9

@jdevelop jdevelop mentioned this pull request Oct 22, 2019
Copy link

@Kreyren Kreyren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kreyren@leonid:~/Repositories/spi-ch341-usb$ git remote -v
origin	https://github.com/jdevelop/spi-ch341-usb.git (fetch)
origin	https://github.com/jdevelop/spi-ch341-usb.git (push)
kreyren@leonid:~/Repositories/spi-ch341-usb$ git branch
* master
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

EDIT:

kreyren@leonid:~/Repositories/spi-ch341-usb$ git checkout fix/build-kernel-5
Branch 'fix/build-kernel-5' set up to track remote branch 'fix/build-kernel-5' from 'origin'.
Switched to a new branch 'fix/build-kernel-5'
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
  MODPOST /home/kreyren/Repositories/spi-ch341-usb/Module.symvers
  CC [M]  /home/kreyren/Repositories/spi-ch341-usb/spi-ch341-usb.mod.o
  LD [M]  /home/kreyren/Repositories/spi-ch341-usb/spi-ch341-usb.ko
make[1]: Leaving directory '/usr/src/linux-headers-5.10.0-3-amd64'

LGTM

@jdevelop
Copy link
Contributor Author

shall we perhaps merge this to the upstream?

@gschorcht gschorcht merged commit 9c4b873 into gschorcht:master Oct 23, 2021
mr-nice pushed a commit to mr-nice/spi-ch341-usb that referenced this pull request Oct 19, 2023
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

Successfully merging this pull request may close these issues.

None yet

3 participants