From 404c43af6e09a2fb6af361316cd41c1f372ee166 Mon Sep 17 00:00:00 2001 From: Conor Paxton Date: Tue, 8 Jul 2025 16:50:53 +0100 Subject: [PATCH] lib: smf: fix function name typo "share_paren" looks like a typo and should be share_parent. quick fix Signed-off-by: Conor Paxton --- lib/smf/smf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/smf/smf.c b/lib/smf/smf.c index 6639779bf04..3dbbc048dd2 100644 --- a/lib/smf/smf.c +++ b/lib/smf/smf.c @@ -22,7 +22,7 @@ struct internal_ctx { }; #ifdef CONFIG_SMF_ANCESTOR_SUPPORT -static bool share_paren(const struct smf_state *test_state, const struct smf_state *target_state) +static bool share_parent(const struct smf_state *test_state, const struct smf_state *target_state) { for (const struct smf_state *state = test_state; state != NULL; state = state->parent) { if (target_state == state) { @@ -70,7 +70,7 @@ static const struct smf_state *get_lca_of(const struct smf_state *source, ancestor = ancestor->parent) { if (ancestor == dest) { return ancestor->parent; - } else if (share_paren(dest, ancestor)) { + } else if (share_parent(dest, ancestor)) { return ancestor; } } @@ -291,10 +291,10 @@ void smf_set_state(struct smf_ctx *const ctx, const struct smf_state *new_state) #ifdef CONFIG_SMF_ANCESTOR_SUPPORT const struct smf_state *topmost; - if (share_paren(ctx->executing, new_state)) { + if (share_parent(ctx->executing, new_state)) { /* new state is a parent of where we are now*/ topmost = new_state; - } else if (share_paren(new_state, ctx->executing)) { + } else if (share_parent(new_state, ctx->executing)) { /* we are a parent of the new state */ topmost = ctx->executing; } else {