Re: [PATCH 4/8] random: remove unused branch in hot code path

2017-04-27 Thread Geert Uytterhoeven
Hi Ted, (replying to an old thread) On Wed, Jan 18, 2017 at 5:35 AM, Theodore Ts'o wrote: > On Tue, Dec 27, 2016 at 11:40:23PM +0100, Stephan Müller wrote: >> The variable ip is defined to be a __u64 which is always 8 bytes on any >> architecture. Thus, the check for sizeof(ip) >

Re: [PATCH 4/8] random: remove unused branch in hot code path

2017-01-17 Thread Theodore Ts'o
On Tue, Dec 27, 2016 at 11:40:23PM +0100, Stephan Müller wrote: > The variable ip is defined to be a __u64 which is always 8 bytes on any > architecture. Thus, the check for sizeof(ip) > 4 will always be true. > > As the check happens in a hot code path, remove the branch. The fact that it's a

[PATCH 4/8] random: remove unused branch in hot code path

2016-12-27 Thread Stephan Müller
The variable ip is defined to be a __u64 which is always 8 bytes on any architecture. Thus, the check for sizeof(ip) > 4 will always be true. As the check happens in a hot code path, remove the branch. Signed-off-by: Stephan Mueller --- drivers/char/random.c | 3 +-- 1