Re: [PATCH 2/7] lib/random32.c: Remove excess calls to prandom_u32_state in initialization

2014-06-08 Thread George Spelvin
Thank you for your time and attention on all these comments. > Fine by me although we simply resembled initialization code from > GSL here. I think that your subject line is a bit misleading though. Yes, I had a hard time coming up with a good summary. I'm removing *static* calls but not

Re: [PATCH 2/7] lib/random32.c: Remove excess calls to prandom_u32_state in initialization

2014-06-08 Thread Daniel Borkmann
On 06/07/2014 10:20 AM, George Spelvin wrote: Unrolling code in single-use code paths is just silly. There are two instances: 1) prandom_warmup() calls 10 times. 2) prandom_state_selftest() can avoid one call and simplify the loop logic by repeating an assignment to a local variable

Re: [PATCH 2/7] lib/random32.c: Remove excess calls to prandom_u32_state in initialization

2014-06-08 Thread Daniel Borkmann
On 06/07/2014 10:20 AM, George Spelvin wrote: Unrolling code in single-use code paths is just silly. There are two instances: 1) prandom_warmup() calls 10 times. 2) prandom_state_selftest() can avoid one call and simplify the loop logic by repeating an assignment to a local variable

Re: [PATCH 2/7] lib/random32.c: Remove excess calls to prandom_u32_state in initialization

2014-06-08 Thread George Spelvin
Thank you for your time and attention on all these comments. Fine by me although we simply resembled initialization code from GSL here. I think that your subject line is a bit misleading though. Yes, I had a hard time coming up with a good summary. I'm removing *static* calls but not dynamic

[PATCH 2/7] lib/random32.c: Remove excess calls to prandom_u32_state in initialization

2014-06-07 Thread George Spelvin
Unrolling code in single-use code paths is just silly. There are two instances: 1) prandom_warmup() calls 10 times. 2) prandom_state_selftest() can avoid one call and simplify the loop logic by repeating an assignment to a local variable (that probably adds zero code anyway)

[PATCH 2/7] lib/random32.c: Remove excess calls to prandom_u32_state in initialization

2014-06-07 Thread George Spelvin
Unrolling code in single-use code paths is just silly. There are two instances: 1) prandom_warmup() calls 10 times. 2) prandom_state_selftest() can avoid one call and simplify the loop logic by repeating an assignment to a local variable (that probably adds zero code anyway)