Hi Alexandru On Tue, 15 Dec 2020 at 17:10, Alexandru Gagniuc <mr.nuke...@gmail.com> wrote: > > There's no point in guarding function prototypes with #ifdefs. If a > function is not defined, the linker will notice. Having the prototype > does not affect code size. > > What the #if guard takes away is the ability to use IS_ENABLED: > > if (CONFIG_IS ENABLED(FIT_IMAGE_POST_PROCESS)) > board_fit_config_name_match(...) > > When the prototype is guarded, the above form cannot be used. This > leads to the proliferation of #ifdefs, and unreadable code. The > opportunity cost of the #if guard outweighs any benefits. Remove it. > > Signed-off-by: Alexandru Gagniuc <mr.nuke...@gmail.com> > --- > include/image.h | 3 --- > 1 file changed, 3 deletions(-)
Yes indeed. Reviewed-by: Simon Glass <s...@chromium.org>