Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
06fb3199
Commit
06fb3199
authored
Oct 07, 2002
by
Dave Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] random fixes for random.c
Make things static, and remove hardcoded value
parent
dead19d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
drivers/char/random.c
drivers/char/random.c
+3
-3
No files found.
drivers/char/random.c
View file @
06fb3199
...
...
@@ -414,13 +414,13 @@ static void sysctl_init_random(struct entropy_store *random_state);
* deal with a variable rotate of x bits. So we use a bit of asm magic.
*/
#if (!defined (__i386__))
extern
inline
__u32
rotate_left
(
int
i
,
__u32
word
)
static
inline
__u32
rotate_left
(
int
i
,
__u32
word
)
{
return
(
word
<<
i
)
|
(
word
>>
(
32
-
i
));
}
#else
extern
inline
__u32
rotate_left
(
int
i
,
__u32
word
)
static
inline
__u32
rotate_left
(
int
i
,
__u32
word
)
{
__asm__
(
"roll %%cl,%0"
:
"=r"
(
word
)
...
...
@@ -1643,7 +1643,7 @@ random_ioctl(struct inode * inode, struct file * file,
return
-
EINVAL
;
if
(
size
>
random_state
->
poolinfo
.
poolwords
)
size
=
random_state
->
poolinfo
.
poolwords
;
if
(
copy_to_user
(
p
,
random_state
->
pool
,
size
*
4
))
if
(
copy_to_user
(
p
,
random_state
->
pool
,
size
*
sizeof
(
__u32
)
))
return
-
EFAULT
;
return
0
;
case
RNDADDENTROPY
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment