Commit 7b3aabc0 authored by Soby Mathew's avatar Soby Mathew
Browse files

Use designated initialization in DECLARE_RT_SVC macro

This patch changes the anonymous initialization of `rt_svc_desc_t` structure
by the `DECLARE_RT_SVC` macro to designated initialization. This makes the
code more robust and less sensitive to potential changes to the
`rt_svc_desc_t` structure.

Change-Id: If6f1586730c0d29d92ef09e07eff7dd0d22857c7
parent 5773b532
...@@ -89,12 +89,12 @@ typedef struct rt_svc_desc { ...@@ -89,12 +89,12 @@ typedef struct rt_svc_desc {
#define DECLARE_RT_SVC(_name, _start, _end, _type, _setup, _smch) \ #define DECLARE_RT_SVC(_name, _start, _end, _type, _setup, _smch) \
static const rt_svc_desc_t __svc_desc_ ## _name \ static const rt_svc_desc_t __svc_desc_ ## _name \
__attribute__ ((section("rt_svc_descs"), used)) = { \ __attribute__ ((section("rt_svc_descs"), used)) = { \
_start, \ .start_oen = _start, \
_end, \ .end_oen = _end, \
_type, \ .call_type = _type, \
#_name, \ .name = #_name, \
_setup, \ .init = _setup, \
_smch } .handle = _smch }
/* /*
* Compile time assertions related to the 'rt_svc_desc' structure to: * Compile time assertions related to the 'rt_svc_desc' structure to:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment