On Sun, Jul 05, 2020 at 10:27:36AM -0700, Linus Torvalds wrote: > On Sun, Jul 5, 2020 at 6:02 AM Luc Van Oostenryck > <luc.vanoostenryck@xxxxxxxxx> wrote: > > > > lib.c contains 2-3 helpers for parsing. Move them to parse.c. > > This makes sense, because it's not a "library" function if it's only > used in one place. > > HOWEVER. > > When doing things like this, please also mark the resulting function > static and remove the declaration from lib.h. > > Otherwise it's entirely pointless, I feel. > > Either it's a library function that gets used from other places (and > lib.c/lib.h is an appropriate place), or it's a parsing-only helper > function that _doesn't_ get used from other places (and it should be > moved to parse.c and be static). > > Not this half-way state that this patch seems to create. Yes, I agree. I see them as parsing-only helpers hence the move but (just) expect() is also used in expression.c. I suppose it should be fine to move the declaration to parse.h despite not being ideal. Or maybe, I should just leave them in lib.c -- Luc