Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1070616ybt; Wed, 1 Jul 2020 18:02:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzl26sSuhvzbIbsWrTDsWqc8jgk2+M4//hf7y05ibRE563rS9Q4vPKLXUkF2RjmpKt57gaB X-Received: by 2002:a17:906:50b:: with SMTP id j11mr24715611eja.127.1593651722475; Wed, 01 Jul 2020 18:02:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593651722; cv=none; d=google.com; s=arc-20160816; b=BMTWhq7+4KJmmuhVK2+p7yqtfFB0Qn9YkjJtKp2+WI9lfmplWWhvdaGBk7KfDhtksc wyHuUrQHj78+TMfkQyM0tYbka1jwyaRjgHqSgdCeEqeY9et3iTxMPpFYthjGQVBrKru1 PJZ5agl6f8BqxBmRnwAfmVLHxrYhpGFeyZBCMgt/99pAqBhhb5V+pTyrVLHcNARKrypi yOO+QpGv5pC/dTB6s5WbM1rCBSgHCZMeEFsXUQV64hiDjDp8m+x7yPLPRVXEbRYRYBUu 4QC61I+bnYkyut1TRa5D3Zvl4aF2Knxd4y5covEMbwgB77aZDCKKkBcJ/iIKPvBrwidY SJ5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:dlp-filter:cms-type :content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:organization:from:cc:to:subject :dkim-signature:dkim-filter; bh=V8Gva5iDzFc4G0IttFrfiVO2V6kQ+Z8Y94e+lUkePSw=; b=iipVvbKzfmG+AO3fy2oRdc8dv4p3euwhXTpx9zmN5k8raYBqH5VPlZPNKL+i62gWUU CBjzLt7Mh41RW3YoCKL08BjK5QdH6nYtHf0FnBEGZ1/PZXQusAhZwF/CVA3XWTrF1GbF bIa/6ARNXs+LkBIjXRGGH8ZOQbgqnAzvgoSB+TJmdLKFIIvWws/nTXMfPKMHDxfnskKT tfxZhBA7UC5CQyIvTZei8vLkHpUXMWWFZXBUnWblqLWsX1ierc2g66q2qSjPlwrlMfdj TnsFZwUgfHQNPqTOnzsg0Z5djAwsqoxCzdX2JbeON6lI5hc1hqcvTbEwWfkvT836v8s3 hU6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=XNtckBHi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bh13si4753538ejb.48.2020.07.01.18.01.39; Wed, 01 Jul 2020 18:02:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=XNtckBHi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728049AbgGBBBZ (ORCPT + 99 others); Wed, 1 Jul 2020 21:01:25 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:29580 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727961AbgGBBBW (ORCPT ); Wed, 1 Jul 2020 21:01:22 -0400 Received: from epcas1p1.samsung.com (unknown [182.195.41.45]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20200702010119epoutp03dbb0d4fba36649191376feda81fe32eb~dycJEiT-u3121531215epoutp03V for ; Thu, 2 Jul 2020 01:01:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20200702010119epoutp03dbb0d4fba36649191376feda81fe32eb~dycJEiT-u3121531215epoutp03V DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1593651679; bh=V8Gva5iDzFc4G0IttFrfiVO2V6kQ+Z8Y94e+lUkePSw=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=XNtckBHi0xquu1bNQAUqCXboZZYSgPkecYSvG/GuhPzj0K4LBnU8Ba7ASxodkaA1f ELeYTTRSXvcvyU2dgSgOuwX+Xr3gZjXSGezYXClXCKtjI4d08Bk/kIB70UdLPj8hro CKPjNTovvuWboQz7CPrJ6nK7fITRbbNDSU1JvAfM= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20200702010118epcas1p294ce9e022e324f8093b3d88131e0fe78~dycIC3xKH2182521825epcas1p2R; Thu, 2 Jul 2020 01:01:18 +0000 (GMT) Received: from epsmges1p3.samsung.com (unknown [182.195.40.155]) by epsnrtp1.localdomain (Postfix) with ESMTP id 49y0CY6FVTzMqYm7; Thu, 2 Jul 2020 01:01:13 +0000 (GMT) Received: from epcas1p4.samsung.com ( [182.195.41.48]) by epsmges1p3.samsung.com (Symantec Messaging Gateway) with SMTP id 1E.00.29173.5D13DFE5; Thu, 2 Jul 2020 10:01:09 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200702010108epcas1p10f6a1661eb148c937b1d1c791ffc54f3~dyb-Nd0Lq3155831558epcas1p1I; Thu, 2 Jul 2020 01:01:08 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200702010108epsmtrp26c5ec83135bdc8ad5894ee49890ddc45~dyb-MFY9F0515005150epsmtrp2s; Thu, 2 Jul 2020 01:01:08 +0000 (GMT) X-AuditID: b6c32a37-9cdff700000071f5-15-5efd31d52409 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 28.F3.08382.4D13DFE5; Thu, 2 Jul 2020 10:01:08 +0900 (KST) Received: from [10.113.221.102] (unknown [10.113.221.102]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200702010108epsmtip10874fbddbdd158a43fec5c2fa3d56992~dyb_3GekE1145611456epsmtip1w; Thu, 2 Jul 2020 01:01:08 +0000 (GMT) Subject: Re: [PATCH v4 14/37] PM / devfreq: tegra20: Add error messages to tegra_devfreq_target() To: Dmitry Osipenko , Thierry Reding , Jonathan Hunter , Georgi Djakov , Rob Herring , Michael Turquette , Stephen Boyd , Peter De Schrijver , MyungJoo Ham , Kyungmin Park , Mikko Perttunen Cc: =?UTF-8?B?QXJ0dXIgxZp3aWdvxYQ=?= , linux-tegra@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org From: Chanwoo Choi Organization: Samsung Electronics Message-ID: <5d83261b-12e5-9734-f793-0600212bcee1@samsung.com> Date: Thu, 2 Jul 2020 10:12:24 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Thunderbird/59.0 MIME-Version: 1.0 In-Reply-To: <20200609131404.17523-15-digetx@gmail.com> Content-Language: en-US Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrHJsWRmVeSWpSXmKPExsWy7bCmge5Vw79xBlM2Gljcn9fKaPHu01NW i/lHzrFarP74mNHiytf3bBbT925is2iZtYjF4mzTG3aLy7vmsFl87j3CaNH5ZRabxcVTrha3 G1ewWUxaO5XRonXvEXaLf9c2slj83DWPxUHQ4/2NVnaPnbPusntcOveH2WPTqk42jzvX9rB5 3O8+zuTR2/yOzaNvyypGj8+b5AI4o7JtMlITU1KLFFLzkvNTMvPSbZW8g+Od403NDAx1DS0t zJUU8hJzU22VXHwCdN0yc4B+UVIoS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AA3mMGFcAwAA X-CMS-MailID: 20200702010108epcas1p10f6a1661eb148c937b1d1c791ffc54f3 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: SVC_REQ_APPROVE CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20200609131736epcas1p1ba2a7c962cc370785327e82c973594b6 References: <20200609131404.17523-1-digetx@gmail.com> <20200609131404.17523-15-digetx@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/9/20 10:13 PM, Dmitry Osipenko wrote: > It's useful to now when something goes wrong instead of failing silently, > so let's add error messages to tegra_devfreq_target() to prevent situation > where it fails silently. > > Signed-off-by: Dmitry Osipenko > --- > drivers/devfreq/tegra20-devfreq.c | 12 +++++++++--- > 1 file changed, 9 insertions(+), 3 deletions(-) > > diff --git a/drivers/devfreq/tegra20-devfreq.c b/drivers/devfreq/tegra20-devfreq.c > index bf504ca4dea2..249d0dc44f6c 100644 > --- a/drivers/devfreq/tegra20-devfreq.c > +++ b/drivers/devfreq/tegra20-devfreq.c > @@ -44,19 +44,25 @@ static int tegra_devfreq_target(struct device *dev, unsigned long *freq, > int err; > > opp = devfreq_recommended_opp(dev, freq, flags); > - if (IS_ERR(opp)) > + if (IS_ERR(opp)) { > + dev_err(dev, "failed to find opp for %lu Hz\n", *freq); > return PTR_ERR(opp); > + } > > rate = dev_pm_opp_get_freq(opp); > dev_pm_opp_put(opp); > > err = clk_set_min_rate(tegra->emc_clock, rate); > - if (err) > + if (err) { > + dev_err(dev, "failed to set min rate: %d\n", err); > return err; > + } > > err = clk_set_rate(tegra->emc_clock, 0); > - if (err) > + if (err) { > + dev_err(dev, "failed to set rate: %d\n", err); > goto restore_min_rate; > + } > > return 0; > > Acked-by: Chanwoo Choi -- Best Regards, Chanwoo Choi Samsung Electronics