Re: [U-Boot] [PATCH v4 1/3] lib: add rand() function

2012-05-11 Thread Michael Walle
Am Freitag 11 Mai 2012, 23:29:47 schrieb Wolfgang Denk: > Dear Michael Walle, > > In message <201205112320.15462.mich...@walle.cc> you wrote: > > > This is inconsequent. Either we assume that the user will seed > > > srand(), then y should not be initialized at all, so it goes to the > > > BSS se

Re: [U-Boot] [PATCH v4 1/3] lib: add rand() function

2012-05-11 Thread Wolfgang Denk
Dear Michael Walle, In message <201205112320.15462.mich...@walle.cc> you wrote: > > > This is inconsequent. Either we assume that the user will seed > > srand(), then y should not be initialized at all, so it goes to the > > BSS segment and does not waste space in the binary image. Or we want >

Re: [U-Boot] [PATCH v4 1/3] lib: add rand() function

2012-05-11 Thread Michael Walle
> please keep the ML on Cc: - thanks. sorry wrong key > In message <201205112249.27871.mich...@walle.cc> you wrote: > > > > > > +static unsigned int y = 2463534242U; > > > > > > > > > > Hm... can we introduce at least a little entropy somewhere? > > > > > > > > Mh? A user is supposed to seed vi

Re: [U-Boot] [PATCH v4 1/3] lib: add rand() function

2012-05-11 Thread Wolfgang Denk
Dear Michael Walle, please keep the ML on Cc: - thanks. In message <201205112249.27871.mich...@walle.cc> you wrote: > > > > > > +static unsigned int y = 2463534242U; > > > > > > > > Hm... can we introduce at least a little entropy somewhere? > > > > > > Mh? A user is supposed to seed via srand(

Re: [U-Boot] [PATCH v4 1/3] lib: add rand() function

2012-05-11 Thread Wolfgang Denk
Dear Michael Walle, In message <201205112232.20664.mich...@walle.cc> you wrote: > > > > +static unsigned int y = 2463534242U; > > > > Hm... can we introduce at least a little entropy somewhere? > Mh? A user is supposed to seed via srand(). Then why initialize y at all? Best regards, Wolfgang D

Re: [U-Boot] [PATCH v4 1/3] lib: add rand() function

2012-05-11 Thread Michael Walle
Am Freitag 11 Mai 2012, 21:20:02 schrieb Wolfgang Denk: > Dear Michael Walle, > > In message <1336671134-16342-2-git-send-email-mich...@walle.cc> you wrote: > > It's a PRNG using the simple and fast xorshift method. > > ... > > > +static unsigned int y = 2463534242U; > > Hm... can we introduce

Re: [U-Boot] [PATCH v4 1/3] lib: add rand() function

2012-05-11 Thread Wolfgang Denk
Dear Michael Walle, In message <1336671134-16342-2-git-send-email-mich...@walle.cc> you wrote: > It's a PRNG using the simple and fast xorshift method. ... > +static unsigned int y = 2463534242U; Hm... can we introduce at least a little entropy somewhere? Best regards, Wolfgang Denk -- DENX