Unverified Commit 7a147670 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Mark Brown
Browse files

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: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://msgid.link/r/35c4edf2dbc6d4f24fb771341ded2989ae32f779.1715512259.git.christophe.jaillet@wanadoo.fr


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent aea07a98
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -128,11 +128,11 @@ struct regulator;
 *
 * @supply:       The name of the supply.  Initialised by the user before
 *                using the bulk regulator APIs.
 * @consumer:     The regulator consumer for the supply.  This will be managed
 *                by the bulk API.
 * @init_load_uA: After getting the regulator, regulator_set_load() will be
 *                called with this load.  Initialised by the user before
 *                using the bulk regulator APIs.
 * @consumer:     The regulator consumer for the supply.  This will be managed
 *                by the bulk API.
 *
 * The regulator APIs provide a series of regulator_bulk_() API calls as
 * a convenience to consumers which require multiple supplies.  This
@@ -140,8 +140,8 @@ struct regulator;
 */
struct regulator_bulk_data {
	const char *supply;
	int init_load_uA;
	struct regulator *consumer;
	int init_load_uA;

	/* private: Internal use */
	int ret;