[SLOF] [PATCH] Add a global "dir" method

Segher Boessenkool segher at kernel.crashing.org
Fri Jun 10 06:02:01 AEST 2016

On Thu, Jun 09, 2016 at 10:13:41PM +1000, Benjamin Herrenschmidt wrote:
> On Thu, 2016-06-09 at 03:27 -0500, Segher Boessenkool wrote:
> > 
> > Yes, ten gazillion inputs and outputs now ;-)
> > 
> > You already store that state slightly later, why not do it here already
> > and have simpler code, much easier to read?
> I tried, I actually had it that way... not that much easier and I'm
> paranoid. If I want to come back in 2 years and use find-path for
> something else, and forget it clobbers the global is-dir ... I really
> really hate side effects :)

But *most* things do change state, already.  What is on the *stack* is
state.  Putting things in a locally-used variable is not so bad.

Anyway, your choice :-)


More information about the SLOF mailing list