Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp506277ybg; Tue, 9 Jun 2020 06:18:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzAYIXi754iaNq+DXpI/1lgxZ60HelKrTYu0ri/YGIbzcQ/UGdqgaoWgJPUv7csBq7StdcZ X-Received: by 2002:a17:906:86c5:: with SMTP id j5mr26512958ejy.88.1591708691382; Tue, 09 Jun 2020 06:18:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591708691; cv=none; d=google.com; s=arc-20160816; b=mR2lvjtj+9C7HzLe8z8/2UvdokuV9bz2q5NxLmSI7F6523QZ5CRQtvu6EfjUH2Fg2O ha2LpdyJxPctvBwi/5vQE2fF9BeVcBOQQBV/DLA7lvL7gw2ipwKmGBs99/y5EEIidqFf absi8mOsHt0hWU3rP6vBjCtp5Rnjj5+2OE5JU6UPrXJxZnfw0OCXqPrFW7pt31AO3Sp8 X8LhXLS9r0H9XUaqC7ASFeVbu4+nnSaTeUQCan20i3YE9EgKlsCe7B28jpvrRI7C6k6p +2L4VcVzGQv84v8dy8QQWz7FA16cDnBJcq2aexvO8eBIdICB5xbLru3+W5PHiYYIVfjD 4PlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=UvPgx7nfuClCEbY/9qNxk5Wqh42dXshULVk6+zlWjrI=; b=tliXdZbJ9yFZkqsyKMXNqwIwrrCIslEDag33I29OBbr8pr1Jac6Zq4aoEyj3vmDU/2 Je69+M+iacFzqyKNI5P9ylBkvc5nFZnHY3pJkYlc1s8lDqyEjosLDykNyS/flkCblFrG 3EXnnZiB6WRuAkHInjFJNL4QzG2TqWbs6har1xTSncRBhmz4tarh1wVM59ysGAbzLHDR xUK5/zm6NNB5TeiFg4jPe1n4Mq5wHUvbZeFDHmyYY/5Lui10lub0CYFVHLiuODov+Yyw LsO17W6zPr6/tbje52AY/PwpTB3asyJC8b2DgSQSSmKyO6Lk4C7rV1d0mOGyW7c82P0d Ydmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kmbgzZbG; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ba16si6831044edb.52.2020.06.09.06.17.34; Tue, 09 Jun 2020 06:18:11 -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=@gmail.com header.s=20161025 header.b=kmbgzZbG; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729225AbgFINPK (ORCPT + 99 others); Tue, 9 Jun 2020 09:15:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729095AbgFINOp (ORCPT ); Tue, 9 Jun 2020 09:14:45 -0400 Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 044B7C08C5C2; Tue, 9 Jun 2020 06:14:45 -0700 (PDT) Received: by mail-lj1-x241.google.com with SMTP id a25so24978222ljp.3; Tue, 09 Jun 2020 06:14:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UvPgx7nfuClCEbY/9qNxk5Wqh42dXshULVk6+zlWjrI=; b=kmbgzZbGDUNhDeo1Alj9Av1nLUQou1tKAx3nPuQjstezuyq0GcBpfJoNKBkhFee4Wc eF3nGpANT2Rizt9dotGWkY18sFTED4pkbBbLj6YYM20gHWEzZmKkAuMmL1mpU6m2WdUw F/pMtlm/LNaFMLlkso6nJ6CdSyrVeBgf7aO6Sv2e0dfOHu0HNkPvBCvbIic0WvY3pOb0 nO1voGw4DX2+X27RKEk3b5K/qOfjKk+gixvYeNjjUpOaIYNOCS4VSaTfrlb5Z04c+8Qs iUI5BedVAy7lGeX7TqeO3Oy+VTt2LrHAmA9NQYhVJDI7ZMHjnYYmgl3/ftBz4roif9p2 2l5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UvPgx7nfuClCEbY/9qNxk5Wqh42dXshULVk6+zlWjrI=; b=kCL/Gy3Sr/DdzVJ73VN7PHoq38JmqeqqTR8HL0vioE/ZnpOmHQNuavn/sZnYXvfkez lOhig/wEW7lV83pDTaAZY7mPX47DRfvw7W3h+rtXAJwKmWwYPyiLrYk9MiKT7+/ptdua RizwAvd0Wfchow/XQUimqC2o4ea1tsgqagzvgWtedl04dXv0MrkoCdxe1gne8GlancTm oUj84zMjlo+C6XnNAyyMHoNVT6q1WELbED1AZDhxQ1RRJlRlDJvQFS2b063hKdgVJ3Os 4VM7zf++a7gy4/GPgPTpGaBD1x9UeKWNlTRmWOHuulSpGW515psjtp7Sr1OvVRH3BXXX ecAg== X-Gm-Message-State: AOAM530IDdkFeqzt9PiFjrlRVoB8uDAy+Jvf4X9Ui/4NW9f9Kb61u+b/ +k1RH6Amsyw9oi0/dgyLHDg= X-Received: by 2002:a2e:7011:: with SMTP id l17mr14742315ljc.424.1591708483540; Tue, 09 Jun 2020 06:14:43 -0700 (PDT) Received: from localhost.localdomain (79-139-237-54.dynamic.spd-mgts.ru. [79.139.237.54]) by smtp.gmail.com with ESMTPSA id l22sm4323522lji.120.2020.06.09.06.14.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2020 06:14:43 -0700 (PDT) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Georgi Djakov , Rob Herring , Michael Turquette , Stephen Boyd , Peter De Schrijver , MyungJoo Ham , Kyungmin Park , Chanwoo Choi , Mikko Perttunen Cc: =?UTF-8?q?Artur=20=C5=9Awigo=C5=84?= , linux-tegra@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org Subject: [PATCH v4 15/37] PM / devfreq: tegra30: Add error messages to tegra_devfreq_target() Date: Tue, 9 Jun 2020 16:13:42 +0300 Message-Id: <20200609131404.17523-16-digetx@gmail.com> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200609131404.17523-1-digetx@gmail.com> References: <20200609131404.17523-1-digetx@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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/tegra30-devfreq.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/devfreq/tegra30-devfreq.c b/drivers/devfreq/tegra30-devfreq.c index 13f93c6038ab..a03fb16c5c4c 100644 --- a/drivers/devfreq/tegra30-devfreq.c +++ b/drivers/devfreq/tegra30-devfreq.c @@ -641,12 +641,16 @@ static int tegra_devfreq_target(struct device *dev, unsigned long *freq, dev_pm_opp_put(opp); err = clk_set_min_rate(tegra->emc_clock, rate * KHZ); - 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; -- 2.26.0