From ae85da1c90b6bb824091dfe2960b6cf5b443aab2 Mon Sep 17 00:00:00 2001 From: Jennifer Williams Date: Mon, 17 May 2021 16:38:40 -0700 Subject: [PATCH] kernel: poll: fix coding guideline 15.7 missing comment The final else {} in the if...else if is missing required comment (non-empty, ';' is not sufficient). This adds a comment to comply with CG 15.7. Signed-off-by: Jennifer Williams --- kernel/poll.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kernel/poll.c b/kernel/poll.c index 055dbc012fe3d2..53119c393435d9 100644 --- a/kernel/poll.c +++ b/kernel/poll.c @@ -230,6 +230,10 @@ static inline int register_events(struct k_poll_event *events, register_event(&events[ii], poller); events_registered += 1; } else { + /* Event is not one of those identified in is_condition_met() + * catching non-polling events, or is marked for just check, + * or not marked for polling. No action needed. + */ ; } k_spin_unlock(&lock, key); @@ -424,6 +428,7 @@ static int signal_poll_event(struct k_poll_event *event, uint32_t state) } else if (poller->mode == MODE_TRIGGERED) { retcode = signal_triggered_work(event, state); } else { + /* Poller is not poll or triggered mode. No action needed.*/ ; }