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

device.h: fix inconsistent semicolon logic for DEVICE_DT_DEFINE #79279

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/zephyr/device.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@
level, prio, api, \
&Z_DEVICE_STATE_NAME(Z_DEVICE_DT_DEV_ID(node_id)), \
__VA_ARGS__) \
IF_ENABLED(CONFIG_LLEXT_EXPORT_DEVICES, (; Z_DEVICE_EXPORT(node_id))) \
IF_ENABLED(CONFIG_LLEXT_EXPORT_DEVICES, (Z_DEVICE_EXPORT(node_id);))

Check notice on line 211 in include/zephyr/device.h

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

include/zephyr/device.h:211 -#define DEVICE_DT_DEFINE(node_id, init_fn, pm, data, config, level, prio, api, \ - ...) \ - Z_DEVICE_STATE_DEFINE(Z_DEVICE_DT_DEV_ID(node_id)); \ - Z_DEVICE_DEFINE(node_id, Z_DEVICE_DT_DEV_ID(node_id), \ - DEVICE_DT_NAME(node_id), init_fn, pm, data, config, \ - level, prio, api, \ - &Z_DEVICE_STATE_NAME(Z_DEVICE_DT_DEV_ID(node_id)), \ - __VA_ARGS__) \ +#define DEVICE_DT_DEFINE(node_id, init_fn, pm, data, config, level, prio, api, ...) \ + Z_DEVICE_STATE_DEFINE(Z_DEVICE_DT_DEV_ID(node_id)); \ + Z_DEVICE_DEFINE(node_id, Z_DEVICE_DT_DEV_ID(node_id), DEVICE_DT_NAME(node_id), init_fn, \ + pm, data, config, level, prio, api, \ + &Z_DEVICE_STATE_NAME(Z_DEVICE_DT_DEV_ID(node_id)), __VA_ARGS__) \

/**
* @brief Like DEVICE_DT_DEFINE(), but uses an instance of a `DT_DRV_COMPAT`
Expand Down
Loading