mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-09-11 11:33:30 -04:00
iio: light: opt3001: localize for loop iterator
Localize loop iterator to tighten scope and improve code style per checkpatch.pl report. No functional change. Reviewed-by: Maxwell Doose <m32285159@gmail.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
committed by
Jonathan Cameron
parent
9b77844951
commit
960642100c
@@ -226,8 +226,7 @@ static const struct opt3001_scale opt3002_scales[] = {
|
||||
static int opt3001_find_scale(const struct opt3001 *opt, int val, int val2,
|
||||
u8 *exponent)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < ARRAY_SIZE(*opt->chip_info->scales); i++) {
|
||||
for (unsigned int i = 0; i < ARRAY_SIZE(*opt->chip_info->scales); i++) {
|
||||
const struct opt3001_scale *scale = &(*opt->chip_info->scales)[i];
|
||||
/*
|
||||
* Compare the integer and micro parts to determine value scale.
|
||||
|
||||
Reference in New Issue
Block a user