On Fri, 2019-10-18 at 15:49 -0700, Ira Weiny wrote:
> On Fri, Oct 18, 2019 at 05:06:10PM -0400, Jeff Moyer wrote:
> > Ira Weiny <ira.we...@intel.com> writes:
> > 
> > > On Fri, Oct 18, 2019 at 04:23:01PM -0400, Jeff Moyer wrote:
> > > > The 'done' variable only adds confusion.
> > > > 
> > > >                         goto out;
> > > >                 }
> > > > -       } while (!done);
> > > > +       } while (true);
> > > 
> > > I'm not a fan of "while (true)".  But I'm not the maintainer.  The Logic 
> > > seems
> > > fine otherwise.
> > 
> > The way things stand today is a mashup of goto vs. break.  I'll
> > follow-up with fixed up patch next week if there is consensus on the
> > change.  If you have a suggestion for a better way, that's welcome as
> > well.
> 
> Yea that is the reason I did not object strongly.  I don't have a good idea of
> how to clean the loop up without a pretty big refactoring.  Which I'm not
> prepared to do.  :-/  So if Vishal is ok with it, I am.

I looked into this - and I agree that while (true) isn't the greatest.
I think we can refactor it to loop off the timeout value, and that keeps
the loop always bounded. For other cases we break out as usual.

For now, we can go with the simpler fixup, and revisit the bigger
refactoring later.

Thanks,
-Vishal
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-le...@lists.01.org

Reply via email to