From patchwork Thu Dec 17 02:01:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 58517 Delivered-To: patch@linaro.org Received: by 10.112.89.199 with SMTP id bq7csp83367lbb; Wed, 16 Dec 2015 18:01:44 -0800 (PST) X-Received: by 10.66.236.162 with SMTP id uv2mr68472266pac.101.1450317704581; Wed, 16 Dec 2015 18:01:44 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 73si8818328pfr.209.2015.12.16.18.01.44; Wed, 16 Dec 2015 18:01:44 -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; 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; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755885AbbLQCBm (ORCPT + 29 others); Wed, 16 Dec 2015 21:01:42 -0500 Received: from mail-pf0-f173.google.com ([209.85.192.173]:34902 "EHLO mail-pf0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755862AbbLQCBi (ORCPT ); Wed, 16 Dec 2015 21:01:38 -0500 Received: by mail-pf0-f173.google.com with SMTP id v86so21670668pfa.2 for ; Wed, 16 Dec 2015 18:01:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=7ZaWDnAhrYsWGIYdgcVbTfSSGrIRYYS6Rq9d/e3otho=; b=aRFB01u74Comapf2FrxgeuqzOdkNWIg2LQb0lTj+8xYPDPMQ7AYIr2KgZ7Pr3mjaxH dZM/RBYRsvo7vfV5B+kod3qGJPXVt7WOCo9XRajI5UplBMCL+4r9jYaC1fOQjUljJhjc 67xVY4Ylt5LXfwBYxEQsLrIGBZBJ3AhsPmX68= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=7ZaWDnAhrYsWGIYdgcVbTfSSGrIRYYS6Rq9d/e3otho=; b=CQ/iXdVwE8ts9nqKTdpEU28mZYFRTFqW95vHJmeW+mUiR27ZUrDJBpRkl2CEsPehwM f1P+ycdXzpbusxhckXUCaDZ8l20KOc1/ifMhiBuCMzxt9glnqemDSpj8gBubwpzXo0N+ Y7A20j52cuKDiiUYzgEPvE7V/rzxMRIRBSWMy0rUqunAF6/E8sD+gBtgsG5amCNdproT r9bcI6CzUoAAo5WhtMTLb/6FI3+xj29sdvVoWhgcFc0vrmavPIfqT8mgxQ4GVt32OEbG +VpPZg1ciaEXd+lQqVOhpwSVc4pwZ6v//F/Sxbnh2ORGOX4VSpPyi/M3YsqxDK1XpNGm AVaQ== X-Gm-Message-State: ALoCoQngWeRnnKXpjnMYS+aQtKZ6dzwxzplYvvYd2YxZoN8Fo0sl+Kz1odMS6EbXJRp5nWQ70lfet7wRrruOxOwjw8G1w4dcaw== X-Received: by 10.98.67.148 with SMTP id l20mr10702027pfi.109.1450317697558; Wed, 16 Dec 2015 18:01:37 -0800 (PST) Received: from localhost ([122.172.111.236]) by smtp.gmail.com with ESMTPSA id 73sm7388842pfa.3.2015.12.16.18.01.36 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 16 Dec 2015 18:01:36 -0800 (PST) Date: Thu, 17 Dec 2015 07:31:33 +0530 From: Viresh Kumar To: Bartlomiej Zolnierkiewicz Cc: Lee Jones , "Rafael J. Wysocki" , Stephen Boyd , nm@ti.com, linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, Dmitry Torokhov , Greg Kroah-Hartman , Len Brown , open list , Pavel Machek , Shawn Guo , linux-samsung-soc@vger.kernel.org Subject: Re: [PATCH] PM / OPP: Fix parsing of opp-microvolt and opp-microamp properties Message-ID: <20151217020133.GD3496@ubuntu> References: <18360458.m71vGHrTb9@amdc1976> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <18360458.m71vGHrTb9@amdc1976> 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 16-12-15, 16:41, Bartlomiej Zolnierkiewicz wrote: > Commit 01fb4d3c39d3 ("PM / OPP: Parse 'opp--' > bindings") broke support for parsing standard opp-microvolt and > opp-microamp properties. Fix it by setting 'name' string to > proper value for !dev_opp->prop_name cases. > > Cc: Viresh Kumar > Cc: Lee Jones > Cc: Rafael J. Wysocki > Fixes: 01fb4d3c39d3 ("PM / OPP: Parse 'opp-- 'bindings") > Signed-off-by: Bartlomiej Zolnierkiewicz > --- > This fixes Exynos4x12 cpufreq-dt support regression present in > linux-pm/linux-next tree. Rafael, please apply. Thank you. > > drivers/base/power/opp/core.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > Index: b/drivers/base/power/opp/core.c > =================================================================== > --- a/drivers/base/power/opp/core.c 2015-12-16 16:10:13.509171420 +0100 > +++ b/drivers/base/power/opp/core.c 2015-12-16 16:21:18.385183902 +0100 > @@ -806,11 +806,11 @@ static int opp_parse_supplies(struct dev > struct property *prop = NULL; > char name[NAME_MAX]; > > + sprintf(name, "opp-microvolt-%s", dev_opp->prop_name); > + > /* Search for "opp-microvolt-" */ > - if (dev_opp->prop_name) { > - sprintf(name, "opp-microvolt-%s", dev_opp->prop_name); > + if (dev_opp->prop_name) > prop = of_find_property(opp->np, name, NULL); > - } > > if (!prop) { > /* Search for "opp-microvolt" */ > @@ -848,10 +848,10 @@ static int opp_parse_supplies(struct dev > > /* Search for "opp-microamp-" */ > prop = NULL; > - if (dev_opp->prop_name) { > - sprintf(name, "opp-microamp-%s", dev_opp->prop_name); > + sprintf(name, "opp-microamp-%s", dev_opp->prop_name); > + > + if (dev_opp->prop_name) > prop = of_find_property(opp->np, name, NULL); > - } > > if (!prop) { > /* Search for "opp-microamp" */ Sorry about this. And I am disliking the solution suggested by Stephen more and more now. Please resend this patch with following changes instead: -- viresh -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ diff --git a/drivers/base/power/opp/core.c b/drivers/base/power/opp/core.c index 6c6856e426f0..a96df5cda303 100644 --- a/drivers/base/power/opp/core.c +++ b/drivers/base/power/opp/core.c @@ -816,7 +816,7 @@ static int opp_parse_supplies(struct dev_pm_opp *opp, struct device *dev, if (!prop) { /* Search for "opp-microvolt" */ - name[13] = '\0'; + sprintf(name, "opp-microvolt"); prop = of_find_property(opp->np, name, NULL); /* Missing property isn't a problem, but an invalid entry is */ @@ -857,7 +857,7 @@ static int opp_parse_supplies(struct dev_pm_opp *opp, struct device *dev, if (!prop) { /* Search for "opp-microamp" */ - name[12] = '\0'; + sprintf(name, "opp-microamp"); prop = of_find_property(opp->np, name, NULL); }