Commit fc072f5
committed
[rescue,usb] Avoid large rodata initializer for dfu_ctx_t
The `dfu_ctx_t` struct has a large buffer allocated for USB
transfers. Using a designated initializer for this struct
produces a large, mostly zero-filled initializer in `rodata`,
consuming approximately 2.5K of ROM_EXT flash space.
To reclaim this space, this change replaces the designated
initializer with manual field-by-field initialization, eliminating
the bloated `rodata` payload.
Change-Id: Ifbbdc4977104cc980677af2b8ca61507d592f1a3
Signed-off-by: Yi-Hsuan Deng <yhdeng@google.com>1 parent 7ccbcd6 commit fc072f5
2 files changed
Lines changed: 13 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
164 | 165 | | |
165 | 166 | | |
166 | 167 | | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
177 | 176 | | |
178 | 177 | | |
179 | 178 | | |
| |||
0 commit comments