lkml.org 
[lkml]   [2022]   [Jul]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V9 03/16] rv/include: Add helper functions for deterministic automata
On Fri, Jul 29, 2022 at 11:38:42AM +0200, Daniel Bristot de Oliveira wrote:

[...]

> +static inline type model_get_next_state_##name(enum states_##name curr_state, \
> + enum events_##name event) \
> +{ \
> + if ((curr_state < 0) || (curr_state >= state_max_##name)) \
> + return INVALID_STATE; \
> + \
> + if ((event < 0) || (event >= event_max_##name)) \
> + return INVALID_STATE; \

Should define the INVALID_EVENT corresponding to event invalid case.

\
 
 \ /
  Last update: 2022-07-31 17:15    [W:0.147 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site