aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKirtika Ruchandani <kirtika@chromium.org>2016-11-24 19:51:17 -0500
committerMark Brown <broonie@kernel.org>2016-11-25 08:01:36 -0500
commitdaaadbf07433b15c452b2ff411a293b2ccd98e03 (patch)
treeeeeff948394bba771499504aed20b6909eff2457
parent1001354ca34179f3db924eb66672442a173147dc (diff)
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>
-rw-r--r--drivers/base/regmap/regcache-lzo.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/base/regmap/regcache-lzo.c b/drivers/base/regmap/regcache-lzo.c
index 6f77d7319fc6..4ff311374c4a 100644
--- a/drivers/base/regmap/regcache-lzo.c
+++ b/drivers/base/regmap/regcache-lzo.c
@@ -236,15 +236,13 @@ static int regcache_lzo_read(struct regmap *map,
236{ 236{
237 struct regcache_lzo_ctx *lzo_block, **lzo_blocks; 237 struct regcache_lzo_ctx *lzo_block, **lzo_blocks;
238 int ret, blkindex, blkpos; 238 int ret, blkindex, blkpos;
239 size_t blksize, tmp_dst_len; 239 size_t tmp_dst_len;
240 void *tmp_dst; 240 void *tmp_dst;
241 241
242 /* index of the compressed lzo block */ 242 /* index of the compressed lzo block */
243 blkindex = regcache_lzo_get_blkindex(map, reg); 243 blkindex = regcache_lzo_get_blkindex(map, reg);
244 /* register index within the decompressed block */ 244 /* register index within the decompressed block */
245 blkpos = regcache_lzo_get_blkpos(map, reg); 245 blkpos = regcache_lzo_get_blkpos(map, reg);
246 /* size of the compressed block */
247 blksize = regcache_lzo_get_blksize(map);
248 lzo_blocks = map->cache; 246 lzo_blocks = map->cache;
249 lzo_block = lzo_blocks[blkindex]; 247 lzo_block = lzo_blocks[blkindex];
250 248
@@ -275,15 +273,13 @@ static int regcache_lzo_write(struct regmap *map,
275{ 273{
276 struct regcache_lzo_ctx *lzo_block, **lzo_blocks; 274 struct regcache_lzo_ctx *lzo_block, **lzo_blocks;
277 int ret, blkindex, blkpos; 275 int ret, blkindex, blkpos;
278 size_t blksize, tmp_dst_len; 276 size_t tmp_dst_len;
279 void *tmp_dst; 277 void *tmp_dst;
280 278
281 /* index of the compressed lzo block */ 279 /* index of the compressed lzo block */
282 blkindex = regcache_lzo_get_blkindex(map, reg); 280 blkindex = regcache_lzo_get_blkindex(map, reg);
283 /* register index within the decompressed block */ 281 /* register index within the decompressed block */
284 blkpos = regcache_lzo_get_blkpos(map, reg); 282 blkpos = regcache_lzo_get_blkpos(map, reg);
285 /* size of the compressed block */
286 blksize = regcache_lzo_get_blksize(map);
287 lzo_blocks = map->cache; 283 lzo_blocks = map->cache;
288 lzo_block = lzo_blocks[blkindex]; 284 lzo_block = lzo_blocks[blkindex];
289 285