From: Stefan Beller Date: Mon, 03 Apr 2017 22:48:40 GMT Subject: Re: [PATCH v7 3/5] dir_iterator: add helpers to dir_iterator_advance Message-ID: In-Reply-To: <1491163388-41255-4-git-send-email-bnmvco@gmail.com> On Sun, Apr 2, 2017 at 1:03 PM, Daniel Ferreira wrote: > Create inline helpers to dir_iterator_advance(). Make > dir_iterator_advance()'s code more legible and allow some behavior to > be reusable. > > Signed-off-by: Daniel Ferreira > --- > +static inline void push_dir_level(struct dir_iterator_int *iter, struct dir_iterator_level *level) Sometimes we use inline, sometimes we do not: $ git grep "static inline" -- *.c |wc -l 84 $ git grep "static inline" -- *.h |wc -l 130 # approximate a function definition: $ git grep -e "static" -- *.c |grep "("|wc -l 2971 So I think we'd want to have the inline keyword in the header only (when the code is actually to be inlined). As a C file is one translation unit, the compiler can figure out best whether to inline a particular static function on its own. The rest looks good to me, Thanks, Stefan