diff options
author | Paul Bolle <pebolle@tiscali.nl> | 2012-10-08 16:06:30 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-10-14 21:03:19 -0400 |
commit | a8f28cfad8cd44d7c34b166d0e5ace1125dbee1f (patch) | |
tree | 14e2bced55e4e001460a2bb19b48be02818501e1 /drivers | |
parent | ddffeb8c4d0331609ef2581d84de4d763607bd37 (diff) |
regmap: silence GCC warning
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/base/regmap/regmap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index 52069d29ff12..94555951b6e1 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c | |||
@@ -82,7 +82,7 @@ bool regmap_precious(struct regmap *map, unsigned int reg) | |||
82 | } | 82 | } |
83 | 83 | ||
84 | static bool regmap_volatile_range(struct regmap *map, unsigned int reg, | 84 | static bool regmap_volatile_range(struct regmap *map, unsigned int reg, |
85 | unsigned int num) | 85 | size_t num) |
86 | { | 86 | { |
87 | unsigned int i; | 87 | unsigned int i; |
88 | 88 | ||