]> git.baikalelectronics.ru Git - kernel.git/commit
random: simplify loop in random_read
authorGreg Price <price@MIT.EDU>
Fri, 29 Nov 2013 20:02:33 +0000 (15:02 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 20 Mar 2014 02:18:50 +0000 (22:18 -0400)
commit7899a0df65444128881ded27934f74655713650a
tree598dfb6d4e4caa8ae10e8f04b76cd36d868e6ad3
parent1123304a59f1b439e7a8274f0948e892fbd44afc
random: simplify loop in random_read

The loop condition never changes until just before a break, so we
might as well write it as a constant.  Also since 61a683c30d4d
("random: drop weird m_time/a_time manipulation") we don't do anything
after the loop finishes, so the 'break's might as well return
directly.  Some other simplifications.

There should be no change in behavior introduced by this commit.

Signed-off-by: Greg Price <price@mit.edu>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
drivers/char/random.c