Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
70deca9f
Commit
70deca9f
authored
Jun 26, 2009
by
Mike Frysinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Blackfin: convert malloc()/memset() to zalloc() in module code
Signed-off-by:
Mike Frysinger
<
vapier@gentoo.org
>
parent
dc6b1ac9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
arch/blackfin/kernel/module.c
arch/blackfin/kernel/module.c
+2
-4
No files found.
arch/blackfin/kernel/module.c
View file @
70deca9f
...
...
@@ -98,14 +98,13 @@ module_frob_arch_sections(Elf_Ehdr * hdr, Elf_Shdr * sechdrs,
if
(
strcmp
(
".l1.bss"
,
secstrings
+
s
->
sh_name
)
==
0
||
((
strcmp
(
".bss"
,
secstrings
+
s
->
sh_name
)
==
0
)
&&
(
hdr
->
e_flags
&
EF_BFIN_DATA_IN_L1
)
&&
(
s
->
sh_size
>
0
)))
{
dest
=
l1_data_sram_alloc
(
s
->
sh_size
);
dest
=
l1_data_sram_
z
alloc
(
s
->
sh_size
);
mod
->
arch
.
bss_a_l1
=
dest
;
if
(
dest
==
NULL
)
{
pr_err
(
"L1 data memory allocation failed
\n
"
,
mod
->
name
);
return
-
1
;
}
memset
(
dest
,
0
,
s
->
sh_size
);
s
->
sh_flags
&=
~
SHF_ALLOC
;
s
->
sh_addr
=
(
unsigned
long
)
dest
;
}
...
...
@@ -164,14 +163,13 @@ module_frob_arch_sections(Elf_Ehdr * hdr, Elf_Shdr * sechdrs,
if
(
strcmp
(
".l2.bss"
,
secstrings
+
s
->
sh_name
)
==
0
||
((
strcmp
(
".bss"
,
secstrings
+
s
->
sh_name
)
==
0
)
&&
(
hdr
->
e_flags
&
EF_BFIN_DATA_IN_L2
)
&&
(
s
->
sh_size
>
0
)))
{
dest
=
l2_sram_alloc
(
s
->
sh_size
);
dest
=
l2_sram_
z
alloc
(
s
->
sh_size
);
mod
->
arch
.
bss_l2
=
dest
;
if
(
dest
==
NULL
)
{
pr_err
(
"L2 SRAM allocation failed
\n
"
,
mod
->
name
);
return
-
1
;
}
memset
(
dest
,
0
,
s
->
sh_size
);
s
->
sh_flags
&=
~
SHF_ALLOC
;
s
->
sh_addr
=
(
unsigned
long
)
dest
;
}
...
...
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