Skip to contentSkip to conversation

regmap: drop LZO cache support

PATCH New Jonas Gorski 1 participant 1 message Jun 3, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 regmap: drop LZO cache support

This is effectivly a revert of 2cbbb579bcbe3 ("regmap: Add the LZO cache support").

After it was added there were never any users added, the only submitted user was changed to RBTREE before being added. It has been unused code for almost six years. Since LZO support itself has its own size, it currently is rather a deoptimization.

Saves ~46 kB on MIPS (size of LZO support + regcache LZO code).

---
V1 -> V2:
* remove code instead of hide code behind Kconfig option

 drivers/base/regmap/Kconfig        |   2 -
 drivers/base/regmap/Makefile       |   2 +-
 drivers/base/regmap/internal.h     |   1 -
 drivers/base/regmap/regcache-lzo.c | 374 -------------------------------------
 drivers/base/regmap/regcache.c     |   1 -
 include/linux/regmap.h             |   1 -
 6 files changed, 1 insertion(+), 380 deletions(-)
 delete mode 100644 drivers/base/regmap/regcache-lzo.c
drivers/base/regmap/Kconfig +0 -2
index db9d00c36a3e..32b1ee91d1b4 100644
@@ -4,8 +4,6 @@
 
 config REGMAP
 	default y if (REGMAP_I2C || REGMAP_SPI || REGMAP_SPMI || REGMAP_AC97 || REGMAP_MMIO || REGMAP_IRQ)
-	select LZO_COMPRESS
-	select LZO_DECOMPRESS
 	select IRQ_DOMAIN if REGMAP_IRQ
 	bool
 
drivers/base/regmap/Makefile +1 -1
index 609e4c84f485..0ba68a269805 100644
@@ -2,7 +2,7 @@
 CFLAGS_regmap.o := -I$(src)
 
 obj-$(CONFIG_REGMAP) += regmap.o regcache.o
-obj-$(CONFIG_REGMAP) += regcache-rbtree.o regcache-lzo.o regcache-flat.o
+obj-$(CONFIG_REGMAP) += regcache-rbtree.o regcache-flat.o
 obj-$(CONFIG_DEBUG_FS) += regmap-debugfs.o
 obj-$(CONFIG_REGMAP_AC97) += regmap-ac97.o
 obj-$(CONFIG_REGMAP_I2C) += regmap-i2c.o
drivers/base/regmap/internal.h +0 -1
index 2a4435d76028..c7cd47bd797d 100644
@@ -255,7 +255,6 @@ enum regmap_endian regmap_get_val_endian(struct device *dev,
 					 const struct regmap_config *config);
 
 extern struct regcache_ops regcache_rbtree_ops;
-extern struct regcache_ops regcache_lzo_ops;
 extern struct regcache_ops regcache_flat_ops;
 
 static inline const char *regmap_name(const struct regmap *map)
drivers/base/regmap/regcache-lzo.c deleted +0 -374

374 lines not on this page · raw message

drivers/base/regmap/regcache.c +0 -1
index b0a0dcf32fb7..778c86821f8c 100644
@@ -21,7 +21,6 @@
 
 static const struct regcache_ops *cache_types[] = {
 	&regcache_rbtree_ops,
-	&regcache_lzo_ops,
 	&regcache_flat_ops,
 };
 
include/linux/regmap.h +0 -1
index e88649225a60..ff2886792c16 100644
@@ -35,7 +35,6 @@ struct snd_ac97;
 enum regcache_type {
 	REGCACHE_NONE,
 	REGCACHE_RBTREE,
-	REGCACHE_COMPRESSED,
 	REGCACHE_FLAT,
 };
 
Signature · 1 line
2.11.0