Skip to content

Can handler doesn't compile with CONFIG_USERSPACE #34734

@julien-massot

Description

@julien-massot

Describe the bug
Can handler is looking for set_bitrate can api which no longer exist.

To Reproduce
Steps to reproduce the behavior:
west build -b stm32f4_disco zephyr/samples/userspace/hello_world_user/ -DCONFIG_CAN=y --build-dir stm32_user

Expected behavior
Compilation should not fail

Logs and console output

In file included from /home/julien/src/out/zephyr/drivers/can/can_handlers.c:7:
/home/julien/src/out/zephyr/drivers/can/can_handlers.c: In function 'z_vrfy_can_set_bitrate':
/home/julien/src/out/zephyr/drivers/can/can_handlers.c:26:35: error: 'struct can_driver_api' has no member named 'set_bitrate'; did you mean 'get_state'?
26 | Z_OOPS(Z_SYSCALL_DRIVER_CAN(dev, set_bitrate));
| ^~~~~~~~~~~
/home/julien/src/out/zephyr/include/syscall_handler.h:293:7: note: in definition of macro 'Z_OOPS'
293 | if (expr) {
| ^~~~
/home/julien/src/out/zephyr/include/syscall_handler.h:468:3: note: in expansion of macro 'Z_SYSCALL_VERIFY_MSG'
468 | Z_SYSCALL_VERIFY_MSG(device->op != NULL,
| ^~~~~~~~~~~~~~~~~~~~
zephyr/include/generated/driver-validation.h:5:4: note: in expansion of macro 'Z_SYSCALL_DRIVER_OP'
5 | Z_SYSCALL_DRIVER_OP(ptr, driver_lower_case##_driver_api, op))
| ^~~~~~~~~~~~~~~~~~~
zephyr/include/generated/driver-validation.h:11:39: note: in expansion of macro 'Z_SYSCALL_DRIVER_GEN'
11 | #define Z_SYSCALL_DRIVER_CAN(ptr, op) Z_SYSCALL_DRIVER_GEN(ptr, op, can, CAN)
| ^~~~~~~~~~~~~~~~~~~~
/home/julien/src/out/zephyr/drivers/can/can_handlers.c:26:9: note: in expansion of macro 'Z_SYSCALL_DRIVER_CAN'
26 | Z_OOPS(Z_SYSCALL_DRIVER_CAN(dev, set_bitrate));
| ^~~~~~~~~~~~~~~~~~~~
/home/julien/src/out/zephyr/drivers/can/can_handlers.c:28:9: warning: implicit declaration of function 'z_impl_can_set_bitrate'; did you mean 'z_vrfy_can_set_bitrate'? [-Wimplicit-function-declaration]
28 | return z_impl_can_set_bitrate((const struct device *)dev,
| ^~~~~~~~~~~~~~~~~~~~~~
| z_vrfy_can_set_bitrate
/home/julien/src/out/zephyr/drivers/can/can_handlers.c: At top level:
/home/julien/src/out/zephyr/drivers/can/can_handlers.c:31:10: fatal error: syscalls/can_set_bitrate_mrsh.c: No such file or directory
31 | #include <syscalls/can_set_bitrate_mrsh.c>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Metadata

Metadata

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions