Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

regmap: cache: Remove unused 'blksize' variable

Commit 2cbbb579bcbe ("regmap: Add the LZO cache support") introduced
'blksize' in regcache_lzo_read() and regcache_lzo_write(), that is
set but not used. Compiling with W=1 gives the following warnings,
fix them.

drivers/base/regmap/regcache-lzo.c: In function ‘regcache_lzo_read’:
drivers/base/regmap/regcache-lzo.c:239:9: warning: variable ‘blksize’ set but not used [-Wunused-but-set-variable]
size_t blksize, tmp_dst_len;
^
drivers/base/regmap/regcache-lzo.c: In function ‘regcache_lzo_write’:
drivers/base/regmap/regcache-lzo.c:278:9: warning: variable ‘blksize’ set but not used [-Wunused-but-set-variable]
size_t blksize, tmp_dst_len;
^

These are harmless warnings and are only being fixed to reduce the
noise with W=1 in the kernel.

Fixes: 2cbbb579bcbe ("regmap: Add the LZO cache support")
Cc: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Kirtika Ruchandani <kirtika@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Kirtika Ruchandani and committed by
Mark Brown
daaadbf0 1001354c

+2 -6
+2 -6
drivers/base/regmap/regcache-lzo.c
··· 236 236 { 237 237 struct regcache_lzo_ctx *lzo_block, **lzo_blocks; 238 238 int ret, blkindex, blkpos; 239 - size_t blksize, tmp_dst_len; 239 + size_t tmp_dst_len; 240 240 void *tmp_dst; 241 241 242 242 /* index of the compressed lzo block */ 243 243 blkindex = regcache_lzo_get_blkindex(map, reg); 244 244 /* register index within the decompressed block */ 245 245 blkpos = regcache_lzo_get_blkpos(map, reg); 246 - /* size of the compressed block */ 247 - blksize = regcache_lzo_get_blksize(map); 248 246 lzo_blocks = map->cache; 249 247 lzo_block = lzo_blocks[blkindex]; 250 248 ··· 273 275 { 274 276 struct regcache_lzo_ctx *lzo_block, **lzo_blocks; 275 277 int ret, blkindex, blkpos; 276 - size_t blksize, tmp_dst_len; 278 + size_t tmp_dst_len; 277 279 void *tmp_dst; 278 280 279 281 /* index of the compressed lzo block */ 280 282 blkindex = regcache_lzo_get_blkindex(map, reg); 281 283 /* register index within the decompressed block */ 282 284 blkpos = regcache_lzo_get_blkpos(map, reg); 283 - /* size of the compressed block */ 284 - blksize = regcache_lzo_get_blksize(map); 285 285 lzo_blocks = map->cache; 286 286 lzo_block = lzo_blocks[blkindex]; 287 287