Subject: Re: Regression with wait_event_timeout in next-20140226

From: Peter Zijlstra <[email-masked]>
Date: Wed, 26 Feb 2014 23:35:00 +0100

On Wed, Feb 26, 2014 at 02:25:34PM -0800, Andrew Morton wrote:
> Is there anything we can do to make all this clearer?  Simply using a
> distinctive variable name ("__wait_var__"?) in place of __ret (and
> documenting it) would help a lot.

% s/\<__ret\>/__wait_var__/g should get you mostly there I suppose :-)

Although I'm not entirely sure __wait_var__ is a better name.

> Some __ret's are long and some are int.  Maybe that's a glitch, 

No that's on purpose.

The longs are needed to hold the timeout values, we truncate to an int
where we only need to return errors.

> maybe
> it's because some __ret's are used for inter-macro communications and
> some are not, which just makes things worse.

The timeout related ones are the worst. The others aren't nearly as bad.

> I started to do a patch, got all confused and gave up.  We've made
> quite a tangly mess in there, alas.

Hehe, yes, made a lot of duplicated code go away though. Maybe we
compressed too much, dunno.