Re: [PATCH] regmap: Add missing initialization of this_page

From: Mark Brown
Date: Wed Apr 30 2014 - 23:50:08 EST


On Tue, Apr 22, 2014 at 12:47:29PM +0200, Geert Uytterhoeven wrote:
> drivers/base/regmap/regmap.c: In function â_regmap_range_multi_paged_reg_writeâ:
> drivers/base/regmap/regmap.c:1665: warning: âthis_pageâ may be used uninitialized in this function
>
> Signed-off-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
> ---
> This may be a false positive, if "range" is guaranteed to be non-zero
> during the first iteration of the loop

Applied, though with this sort of thing it's generally a bit better to
do the init at the start of the loop rather than at declaration - init
at declaration is a common pattern for just shutting up warnings as
opposed to analyisng to make sure that there's really not an issue.

Attachment: signature.asc
Description: Digital signature