From patchwork Tue May 27 11:50:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 30962 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f70.google.com (mail-pb0-f70.google.com [209.85.160.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C80FE203C3 for ; Tue, 27 May 2014 11:52:55 +0000 (UTC) Received: by mail-pb0-f70.google.com with SMTP id rq2sf43376116pbb.1 for ; Tue, 27 May 2014 04:52:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=7hMUMki5JODeQzWemuvO3frMSSAVO9qSjI9vOdjsdNE=; b=j2xQdHuPWxbohtWUKkjyARHZ1y4pka21Tr31cNZlHhFcUzDIJFW3ZpFCTZ6v0v23JQ Y4v4CY7i06ABfFeH/cpSYdnbR9QXlEfHq9eA0drKGv96DrxKdWBtOSGLTtNn0D7KVlBv RZGzYIZ64Wo3ZIOafEZBzNTczUUBfWd4Jp9ul4njdeAfVkLd0/R0Al1rwEeqHodH6+Z9 SbrkmYjZnxjr6Vn8FRKNDUTKFr4fwHm0j/hINIem6PkStPD1QrHOJWe570tLtvGesUwL bo2T4aBXFC5AZB7cUgfWVcSZlfg6pNjXGiJDUjciusBp70zyQTQmjHmtcho6wvNJebgh z0KA== X-Gm-Message-State: ALoCoQn1twD6kprYAUb9GwEBIB0Xjb/LH0zfRJgvxzpwU8rAk2GB5JtEk1w6bhql5YzQ+K9b3DZX X-Received: by 10.66.66.109 with SMTP id e13mr12857693pat.1.1401191575124; Tue, 27 May 2014 04:52:55 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.107.97 with SMTP id g88ls3104884qgf.40.gmail; Tue, 27 May 2014 04:52:54 -0700 (PDT) X-Received: by 10.221.64.80 with SMTP id xh16mr1343455vcb.35.1401191574948; Tue, 27 May 2014 04:52:54 -0700 (PDT) Received: from mail-ve0-f176.google.com (mail-ve0-f176.google.com [209.85.128.176]) by mx.google.com with ESMTPS id fp7si7947678vec.46.2014.05.27.04.52.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 27 May 2014 04:52:54 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.176 as permitted sender) client-ip=209.85.128.176; Received: by mail-ve0-f176.google.com with SMTP id jz11so10487799veb.35 for ; Tue, 27 May 2014 04:52:54 -0700 (PDT) X-Received: by 10.220.250.203 with SMTP id mp11mr26560905vcb.2.1401191574886; Tue, 27 May 2014 04:52:54 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp112573vcb; Tue, 27 May 2014 04:52:54 -0700 (PDT) X-Received: by 10.69.19.140 with SMTP id gu12mr35768930pbd.111.1401191574092; Tue, 27 May 2014 04:52:54 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id my7si18360117pbc.191.2014.05.27.04.52.53 for ; Tue, 27 May 2014 04:52:53 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752313AbaE0Lwu (ORCPT + 27 others); Tue, 27 May 2014 07:52:50 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:54990 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752278AbaE0Lwq (ORCPT ); Tue, 27 May 2014 07:52:46 -0400 Received: by mail-pb0-f46.google.com with SMTP id rq2so9128217pbb.19 for ; Tue, 27 May 2014 04:52:46 -0700 (PDT) X-Received: by 10.68.162.34 with SMTP id xx2mr35232654pbb.120.1401191565998; Tue, 27 May 2014 04:52:45 -0700 (PDT) Received: from localhost ([223.227.245.64]) by mx.google.com with ESMTPSA id yv7sm72473166pac.33.2014.05.27.04.52.39 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 27 May 2014 04:52:45 -0700 (PDT) From: Viresh Kumar To: rjw@rjwysocki.net Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, arvind.chauhan@arm.com, inderpal.s@samsung.com, nm@ti.com, chander.kashyap@linaro.org, pavel@ucw.cz, len.brown@intel.com, sudeep.holla@arm.com, Viresh Kumar Subject: [PATCH V4 3/8] opp: Enhance debug messages in of_init_opp_table() Date: Tue, 27 May 2014 17:20:52 +0530 Message-Id: <2a9d8e2954166e47d7cdcf9c540dea572b080e7b.1401191054.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.0.0.rc2 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.176 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Enhance print messages for debugging purposes. Add a dev_err() whenever we fail to initialize OPP table due to some error in the table present in dts and add a dev_dbg() for success case. Signed-off-by: Viresh Kumar Acked-by: Nishanth Menon --- drivers/base/power/opp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp.c index 2b615b9..ed5d580 100644 --- a/drivers/base/power/opp.c +++ b/drivers/base/power/opp.c @@ -628,8 +628,11 @@ int of_init_opp_table(struct device *dev) prop = of_find_property(dev->of_node, "operating-points", NULL); if (!prop) return -ENODEV; - if (!prop->value) + if (!prop->value) { + dev_err(dev, "%s: failed to init OPP: prop->value is NULL\n", + __func__); return -ENODATA; + } /* * Each OPP is a set of tuples consisting of frequency and @@ -653,6 +656,8 @@ int of_init_opp_table(struct device *dev) } of_node_put(dev->of_node); + + dev_dbg(dev, "%s: successfully created OPP table\n", __func__); return 0; } EXPORT_SYMBOL_GPL(of_init_opp_table);