Re: [PATCH v2 04/15] rv: Cast result of model_get_*_name()
From: Nam Cao
Date: Wed Oct 14 2026 - 06:07:25 EST
Gabriele Monaco <gmonaco@xxxxxxxxxx> writes:
> The reason I initially didn't do this was that some lines get beyond 100
> characters adding the const, so I'd need to break them and make rvgen even more
> complicated to generate things (TL;DR still laziness).
There is also coccinelle which can automate this and can handle the 100
column limit. Just FYI.
> I'm actually taking a different approach and storing everything in macros like:
>
> #define DEFINE_DA_EVENT(name) \
> DEFINE_EVENT(event_da_monitor, name, \
> TP_PROTO(char *state, char *event, \
> char *next_state, bool final_state), \
> TP_ARGS(state, event, next_state, final_state))
>
> So both per-monitor trace headers and rvgen get simpler and if we ever need to
> change something again, it comes for free.
Sounds good.
Nam