On Fri, 5 Nov 2021 17:21:55 +0200 Tzvetomir Stoyanov <tz.stoyanov@xxxxxxxxx> wrote: > The problem with that function is that it cannot be used to initialise > constant variables, gcc complains about that. The ffs() API has no > such problem Use a macro for the constant then. If it is a static inline, gcc should be good enough to optimize it out. It's just that max_dyn_index right? #define MAX_DYN_INDEX (bit_index(TRACEFS_DYNEVENT_MAX)) -- Steve