Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Arm Trusted Firmware
Commits
e109b0ff
Unverified
Commit
e109b0ff
authored
6 years ago
by
Dimitris Papastamos
Committed by
GitHub
6 years ago
Browse files
Options
Download
Plain Diff
Merge pull request #1391 from jts-arm/misra
MISRA rule 21.15 fix
parents
42be6fc5
bdcd33a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/xlat_tables_v2/xlat_tables_internal.c
+4
-3
lib/xlat_tables_v2/xlat_tables_internal.c
with
4 additions
and
3 deletions
+4
-3
lib/xlat_tables_v2/xlat_tables_internal.c
View file @
e109b0ff
...
...
@@ -735,7 +735,7 @@ static int mmap_add_region_check(xlat_ctx_t *ctx, const mmap_region_t *mm)
void
mmap_add_region_ctx
(
xlat_ctx_t
*
ctx
,
const
mmap_region_t
*
mm
)
{
mmap_region_t
*
mm_cursor
=
ctx
->
mmap
;
mmap_region_t
*
mm_cursor
=
ctx
->
mmap
,
*
mm_destination
;
const
mmap_region_t
*
mm_end
=
ctx
->
mmap
+
ctx
->
mmap_num
;
mmap_region_t
*
mm_last
;
unsigned
long
long
end_pa
=
mm
->
base_pa
+
mm
->
size
-
1
;
...
...
@@ -802,9 +802,10 @@ void mmap_add_region_ctx(xlat_ctx_t *ctx, const mmap_region_t *mm)
* that there is free space.
*/
assert
(
mm_last
->
size
==
0U
);
/* Make room for new region by moving other regions up by one place */
memmove
(
mm_cursor
+
1
,
mm_cursor
,
mm_destination
=
mm_cursor
+
1
;
memmove
(
mm_destination
,
mm_cursor
,
(
uintptr_t
)
mm_last
-
(
uintptr_t
)
mm_cursor
);
/*
...
...
This diff is collapsed.
Click to expand it.
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