Skip to contentSkip to conversation

regmap: sdw-mbq: Reorder regmap_mbq_context struct for better packing

PATCH Superseded Charles Keepax 2 participants 2 messages Nov 6, 2025

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 regmap: sdw-mbq: Reorder regmap_mbq_context struct for better packing

Reduce the packing by reordering the regmap_mbq_context structure.

---
 drivers/base/regmap/regmap-sdw-mbq.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/base/regmap/regmap-sdw-mbq.c +2 -1
index 86644bbd07100..225c158d7f9d7 100644
@@ -16,10 +16,11 @@
 struct regmap_mbq_context {
 	struct device *dev;
 
+	bool (*readable_reg)(struct device *dev, unsigned int reg);
+
 	struct regmap_sdw_mbq_cfg cfg;
 
 	int val_size;
-	bool (*readable_reg)(struct device *dev, unsigned int reg);
 };
 
 static int regmap_sdw_mbq_size(struct regmap_mbq_context *ctx, unsigned int reg)
Signature · 1 line
2.47.3
maintainer
#1 lore raw
Quoted 1 line · Charles Keepax

Reduce the packing by reordering the regmap_mbq_context structure.

Surely increase/improve the packing? Usually I'd expect a patch like this to quote some data showing the improvement (eg, pahole output or structure size).