From: Magnus Damm Date: Mon, 17 Oct 2011 09:01:19 +0000 (+0900) Subject: sh: pfc: get_config_reg() shift clean up X-Git-Tag: firefly_0821_release~3680^2~4217^2~9 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c63bcc6ff135397b38cdb510c173e4a6629cede5;p=firefly-linux-kernel-4.4.55.git sh: pfc: get_config_reg() shift clean up Clean up the f_width shift code in get_config_reg(). Reported-by: Ryusuke Sakato Signed-off-by: Magnus Damm Signed-off-by: Paul Mundt --- diff --git a/drivers/sh/pfc.c b/drivers/sh/pfc.c index 75934e3ea34e..de5e3d65a6fa 100644 --- a/drivers/sh/pfc.c +++ b/drivers/sh/pfc.c @@ -217,7 +217,7 @@ static int get_config_reg(struct pinmux_info *gpioc, pinmux_enum_t enum_id, if (!r_width) break; - for (n = 0; n < (r_width / f_width) * 1 << f_width; n++) { + for (n = 0; n < (r_width / f_width) * (1 << f_width); n++) { if (config_reg->enum_ids[n] == enum_id) { *crp = config_reg; *indexp = n;