Commit 5b7eb650 authored by Kirtika Ruchandani's avatar Kirtika Ruchandani Committed by Ben Hutchings

regmap: cache: Remove unused 'blksize' variable

commit daaadbf0 upstream.

Commit 2cbbb579 ("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: 2cbbb579 ("regmap: Add the LZO cache support")
Cc: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarKirtika Ruchandani <kirtika@chromium.org>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent f7f29539
...@@ -229,15 +229,13 @@ static int regcache_lzo_read(struct regmap *map, ...@@ -229,15 +229,13 @@ static int regcache_lzo_read(struct regmap *map,
{ {
struct regcache_lzo_ctx *lzo_block, **lzo_blocks; struct regcache_lzo_ctx *lzo_block, **lzo_blocks;
int ret, blkindex, blkpos; int ret, blkindex, blkpos;
size_t blksize, tmp_dst_len; size_t tmp_dst_len;
void *tmp_dst; void *tmp_dst;
/* index of the compressed lzo block */ /* index of the compressed lzo block */
blkindex = regcache_lzo_get_blkindex(map, reg); blkindex = regcache_lzo_get_blkindex(map, reg);
/* register index within the decompressed block */ /* register index within the decompressed block */
blkpos = regcache_lzo_get_blkpos(map, reg); blkpos = regcache_lzo_get_blkpos(map, reg);
/* size of the compressed block */
blksize = regcache_lzo_get_blksize(map);
lzo_blocks = map->cache; lzo_blocks = map->cache;
lzo_block = lzo_blocks[blkindex]; lzo_block = lzo_blocks[blkindex];
...@@ -269,15 +267,13 @@ static int regcache_lzo_write(struct regmap *map, ...@@ -269,15 +267,13 @@ static int regcache_lzo_write(struct regmap *map,
{ {
struct regcache_lzo_ctx *lzo_block, **lzo_blocks; struct regcache_lzo_ctx *lzo_block, **lzo_blocks;
int ret, blkindex, blkpos; int ret, blkindex, blkpos;
size_t blksize, tmp_dst_len; size_t tmp_dst_len;
void *tmp_dst; void *tmp_dst;
/* index of the compressed lzo block */ /* index of the compressed lzo block */
blkindex = regcache_lzo_get_blkindex(map, reg); blkindex = regcache_lzo_get_blkindex(map, reg);
/* register index within the decompressed block */ /* register index within the decompressed block */
blkpos = regcache_lzo_get_blkpos(map, reg); blkpos = regcache_lzo_get_blkpos(map, reg);
/* size of the compressed block */
blksize = regcache_lzo_get_blksize(map);
lzo_blocks = map->cache; lzo_blocks = map->cache;
lzo_block = lzo_blocks[blkindex]; lzo_block = lzo_blocks[blkindex];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment