Hi Geert,

Thank you for the patch.

On Tuesday 10 March 2015 12:06:21 Geert Uytterhoeven wrote:
> As register and field widths and offsets are in the range 1..32, use
> unsigned int (mostly replacing unsigned long) to store them in local
> variables and for passing them around.
> 
> Move to one variable per line and move variables to the beginning of
> the block where they are used while we are at it.
> 
> Signed-off-by: Geert Uytterhoeven <[email protected]>
> ---
> v2:
>   - Move to one variable per line and move variables to the beginning of
>     the block where they are used for the code that is touched.
> ---
>  drivers/pinctrl/sh-pfc/core.c | 59 +++++++++++++++++++--------------------
>  drivers/pinctrl/sh-pfc/core.h |  4 +--
>  drivers/pinctrl/sh-pfc/gpio.c |  4 +--
>  3 files changed, 33 insertions(+), 34 deletions(-)
> 
> diff --git a/drivers/pinctrl/sh-pfc/core.c b/drivers/pinctrl/sh-pfc/core.c
> index 5591baf9738b5de9..aaf9c7fa742cc9c1 100644
> --- a/drivers/pinctrl/sh-pfc/core.c
> +++ b/drivers/pinctrl/sh-pfc/core.c

[snip]

> @@ -322,13 +319,15 @@ int sh_pfc_config_mux(struct sh_pfc *pfc, unsigned
> mark, int pinmux_type) return -EINVAL;
>       }
> 
> -     pos = 0;
> -     enum_id = 0;
> -     field = 0;
> -     value = 0;
> -
>       /* Iterate over all the configuration fields we need to update. */
>       while (1) {
> +             const struct pinmux_cfg_reg *cr = NULL;
> +             unsigned int field = 0;
> +             u16 enum_id = 0;
> +             u32 value = 0;

There's no need to initialize field, enum_id and value to 0 here.

With that fixed,

Acked-by: Laurent Pinchart <[email protected]>

> +             int in_range;
> +             int ret;
> +
>               pos = sh_pfc_mark_to_enum(pfc, mark, pos, &enum_id);
>               if (pos < 0)
>                       return pos;

-- 
Regards,

Laurent Pinchart

--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to