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
f9a6db0f
Unverified
Commit
f9a6db0f
authored
Nov 03, 2017
by
davidcunado-arm
Committed by
GitHub
Nov 03, 2017
Browse files
Merge pull request #1151 from JoelHutton/jh/MISRA-Mandatory
Change sizeof to use type of struct not function
parents
157650c7
2614ea3e
Changes
1
Show whitespace changes
Inline
Side-by-side
include/lib/el3_runtime/cpu_data.h
View file @
f9a6db0f
...
@@ -141,17 +141,17 @@ void init_cpu_ops(void);
...
@@ -141,17 +141,17 @@ void init_cpu_ops(void);
#define set_cpu_data(_m, _v) _cpu_data()->_m = _v
#define set_cpu_data(_m, _v) _cpu_data()->_m = _v
#define get_cpu_data_by_index(_ix, _m) _cpu_data_by_index(_ix)->_m
#define get_cpu_data_by_index(_ix, _m) _cpu_data_by_index(_ix)->_m
#define set_cpu_data_by_index(_ix, _m, _v) _cpu_data_by_index(_ix)->_m = _v
#define set_cpu_data_by_index(_ix, _m, _v) _cpu_data_by_index(_ix)->_m = _v
/* ((cpu_data_t *)0)->_m is a dummy to get the sizeof the struct member _m */
#define flush_cpu_data(_m) flush_dcache_range((uintptr_t) \
#define flush_cpu_data(_m) flush_dcache_range((uintptr_t) \
&(_cpu_data()->_m), \
&(_cpu_data()->_m), \
sizeof(
_
cpu_data
(
)->_m))
sizeof(
((
cpu_data
_t *)0
)->_m))
#define inv_cpu_data(_m) inv_dcache_range((uintptr_t) \
#define inv_cpu_data(_m) inv_dcache_range((uintptr_t) \
&(_cpu_data()->_m), \
&(_cpu_data()->_m), \
sizeof(
_
cpu_data
(
)->_m))
sizeof(
((
cpu_data
_t *)0
)->_m))
#define flush_cpu_data_by_index(_ix, _m) \
#define flush_cpu_data_by_index(_ix, _m) \
flush_dcache_range((uintptr_t) \
flush_dcache_range((uintptr_t) \
&(_cpu_data_by_index(_ix)->_m), \
&(_cpu_data_by_index(_ix)->_m), \
sizeof(
_
cpu_data_
by_index(_ix
)->_m))
sizeof(
((
cpu_data_
t *)0
)->_m))
#endif
/* __ASSEMBLY__ */
#endif
/* __ASSEMBLY__ */
...
...
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