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

sbull.c: implicit declaration of function blk_alloc_queue against kernel version 5.14.9 #71

Open
QuantumForge opened this issue Nov 6, 2021 · 1 comment

Comments

@QuantumForge
Copy link
Contributor

sbull.c fails to compile due to missing reference to blk_alloc_queue:

make[2]: Entering directory '/home/whanlon/kernelbuild/linux-5.14.9'
  CC [M]  /home/whanlon/LinuxDeviceDrivers/examples/ldd3/sbull/sbull.o
/home/whanlon/LinuxDeviceDrivers/examples/ldd3/sbull/sbull.c: In function 'blk_generic_alloc_queue':
/home/whanlon/LinuxDeviceDrivers/examples/ldd3/sbull/sbull.c:110:17: error: implicit declaration of function 'blk_alloc_queue'; did you mean 'blk_sync_queue'? [-Werror=implicit-function-declaration]
  110 |         return (blk_alloc_queue(node_id));
      |                 ^~~~~~~~~~~~~~~
      |                 blk_sync_queue
/home/whanlon/LinuxDeviceDrivers/examples/ldd3/sbull/sbull.c:110:17: warning: returning 'int' from a function with return type 'struct request_queue *' makes pointer from integer without a cast [-Wint-conversion]
  110 |         return (blk_alloc_queue(node_id));
      |                ~^~~~~~~~~~~~~~~~~~~~~~~~~

This is followed by a cascade of other errors, the end result is "make" fails when trying to compile sbull.c

Looking in the kernel source I find blk_alloc_queue in block/blk-core.c, but nowhere in linux-5.14.9/include. I also notice that blk_alloc_queue in blk-core.c is not followed by EXPORT_SYMBOL. Is this function deprecated in 5.14+ kernels? How to fix this to get ldd3 to compile?

@dwalkes
Copy link
Collaborator

dwalkes commented Nov 7, 2021

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

2 participants