Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1628214 > unrolled thread

[stable 3.18 PATCH] clk: at91: usb: fix determine_rate prototype again

Started byArnd Bergmann <arnd@arndb.de>
First post2017-04-21 14:50 +0200
Last post2017-04-21 15:00 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [stable 3.18 PATCH] clk: at91: usb: fix determine_rate prototype again Arnd Bergmann <arnd@arndb.de> - 2017-04-21 14:50 +0200
    Re: [stable 3.18 PATCH] clk: at91: usb: fix determine_rate  prototype again Boris Brezillon <boris.brezillon@free-electrons.com> - 2017-04-21 15:00 +0200

#1628214 — [stable 3.18 PATCH] clk: at91: usb: fix determine_rate prototype again

FromArnd Bergmann <arnd@arndb.de>
Date2017-04-21 14:50 +0200
Subject[stable 3.18 PATCH] clk: at91: usb: fix determine_rate prototype again
Message-ID<tyGaC-5Ri-25@gated-at.bofh.it>
We had an incorrect backport of
4591243102fa ("clk: at91: usb: propagate rate modification to the parent clk")
that was fixed incorrectly in linux-3.18.y by
76723e7ed589 ("clk: at91: usb: fix determine_rate prototype")

as shown by this warning:

drivers/clk/at91/clk-usb.c:155:20: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
drivers/clk/at91/clk-usb.c:193:20: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]

This should fix it properly.

Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
This should be applied to 3.18.y directly
---
 drivers/clk/at91/clk-usb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/at91/clk-usb.c b/drivers/clk/at91/clk-usb.c
index 0283a5713d6c..930a424cc4a0 100644
--- a/drivers/clk/at91/clk-usb.c
+++ b/drivers/clk/at91/clk-usb.c
@@ -59,7 +59,7 @@ static unsigned long at91sam9x5_clk_usb_recalc_rate(struct clk_hw *hw,
 static long at91sam9x5_clk_usb_determine_rate(struct clk_hw *hw,
 					      unsigned long rate,
 					      unsigned long *best_parent_rate,
-					      struct clk_hw **best_parent_hw)
+					      struct clk **best_parent_hw)
 {
 	struct clk *parent = NULL;
 	long best_rate = -EINVAL;
@@ -91,7 +91,7 @@ static long at91sam9x5_clk_usb_determine_rate(struct clk_hw *hw,
 				best_rate = tmp_rate;
 				best_diff = tmp_diff;
 				*best_parent_rate = tmp_parent_rate;
-				*best_parent_hw = __clk_get_hw(parent);
+				*best_parent_hw = parent;
 			}
 
 			if (!best_diff || tmp_rate < rate)
-- 
2.9.0

[toc] | [next] | [standalone]


#1628222 — Re: [stable 3.18 PATCH] clk: at91: usb: fix determine_rate prototype again

FromBoris Brezillon <boris.brezillon@free-electrons.com>
Date2017-04-21 15:00 +0200
SubjectRe: [stable 3.18 PATCH] clk: at91: usb: fix determine_rate prototype again
Message-ID<tyGki-5UE-15@gated-at.bofh.it>
In reply to#1628214
On Fri, 21 Apr 2017 14:45:23 +0200
Arnd Bergmann <arnd@arndb.de> wrote:

> We had an incorrect backport of
> 4591243102fa ("clk: at91: usb: propagate rate modification to the parent clk")
> that was fixed incorrectly in linux-3.18.y by
> 76723e7ed589 ("clk: at91: usb: fix determine_rate prototype")
> 
> as shown by this warning:
> 
> drivers/clk/at91/clk-usb.c:155:20: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
> drivers/clk/at91/clk-usb.c:193:20: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
> 
> This should fix it properly.
> 
> Cc: Boris Brezillon <boris.brezillon@free-electrons.com>

Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>

> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> This should be applied to 3.18.y directly
> ---
>  drivers/clk/at91/clk-usb.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/clk/at91/clk-usb.c b/drivers/clk/at91/clk-usb.c
> index 0283a5713d6c..930a424cc4a0 100644
> --- a/drivers/clk/at91/clk-usb.c
> +++ b/drivers/clk/at91/clk-usb.c
> @@ -59,7 +59,7 @@ static unsigned long at91sam9x5_clk_usb_recalc_rate(struct clk_hw *hw,
>  static long at91sam9x5_clk_usb_determine_rate(struct clk_hw *hw,
>  					      unsigned long rate,
>  					      unsigned long *best_parent_rate,
> -					      struct clk_hw **best_parent_hw)
> +					      struct clk **best_parent_hw)
>  {
>  	struct clk *parent = NULL;
>  	long best_rate = -EINVAL;
> @@ -91,7 +91,7 @@ static long at91sam9x5_clk_usb_determine_rate(struct clk_hw *hw,
>  				best_rate = tmp_rate;
>  				best_diff = tmp_diff;
>  				*best_parent_rate = tmp_parent_rate;
> -				*best_parent_hw = __clk_get_hw(parent);
> +				*best_parent_hw = parent;
>  			}
>  
>  			if (!best_diff || tmp_rate < rate)

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web