Skip to content

Commit 557e28f

Browse files
plbossartvinodkoul
authored andcommitted
soundwire: optimize sdw_dp0_prop
Move pointers and booleans. Before: struct sdw_dp0_prop { u32 max_word; /* 0 4 */ u32 min_word; /* 4 4 */ u32 num_words; /* 8 4 */ /* XXX 4 bytes hole, try to pack */ u32 * words; /* 16 8 */ bool BRA_flow_controlled; /* 24 1 */ bool simple_ch_prep_sm; /* 25 1 */ /* XXX 2 bytes hole, try to pack */ u32 ch_prep_timeout; /* 28 4 */ bool imp_def_interrupts; /* 32 1 */ /* size: 40, cachelines: 1, members: 8 */ /* sum members: 27, holes: 2, sum holes: 6 */ /* padding: 7 */ /* last cacheline: 40 bytes */ }; after: struct sdw_dp0_prop { u32 * words; /* 0 8 */ u32 max_word; /* 8 4 */ u32 min_word; /* 12 4 */ u32 num_words; /* 16 4 */ u32 ch_prep_timeout; /* 20 4 */ bool BRA_flow_controlled; /* 24 1 */ bool simple_ch_prep_sm; /* 25 1 */ bool imp_def_interrupts; /* 26 1 */ /* size: 32, cachelines: 1, members: 8 */ /* padding: 5 */ /* last cacheline: 32 bytes */ }; Signed-off-by: Pierre-Louis Bossart <[email protected]> Signed-off-by: Bard Liao <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 1c758df commit 557e28f

File tree

1 file changed

+4
-4
lines changed
  • include/linux/soundwire

1 file changed

+4
-4
lines changed

include/linux/soundwire/sdw.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,16 +226,16 @@ enum sdw_clk_stop_mode {
226226

227227
/**
228228
* struct sdw_dp0_prop - DP0 properties
229+
* @words: wordlengths supported
229230
* @max_word: Maximum number of bits in a Payload Channel Sample, 1 to 64
230231
* (inclusive)
231232
* @min_word: Minimum number of bits in a Payload Channel Sample, 1 to 64
232233
* (inclusive)
233234
* @num_words: number of wordlengths supported
234-
* @words: wordlengths supported
235+
* @ch_prep_timeout: Port-specific timeout value, in milliseconds
235236
* @BRA_flow_controlled: Slave implementation results in an OK_NotReady
236237
* response
237238
* @simple_ch_prep_sm: If channel prepare sequence is required
238-
* @ch_prep_timeout: Port-specific timeout value, in milliseconds
239239
* @imp_def_interrupts: If set, each bit corresponds to support for
240240
* implementation-defined interrupts
241241
*
@@ -244,13 +244,13 @@ enum sdw_clk_stop_mode {
244244
* support
245245
*/
246246
struct sdw_dp0_prop {
247+
u32 *words;
247248
u32 max_word;
248249
u32 min_word;
249250
u32 num_words;
250-
u32 *words;
251+
u32 ch_prep_timeout;
251252
bool BRA_flow_controlled;
252253
bool simple_ch_prep_sm;
253-
u32 ch_prep_timeout;
254254
bool imp_def_interrupts;
255255
};
256256

0 commit comments

Comments
 (0)