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

5.9 kernel support #21

Open
darrellenns opened this issue Dec 13, 2020 · 3 comments
Open

5.9 kernel support #21

darrellenns opened this issue Dec 13, 2020 · 3 comments

Comments

@darrellenns
Copy link

darrellenns commented Dec 13, 2020

Building on 5.9.13 kernel fails as follows:

make -C /lib/modules/5.9.13-arch1-1/build M=/tmp/ntv2-v4l2/driver DRIVERDIR=/tmp/ntv2-v4l2/driver modules
make[1]: Entering directory '/usr/lib/modules/5.9.13-arch1-1/build'
  CC [M]  /tmp/ntv2-v4l2/driver/ntv2_driver.o
/tmp/ntv2-v4l2/driver/ntv2_driver.c:128:76: warning: ‘enum pci_channel_state’ declared inside parameter list will not be visible outside of this definition or declaration
  128 | static pci_ers_result_t ntv2_pci_error_detected(struct pci_dev *pdev, enum pci_channel_state state)
      |                                                                            ^~~~~~~~~~~~~~~~~
/tmp/ntv2-v4l2/driver/ntv2_driver.c:128:94: error: parameter 2 (‘state’) has incomplete type
  128 | static pci_ers_result_t ntv2_pci_error_detected(struct pci_dev *pdev, enum pci_channel_state state)
      |                                                                       ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
/tmp/ntv2-v4l2/driver/ntv2_driver.c:128:25: error: function declaration isn’t a prototype [-Werror=strict-prototypes]
  128 | static pci_ers_result_t ntv2_pci_error_detected(struct pci_dev *pdev, enum pci_channel_state state)
      |                         ^~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:283: /tmp/ntv2-v4l2/driver/ntv2_driver.o] Error 1
make[1]: *** [Makefile:1784: /tmp/ntv2-v4l2/driver] Error 2
make[1]: Leaving directory '/usr/lib/modules/5.9.13-arch1-1/build'
make: *** [Makefile:87: default] Error 2
@eCompassion
Copy link

I'm in the same boat on the Arch derivative, Manjaro.

~/.../ntv2-v4l2/driver >>> make ±[master]
make -C /lib/modules/5.9.11-3-MANJARO/build M=/home/evie/git/ntv2-v4l2/driver DRIVERDIR=/home/evie/git/ntv2-v4l2/driver modules
make[1]: Entering directory '/usr/lib/modules/5.9.11-3-MANJARO/build'
CC [M] /home/evie/git/ntv2-v4l2/driver/ntv2_driver.o
/home/evie/git/ntv2-v4l2/driver/ntv2_driver.c:128:76: warning: ‘enum pci_channel_state’ declared inside parameter list will not be visible outside of this definition or declaration
128 | static pci_ers_result_t ntv2_pci_error_detected(struct pci_dev *pdev, enum pci_channel_state state)
| ^~~~~~~~~~~~~~~~~
/home/evie/git/ntv2-v4l2/driver/ntv2_driver.c:128:94: error: parameter 2 (‘state’) has incomplete type
128 | static pci_ers_result_t ntv2_pci_error_detected(struct pci_dev *pdev, enum pci_channel_state state)
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
/home/evie/git/ntv2-v4l2/driver/ntv2_driver.c:128:25: error: function declaration isn’t a prototype [-Werror=strict-prototypes]
128 | static pci_ers_result_t ntv2_pci_error_detected(struct pci_dev *pdev, enum pci_channel_state state)
| ^~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:283: /home/evie/git/ntv2-v4l2/driver/ntv2_driver.o] Error 1
make[1]: *** [Makefile:1784: /home/evie/git/ntv2-v4l2/driver] Error 2
make[1]: Leaving directory '/usr/lib/modules/5.9.11-3-MANJARO/build'
make: *** [Makefile:87: default] Error 2

@davids635
Copy link
Contributor

Hi. I am out of the office. However it appears that the the pci channel state enum has been removed. As a quick fix you can change driver.c line 128.
original: static pci_ers_result_t ntv2_pci_error_detected(struct pci_dev *pdev, enum pci_channel_state state)
new: static pci_ers_result_t ntv2_pci_error_detected(struct pci_dev *pdev, pci_channel_state_t state)
Let me know if this solves the problem and I will make the change to the checked in code. Thanks.

@eCompassion
Copy link

The module built. I'll test it on the machine tomorrow.

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