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
nexedi
linux
Commits
e98df50c
Commit
e98df50c
authored
Oct 20, 2005
by
Dave Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CPUFREQ] kzalloc conversions for cpufreq core.
Signed-off-by:
Dave Jones
<
davej@redhat.com
>
parent
bfdc708d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
6 deletions
+3
-6
drivers/cpufreq/cpufreq.c
drivers/cpufreq/cpufreq.c
+1
-2
drivers/cpufreq/cpufreq_stats.c
drivers/cpufreq/cpufreq_stats.c
+2
-4
No files found.
drivers/cpufreq/cpufreq.c
View file @
e98df50c
...
...
@@ -595,12 +595,11 @@ static int cpufreq_add_dev (struct sys_device * sys_dev)
goto
module_out
;
}
policy
=
k
m
alloc
(
sizeof
(
struct
cpufreq_policy
),
GFP_KERNEL
);
policy
=
k
z
alloc
(
sizeof
(
struct
cpufreq_policy
),
GFP_KERNEL
);
if
(
!
policy
)
{
ret
=
-
ENOMEM
;
goto
nomem_out
;
}
memset
(
policy
,
0
,
sizeof
(
struct
cpufreq_policy
));
policy
->
cpu
=
cpu
;
policy
->
cpus
=
cpumask_of_cpu
(
cpu
);
...
...
drivers/cpufreq/cpufreq_stats.c
View file @
e98df50c
...
...
@@ -192,9 +192,8 @@ cpufreq_stats_create_table (struct cpufreq_policy *policy,
unsigned
int
cpu
=
policy
->
cpu
;
if
(
cpufreq_stats_table
[
cpu
])
return
-
EBUSY
;
if
((
stat
=
k
m
alloc
(
sizeof
(
struct
cpufreq_stats
),
GFP_KERNEL
))
==
NULL
)
if
((
stat
=
k
z
alloc
(
sizeof
(
struct
cpufreq_stats
),
GFP_KERNEL
))
==
NULL
)
return
-
ENOMEM
;
memset
(
stat
,
0
,
sizeof
(
struct
cpufreq_stats
));
data
=
cpufreq_cpu_get
(
cpu
);
if
((
ret
=
sysfs_create_group
(
&
data
->
kobj
,
&
stats_attr_group
)))
...
...
@@ -216,12 +215,11 @@ cpufreq_stats_create_table (struct cpufreq_policy *policy,
alloc_size
+=
count
*
count
*
sizeof
(
int
);
#endif
stat
->
max_state
=
count
;
stat
->
time_in_state
=
k
m
alloc
(
alloc_size
,
GFP_KERNEL
);
stat
->
time_in_state
=
k
z
alloc
(
alloc_size
,
GFP_KERNEL
);
if
(
!
stat
->
time_in_state
)
{
ret
=
-
ENOMEM
;
goto
error_out
;
}
memset
(
stat
->
time_in_state
,
0
,
alloc_size
);
stat
->
freq_table
=
(
unsigned
int
*
)(
stat
->
time_in_state
+
count
);
#ifdef CONFIG_CPU_FREQ_STAT_DETAILS
...
...
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