Skip to content

Commit 7a14767

Browse files
tititiou36broonie
authored andcommitted
regulator: consumer: Reorder fields in 'struct regulator_bulk_data'
Based on pahole, 2 holes can be combined in 'struct regulator_bulk_data'. On x86_64 and allmodconfig, this shrinks the size of the structure from 32 to 24 bytes. This is usually a win, because this structure is often used for static global variables. As an example: Before: text data bss dec hex filename 3557 162 0 3719 e87 drivers/gpu/drm/msm/dsi/dsi_cfg.o After: text data bss dec hex filename 3477 162 0 3639 e37 drivers/gpu/drm/msm/dsi/dsi_cfg.o Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://msgid.link/r/35c4edf2dbc6d4f24fb771341ded2989ae32f779.1715512259.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent aea07a9 commit 7a14767

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

include/linux/regulator/consumer.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,20 +128,20 @@ struct regulator;
128128
*
129129
* @supply: The name of the supply. Initialised by the user before
130130
* using the bulk regulator APIs.
131+
* @consumer: The regulator consumer for the supply. This will be managed
132+
* by the bulk API.
131133
* @init_load_uA: After getting the regulator, regulator_set_load() will be
132134
* called with this load. Initialised by the user before
133135
* using the bulk regulator APIs.
134-
* @consumer: The regulator consumer for the supply. This will be managed
135-
* by the bulk API.
136136
*
137137
* The regulator APIs provide a series of regulator_bulk_() API calls as
138138
* a convenience to consumers which require multiple supplies. This
139139
* structure is used to manage data for these calls.
140140
*/
141141
struct regulator_bulk_data {
142142
const char *supply;
143-
int init_load_uA;
144143
struct regulator *consumer;
144+
int init_load_uA;
145145

146146
/* private: Internal use */
147147
int ret;

0 commit comments

Comments
 (0)