pm: policy: modularize code, add latency standalone mode #156510
Annotations
1 error, 1 warning, and 10 notices
Run Compliance Tests
Process completed with exit code 1.
|
check-warns:
ClangFormat.txt#L1
See https://docs.zephyrproject.org/latest/contribute/guidelines.html#clang-format for more details.
You may want to run clang-format on this change:
-void pm_policy_latency_request_add(struct pm_policy_latency_request *req,
- uint32_t value_us);
+void pm_policy_latency_request_add(struct pm_policy_latency_request *req, uint32_t value_us);
File:include/zephyr/pm/policy.h
Line:283
You may want to run clang-format on this change:
-void pm_policy_latency_request_update(struct pm_policy_latency_request *req,
- uint32_t value_us);
+void pm_policy_latency_request_update(struct pm_policy_latency_request *req, uint32_t value_us);
File:include/zephyr/pm/policy.h
Line:292
You may want to run clang-format on this change:
-static inline void pm_policy_latency_request_add(
- struct pm_policy_latency_request *req, uint32_t value_us)
+static inline void pm_policy_latency_request_add(struct pm_policy_latency_request *req,
+ uint32_t value_us)
{
ARG_UNUSED(req);
ARG_UNUSED(value_us);
}
-static inline void pm_policy_latency_request_update(
- struct pm_policy_latency_request *req, uint32_t value_us)
+static inline void pm_policy_latency_request_update(struct pm_policy_latency_request *req,
+ uint32_t value_us)
{
ARG_UNUSED(req);
ARG_UNUSED(value_us);
}
-static inline void pm_policy_latency_request_remove(
- struct pm_policy_latency_request *req)
+static inline void pm_policy_latency_request_remove(struct pm_policy_latency_request *req)
File:include/zephyr/pm/policy.h
Line:332
You may want to run clang-format on this change:
- if ((max_latency_cyc >= 0) &&
- (exit_latency_cyc >= max_latency_cyc)) {
+ if ((max_latency_cyc >= 0) && (exit_latency_cyc >= max_latency_cyc)) {
continue;
}
- if ((cyc < 0) ||
- (cyc >= (min_residency_cyc + exit_latency_cyc))) {
+ if ((cyc < 0) || (cyc >= (min_residency_cyc + exit_latency_cyc))) {
File:subsys/pm/policy/policy_default.c
Line:74
You may want to run clang-format on this change:
-#define PM_STATE_CONSTRAINT_INIT(node_id) \
- { \
- .state = PM_STATE_DT_INIT(node_id), \
- .substate_id = DT_PROP_OR(node_id, substate_id, 0), \
+#define PM_STATE_CONSTRAINT_INIT(node_id) \
+ { \
+ .state = PM_STATE_DT_INIT(node_id), \
+ .substate_id = DT_PROP_OR(node_id, substate_id, 0), \
}
/**
* @brief Helper macro to define a device pm constraints.
*/
-#define PM_STATE_CONSTRAINT_DEFINE(i, node_id) \
+#define PM_STATE_CONSTRAINT_DEFINE(i, node_id) \
File:subsys/pm/policy/policy_device_lock.c
Line:41
You may want to run clang-format on this change:
-#define PM_STATE_CONSTRAINTS_DEFINE(node_id) \
- { \
- LISTIFY(DT_PROP_LEN_OR(node_id, zephyr_disabling_power_states, 0), \
- PM_STATE_CONSTRAINT_DEFINE, (), node_id) \
- }
+#define PM_STATE_CONSTRAINTS_DEFINE(node_id) \
+ {LISTIFY(DT_PROP_LEN_OR(node_id, zephyr_disabling_power_states, 0), \
+ PM_STATE_CONSTRAINT_DEFINE, (), node_id) }
/**
* @brief Helper macro to define an array of device pm constraints.
*/
-#define CONSTRAINTS_DEFINE(node_id) \
- Z_DECL_ALIGN(struct pm_state_constraint) \
- PM_CONSTRAINTS_NAME(node_id)[] = \
- PM_STATE_CONSTRAINTS_DEFINE(node_id);
+#define CONSTRAINTS_DEFINE(node_id) \
+ Z_DECL_ALIGN(struct pm_state_constraint) \
+ PM_CONSTRAINTS_NAME(nod
|
Run Compliance Tests:
include/zephyr/pm/policy.h#L283
include/zephyr/pm/policy.h:283
-void pm_policy_latency_request_add(struct pm_policy_latency_request *req,
- uint32_t value_us);
+void pm_policy_latency_request_add(struct pm_policy_latency_request *req, uint32_t value_us);
|
Run Compliance Tests:
include/zephyr/pm/policy.h#L292
include/zephyr/pm/policy.h:292
-void pm_policy_latency_request_update(struct pm_policy_latency_request *req,
- uint32_t value_us);
+void pm_policy_latency_request_update(struct pm_policy_latency_request *req, uint32_t value_us);
|
Run Compliance Tests:
include/zephyr/pm/policy.h#L332
include/zephyr/pm/policy.h:332
-static inline void pm_policy_latency_request_add(
- struct pm_policy_latency_request *req, uint32_t value_us)
+static inline void pm_policy_latency_request_add(struct pm_policy_latency_request *req,
+ uint32_t value_us)
{
ARG_UNUSED(req);
ARG_UNUSED(value_us);
}
-static inline void pm_policy_latency_request_update(
- struct pm_policy_latency_request *req, uint32_t value_us)
+static inline void pm_policy_latency_request_update(struct pm_policy_latency_request *req,
+ uint32_t value_us)
{
ARG_UNUSED(req);
ARG_UNUSED(value_us);
}
-static inline void pm_policy_latency_request_remove(
- struct pm_policy_latency_request *req)
+static inline void pm_policy_latency_request_remove(struct pm_policy_latency_request *req)
|
Run Compliance Tests:
subsys/pm/policy/policy_default.c#L74
subsys/pm/policy/policy_default.c:74
- if ((max_latency_cyc >= 0) &&
- (exit_latency_cyc >= max_latency_cyc)) {
+ if ((max_latency_cyc >= 0) && (exit_latency_cyc >= max_latency_cyc)) {
continue;
}
- if ((cyc < 0) ||
- (cyc >= (min_residency_cyc + exit_latency_cyc))) {
+ if ((cyc < 0) || (cyc >= (min_residency_cyc + exit_latency_cyc))) {
|
Run Compliance Tests:
subsys/pm/policy/policy_device_lock.c#L41
subsys/pm/policy/policy_device_lock.c:41
-#define PM_STATE_CONSTRAINT_INIT(node_id) \
- { \
- .state = PM_STATE_DT_INIT(node_id), \
- .substate_id = DT_PROP_OR(node_id, substate_id, 0), \
+#define PM_STATE_CONSTRAINT_INIT(node_id) \
+ { \
+ .state = PM_STATE_DT_INIT(node_id), \
+ .substate_id = DT_PROP_OR(node_id, substate_id, 0), \
}
/**
* @brief Helper macro to define a device pm constraints.
*/
-#define PM_STATE_CONSTRAINT_DEFINE(i, node_id) \
+#define PM_STATE_CONSTRAINT_DEFINE(i, node_id) \
|
Run Compliance Tests:
subsys/pm/policy/policy_device_lock.c#L64
subsys/pm/policy/policy_device_lock.c:64
-#define PM_STATE_CONSTRAINTS_DEFINE(node_id) \
- { \
- LISTIFY(DT_PROP_LEN_OR(node_id, zephyr_disabling_power_states, 0), \
- PM_STATE_CONSTRAINT_DEFINE, (), node_id) \
- }
+#define PM_STATE_CONSTRAINTS_DEFINE(node_id) \
+ {LISTIFY(DT_PROP_LEN_OR(node_id, zephyr_disabling_power_states, 0), \
+ PM_STATE_CONSTRAINT_DEFINE, (), node_id) }
/**
* @brief Helper macro to define an array of device pm constraints.
*/
-#define CONSTRAINTS_DEFINE(node_id) \
- Z_DECL_ALIGN(struct pm_state_constraint) \
- PM_CONSTRAINTS_NAME(node_id)[] = \
- PM_STATE_CONSTRAINTS_DEFINE(node_id);
+#define CONSTRAINTS_DEFINE(node_id) \
+ Z_DECL_ALIGN(struct pm_state_constraint) \
+ PM_CONSTRAINTS_NAME(node_id)[] = PM_STATE_CONSTRAINTS_DEFINE(node_id);
-#define DEVICE_CONSTRAINTS_DEFINE(node_id) \
+#define DEVICE_CONSTRAINTS_DEFINE(node_id) \
|
Run Compliance Tests:
subsys/pm/policy/policy_device_lock.c#L89
subsys/pm/policy/policy_device_lock.c:89
-#define PM_STATE_DEVICE_CONSTRAINT_INIT(node_id) \
- { \
- .dev = DEVICE_DT_GET(node_id), \
- .pm_constraints_size = DT_PROP_LEN(node_id, zephyr_disabling_power_states), \
- .constraints = PM_CONSTRAINTS_NAME(node_id), \
+#define PM_STATE_DEVICE_CONSTRAINT_INIT(node_id) \
+ { \
+ .dev = DEVICE_DT_GET(node_id), \
+ .pm_constraints_size = DT_PROP_LEN(node_id, zephyr_disabling_power_states), \
+ .constraints = PM_CONSTRAINTS_NAME(node_id), \
},
/**
* @brief Helper macro to initialize a pm state device constraint
*/
-#define PM_STATE_DEVICE_CONSTRAINT_DEFINE(node_id) \
+#define PM_STATE_DEVICE_CONSTRAINT_DEFINE(node_id) \
COND_CODE_0(DT_NODE_HAS_PROP(node_id, zephyr_disabling_power_states), (), \
(PM_STATE_DEVICE_CONSTRAINT_INIT(node_id)))
static struct pm_state_device_constraint _devices_constraints[] = {
- DT_FOREACH_STATUS_OKAY_NODE(PM_STATE_DEVICE_CONSTRAINT_DEFINE)
-};
+ DT_FOREACH_STATUS_OKAY_NODE(PM_STATE_DEVICE_CONSTRAINT_DEFINE)};
|
Run Compliance Tests:
subsys/pm/policy/policy_device_lock.c#L99
subsys/pm/policy/policy_device_lock.c:99
- _devices_constraints[i].constraints[j].state,
- _devices_constraints[i].constraints[j].substate_id);
+ _devices_constraints[i].constraints[j].state,
+ _devices_constraints[i].constraints[j].substate_id);
|
Run Compliance Tests:
subsys/pm/policy/policy_device_lock.c#L115
subsys/pm/policy/policy_device_lock.c:115
- _devices_constraints[i].constraints[j].state,
- _devices_constraints[i].constraints[j].substate_id);
+ _devices_constraints[i].constraints[j].state,
+ _devices_constraints[i].constraints[j].substate_id);
|
Run Compliance Tests:
subsys/pm/policy/policy_latency.c#L57
subsys/pm/policy/policy_latency.c:57
-void pm_policy_latency_request_add(struct pm_policy_latency_request *req,
- uint32_t value_us)
+void pm_policy_latency_request_add(struct pm_policy_latency_request *req, uint32_t value_us)
|
Loading