* [PATCH] clk: vt8500: Missing breaks in vtwm_pll_round_rate/_set_rate.
@ 2013-04-14 5:28 Tony Prisk
2013-04-14 5:55 ` [PATCH] ARM: KVM: Add missing break; Joe Perches
2013-04-14 7:03 ` [PATCH] clk: vt8500: Missing breaks in vtwm_pll_round_rate/_set_rate Mike Turquette
0 siblings, 2 replies; 4+ messages in thread
From: Tony Prisk @ 2013-04-14 5:28 UTC (permalink / raw)
To: linux-arm-kernel
The case of PLL_TYPE_WM8750 in both these functions is missing a break
statement causing a fall-through to the default: case.
Insert the missing break statements.
Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
---
Mike,
Any chance this can still go in as a fix for 3.9
The fault makes it impossible to set the PLL clocks on WM8750 and later SoCs.
Regards
Tony P
drivers/clk/clk-vt8500.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/clk/clk-vt8500.c b/drivers/clk/clk-vt8500.c
index 09c6331..debf688 100644
--- a/drivers/clk/clk-vt8500.c
+++ b/drivers/clk/clk-vt8500.c
@@ -488,6 +488,7 @@ static int vtwm_pll_set_rate(struct clk_hw *hw, unsigned long rate,
case PLL_TYPE_WM8750:
wm8750_find_pll_bits(rate, parent_rate, &filter, &mul, &div1, &div2);
pll_val = WM8750_BITS_TO_VAL(filter, mul, div1, div2);
+ break;
default:
pr_err("%s: invalid pll type\n", __func__);
return 0;
@@ -523,6 +524,7 @@ static long vtwm_pll_round_rate(struct clk_hw *hw, unsigned long rate,
case PLL_TYPE_WM8750:
wm8750_find_pll_bits(rate, *prate, &filter, &mul, &div1, &div2);
round_rate = WM8750_BITS_TO_FREQ(*prate, mul, div1, div2);
+ break;
default:
round_rate = 0;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] ARM: KVM: Add missing break;
2013-04-14 5:28 [PATCH] clk: vt8500: Missing breaks in vtwm_pll_round_rate/_set_rate Tony Prisk
@ 2013-04-14 5:55 ` Joe Perches
2013-04-14 17:26 ` Marc Zyngier
2013-04-14 7:03 ` [PATCH] clk: vt8500: Missing breaks in vtwm_pll_round_rate/_set_rate Mike Turquette
1 sibling, 1 reply; 4+ messages in thread
From: Joe Perches @ 2013-04-14 5:55 UTC (permalink / raw)
To: linux-arm-kernel
commit 3401d54696f ("KVM: ARM: Introduce KVM_ARM_SET_DEVICE_ADDR ioctl")
added the case, but omitted adding break;
Add it.
Found with grep version 2.54 pattern:
$ grep -rP --include=*.[ch] "\b(\w+)\s*=[^;]+;\s*(?:case\s+\w+:|default:)\s*\1\s*="
Signed-off-by: Joe Perches <joe@perches.com>
---
diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c
index 5777e0c..b9f2228 100644
--- a/arch/arm/kvm/arm.c
+++ b/arch/arm/kvm/arm.c
@@ -198,6 +198,7 @@ int kvm_dev_ioctl_check_extension(long ext)
break;
case KVM_CAP_ARM_SET_DEVICE_ADDR:
r = 1;
+ break;
case KVM_CAP_NR_VCPUS:
r = num_online_cpus();
break;
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] clk: vt8500: Missing breaks in vtwm_pll_round_rate/_set_rate.
2013-04-14 5:28 [PATCH] clk: vt8500: Missing breaks in vtwm_pll_round_rate/_set_rate Tony Prisk
2013-04-14 5:55 ` [PATCH] ARM: KVM: Add missing break; Joe Perches
@ 2013-04-14 7:03 ` Mike Turquette
1 sibling, 0 replies; 4+ messages in thread
From: Mike Turquette @ 2013-04-14 7:03 UTC (permalink / raw)
To: linux-arm-kernel
Quoting Tony Prisk (2013-04-13 22:28:35)
> The case of PLL_TYPE_WM8750 in both these functions is missing a break
> statement causing a fall-through to the default: case.
>
> Insert the missing break statements.
>
> Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
> ---
> Mike,
>
> Any chance this can still go in as a fix for 3.9
> The fault makes it impossible to set the PLL clocks on WM8750 and later SoCs.
Definitely not too late for fixes. Taken into clk-next.
Thanks,
Mike
>
> Regards
> Tony P
> drivers/clk/clk-vt8500.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/clk/clk-vt8500.c b/drivers/clk/clk-vt8500.c
> index 09c6331..debf688 100644
> --- a/drivers/clk/clk-vt8500.c
> +++ b/drivers/clk/clk-vt8500.c
> @@ -488,6 +488,7 @@ static int vtwm_pll_set_rate(struct clk_hw *hw, unsigned long rate,
> case PLL_TYPE_WM8750:
> wm8750_find_pll_bits(rate, parent_rate, &filter, &mul, &div1, &div2);
> pll_val = WM8750_BITS_TO_VAL(filter, mul, div1, div2);
> + break;
> default:
> pr_err("%s: invalid pll type\n", __func__);
> return 0;
> @@ -523,6 +524,7 @@ static long vtwm_pll_round_rate(struct clk_hw *hw, unsigned long rate,
> case PLL_TYPE_WM8750:
> wm8750_find_pll_bits(rate, *prate, &filter, &mul, &div1, &div2);
> round_rate = WM8750_BITS_TO_FREQ(*prate, mul, div1, div2);
> + break;
> default:
> round_rate = 0;
> }
> --
> 1.7.9.5
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-04-14 17:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-14 5:28 [PATCH] clk: vt8500: Missing breaks in vtwm_pll_round_rate/_set_rate Tony Prisk
2013-04-14 5:55 ` [PATCH] ARM: KVM: Add missing break; Joe Perches
2013-04-14 17:26 ` Marc Zyngier
2013-04-14 7:03 ` [PATCH] clk: vt8500: Missing breaks in vtwm_pll_round_rate/_set_rate Mike Turquette
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).