mirror of
https://github.com/torvalds/linux.git
synced 2026-06-10 07:32:29 +02:00
regmap: silence GCC warning
commit a8f28cfad8 upstream.
Building regmap.o triggers this GCC warning:
drivers/base/regmap/regmap.c: In function ‘regmap_raw_read’:
drivers/base/regmap/regmap.c:1172:6: warning: ‘ret’ may be used uninitialized in this function [-Wmaybe-uninitialized]
Long story short: Jakub Jelinek pointed out that there is a type
mismatch between 'num' in regmap_volatile_range() and 'val_count' in
regmap_raw_read(). And indeed, converting 'num' to the type of
'val_count' (ie, size_t) makes this warning go away.
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
2ad23b7958
commit
ff289c1fa9
|
|
@ -69,7 +69,7 @@ bool regmap_precious(struct regmap *map, unsigned int reg)
|
|||
}
|
||||
|
||||
static bool regmap_volatile_range(struct regmap *map, unsigned int reg,
|
||||
unsigned int num)
|
||||
size_t num)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user