Re: [PATCH] regulator: 88pm8607: Fix off-by-one value rangechecking in the case of no id is matched

From: Liam Girdwood
Date: Mon Aug 08 2011 - 12:40:00 EST


On Thu, 2011-08-04 at 16:18 +0800, Axel Lin wrote:
> In the case of no id is matched, the variable i is equal to
> ARRAY_SIZE(pm8607_regulator_info).
>
> Signed-off-by: Axel Lin <axel.lin@xxxxxxxxx>
> ---
> I think compare variable i with ARRAY_SIZE(pm8607_regulator_info) here is slightly
> better in readability than compare with PM8607_ID_RG_MAX.
> Axel
>

Applied.

Thanks

Liam

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/