Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2086453ybl; Tue, 3 Dec 2019 18:20:00 -0800 (PST) X-Google-Smtp-Source: APXvYqzQUEMa+O+6W4mZnJwO5qXFq8jePVYl0AG/8ThoCEE1GhOVO5Xq8M4W0m69yPiOZbIxkQwW X-Received: by 2002:a05:6808:6c3:: with SMTP id m3mr787922oih.56.1575426000746; Tue, 03 Dec 2019 18:20:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575426000; cv=none; d=google.com; s=arc-20160816; b=xwwUPPk63m1Xv07YjNdZo3aA+TP3PVVHLqcxH4EztlYVfUZscg9V/nTQPn/uMlK1ib 2nK5FaQPoAoC4f97mc67HAVY2ijnCdz0xXY/c9xFkYhYlEZwSIcK/5fBHlU/PN0BsNb2 ZLvRmfVb6+mzx4WbRFgx8BF6b7lopMPsndLNkiC1VNqbzL/DJRA3eBwThrnya3+sGOnn FGhgXf6L4aVR4jxIhayzBsOA7zWjBem9+vh29xkXczQO4VWfW+ZE7cCaaeSUzM5NO4WF 1vFISIGONGNzhsYWNQdpoq1Z5qrczwspjD+VQfaHdsv33lBkDS6qgtZ2J6ApT8rTVIWF k/nA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=x22J97IE04fWMzE8WnPUV/SrN3umrnbQMtWhMHoJC7A=; b=yHC7NKEct6TZtvNqkMhcJPfJzifUnr58NEOWIzMHODJSWRiQPbclKAttKJ+Y0FPGF5 RJiLN1sekwfCgI3GokJSwAJPecEMKfh0qlqBt+RcIdgUOIWRowNJ2MJWm6tJoesFUqVY +e0nUWdWfNitLsTti7Ir9LfUK4xX/9UqyTC0o+9KhkIZMsSYiZHJU2wqptLsg7WtkdbA CkhCVyUU/sKXZ2gwYrLEdD93GfFTIadxK7FEAnfv0bcDuCSeeNNj3llSR7vTytrBB+Yu MnkqUJab8dO4zgXNDbBKCAzntYjPRC0uRpR3T9716d+co7JzwGrdougS5RW7rLzFc2Kw k8BA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vr3fYKnx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a14si2537879otk.2.2019.12.03.18.19.47; Tue, 03 Dec 2019 18:20:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vr3fYKnx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726766AbfLDCTS (ORCPT + 99 others); Tue, 3 Dec 2019 21:19:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:32830 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726162AbfLDCTR (ORCPT ); Tue, 3 Dec 2019 21:19:17 -0500 Received: from dragon (98.142.130.235.16clouds.com [98.142.130.235]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 10B8C2073C; Wed, 4 Dec 2019 02:19:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575425956; bh=FX0SbHl1Yljp4OhiB2FkaDSP/AYuFcF8lh80Js4Mc/c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=vr3fYKnxYmLmrDqk2Jr6lZOynJiZfJSLzX8Pp8YPusqwp3A8PXmRWEUAI0nnKG9A/ vwo2NmNoTfqzw8dGnojNcemy6+kQcl023nXPZiXz1ER1PxNojyMAXBA1rzQAPpIw/a PTYizRwVD2Slkvb9eF8GO4DUlF+PGVQKuF1bjAwI= Date: Wed, 4 Dec 2019 10:19:09 +0800 From: Shawn Guo To: Peng Fan Cc: "sboyd@kernel.org" , "s.hauer@pengutronix.de" , "festevam@gmail.com" , Abel Vesa , "kernel@pengutronix.de" , dl-linux-imx , Aisheng Dong , "linux-clk@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Leonard Crestez Subject: Re: [PATCH] clk: imx: pll14xx: fix clk_pll14xx_wait_lock Message-ID: <20191204021908.GN9767@dragon> References: <1573018178-14939-1-git-send-email-peng.fan@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1573018178-14939-1-git-send-email-peng.fan@nxp.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 06, 2019 at 05:31:15AM +0000, Peng Fan wrote: > From: Peng Fan > > The usage of readl_poll_timeout is wrong, the cond should be > "val & LOCK_STATUS" not "val & LOCK_TIMEOUT_US". Is this caught just by code inspection or a real world bug? If you want this get into -rc (and stable kernel) as a fix, you should add more information about the bug, like how it's been triggered, what's the consequence of the bug, and kernel dump message etc. > > Fixes: 8646d4dcc7fb ("clk: imx: Add PLLs driver for imx8mm soc") > Signed-off-by: Peng Fan > --- > > V1: > Hi Shawn, > This patch is made based on 5.4-rc6, not your for-next branch, Please rebase it on 5.5-rc1 which will be coming next Monday. > not sure whether this patch could catch 5.4 release. You can Cc stable kernel, so that it will be back ported. Shawn > > drivers/clk/imx/clk-pll14xx.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/clk/imx/clk-pll14xx.c b/drivers/clk/imx/clk-pll14xx.c > index 7a815ec76aa5..d43b4a3c0de8 100644 > --- a/drivers/clk/imx/clk-pll14xx.c > +++ b/drivers/clk/imx/clk-pll14xx.c > @@ -153,7 +153,7 @@ static int clk_pll14xx_wait_lock(struct clk_pll14xx *pll) > { > u32 val; > > - return readl_poll_timeout(pll->base, val, val & LOCK_TIMEOUT_US, 0, > + return readl_poll_timeout(pll->base, val, val & LOCK_STATUS, 0, > LOCK_TIMEOUT_US); > } > > -- > 2.16.4 >