From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751968AbdIVIqn (ORCPT ); Fri, 22 Sep 2017 04:46:43 -0400 Received: from mx0b-001ae601.pphosted.com ([67.231.152.168]:58990 "EHLO mx0b-001ae601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751916AbdIVIql (ORCPT ); Fri, 22 Sep 2017 04:46:41 -0400 Authentication-Results: ppops.net; spf=none smtp.mailfrom=ckeepax@opensource.cirrus.com Date: Fri, 22 Sep 2017 09:46:28 +0100 From: Charles Keepax To: "Levin, Alexander (Sasha Levin)" CC: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" , Nicholas Mc Guire , Stephen Boyd Subject: Re: [PATCH review for 4.4 12/47] clk: wm831x: fix usleep_range with bad range Message-ID: <20170922084628.rh3ek2lfjc4fcqog@localhost.localdomain> References: <20170920044445.7392-1-alexander.levin@verizon.com> <20170920044445.7392-12-alexander.levin@verizon.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20170920044445.7392-12-alexander.levin@verizon.com> User-Agent: NeoMutt/20170113 (1.7.2) X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1709220122 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 20, 2017 at 04:45:02AM +0000, Levin, Alexander (Sasha Levin) wrote: > From: Nicholas Mc Guire > > [ Upstream commit ed784c532a3d0959db488f40a96c5127f63d42dc ] > > The delay here is not in atomic context and does not seem critical with > respect to precision, but usleep_range(min,max) with min==max results in > giving the timer subsystem no room to optimize uncritical delays. Fix > this by setting the range to 2000,3000 us. > > Fixes: commit f05259a6ffa4 ("clk: wm831x: Add initial WM831x clock driver") > Signed-off-by: Nicholas Mc Guire > Acked-by: Charles Keepax > Signed-off-by: Stephen Boyd > Signed-off-by: Sasha Levin > --- > drivers/clk/clk-wm831x.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/clk/clk-wm831x.c b/drivers/clk/clk-wm831x.c > index 763aed2de893..dfedcf5bc429 100644 > --- a/drivers/clk/clk-wm831x.c > +++ b/drivers/clk/clk-wm831x.c > @@ -101,7 +101,8 @@ static int wm831x_fll_prepare(struct clk_hw *hw) > if (ret != 0) > dev_crit(wm831x->dev, "Failed to enable FLL: %d\n", ret); > > - usleep_range(2000, 2000); > + /* wait 2-3 ms for new frequency taking effect */ > + usleep_range(2000, 3000); Does this patch really make sense for stable, isn't this really just a small optimisation? The patch is pretty harmless so I can't see applying it causing any problems, just curious what problems not having it is causing. Thanks, Charles