From patchwork Wed Oct 25 01:55:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Levin, Alexander \(Sasha Levin\)" X-Patchwork-Id: 117002 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp320183qgn; Tue, 24 Oct 2017 18:56:59 -0700 (PDT) X-Google-Smtp-Source: ABhQp+RQ0DgnIMnuAXTnw2Nw8QIYRM9Wh3nN0JW6Yz5+eDcQ7c8mB5/q8GBVQGuBqKCoeEJrOCLt X-Received: by 10.98.33.90 with SMTP id h87mr599796pfh.312.1508896619316; Tue, 24 Oct 2017 18:56:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508896619; cv=none; d=google.com; s=arc-20160816; b=TyxOvMd9PjGLW87ng7DNIWXHEmyH5jijpGl0Mskv6T7UAJfLXxJB/aruc/zRpPe8to v0VxC0R/tTI2BH0JT7Jq0tBSeCqk536BTjUc0NJ+3eLExADeqMjtDUJu/cYTi58xFd/U wyVxEdylNVqfezJY8uIaR53kIOvMDFM+j/0qQeDJQx0hAg05GPWEof6uLc50HlERCHGj hzZpIbf9JSAZ1Cq7WyyjOUHEiMu5ecC1TUQlvwUr+lHCyd9y+3UblAfqcccURJCqTnHw CQGAnJXhyPSzwDp2r9B5sn+bkSp0k/qJbZtSRmr+v5myomOENrQRdxPXDRjDajXIZL/2 RUBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:to:dkim-signature :dkim-signature:cc:from:dkim-signature:arc-authentication-results; bh=2G5QbN9pVgGoShaPRdHP0l+HgTi+f4ZKRLTLE/tSbj8=; b=gpv1LuBiUosvfLvH40fYf3sW6OYCQpWWVW0yiNDWzmtM1t8qBkDw7xmrOrVQ9aSZ9+ I5N9qS1S+V0e73OpOQU6VEtTRue/1PRgk/C91aStPcgE4rZbp4zCaogdVacMfByoqN3D W5ALIG6U4gGcX80zqrVIWZCupxihDjmijgFEwgah/nXQrVg8SioXRroHBbzatYpy5Mz+ rk8PO8Hyk77XsfVLIWhZsViJ7IB7ks0j0bGo7KWZbsHftwS8qX6ImIXlpeRa/gxFne4e kk5FitK8lpNkvnrh4ipozvltDn8BvXxU5S2dUZ1K6K8cUZubTzXjHtZVBRUXmoktFlrY Xgmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@verizon.com header.s=corp header.b=H3CkHrrF; dkim=fail header.i=@verizon.com header.s=corp header.b=rBWYJ2q0; dkim=fail header.i=@verizon.com header.s=corp header.b=rBWYJ2q0; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=verizon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g34si902586pld.207.2017.10.24.18.56.59; Tue, 24 Oct 2017 18:56:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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=@verizon.com header.s=corp header.b=H3CkHrrF; dkim=fail header.i=@verizon.com header.s=corp header.b=rBWYJ2q0; dkim=fail header.i=@verizon.com header.s=corp header.b=rBWYJ2q0; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=verizon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932231AbdJYB45 (ORCPT + 9 others); Tue, 24 Oct 2017 21:56:57 -0400 Received: from omzsmtpe03.verizonbusiness.com ([199.249.25.208]:16025 "EHLO omzsmtpe03.verizonbusiness.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932290AbdJYB4k (ORCPT ); Tue, 24 Oct 2017 21:56:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1508896600; x=1540432600; h=from:cc:to:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=p3bHQYe5vvQ1w+/gFuyWizTDEkwpqe5WyyMssjGjxBk=; b=H3CkHrrFNmJIv4KopxKvjWecYxP1kshek2aOidMUzkneCFYUz6QU+o/Q GcQlwgnx/8HbOt54M3tuT77yNCX0Uh/Py7ALlzL3+dTIZ05GRl3+hSUGb +HPqCgDUBSq+7wNOcIk2jru9pIuULk+lNWrwtJiBmcRI7RPDRD9mL1gRd 8=; Received: from unknown (HELO fldsmtpi02.verizon.com) ([166.68.71.144]) by omzsmtpe03.verizonbusiness.com with ESMTP; 25 Oct 2017 01:56:38 +0000 From: "Levin, Alexander (Sasha Levin)" Cc: Viresh Kumar , "Rafael J . Wysocki" , "Levin, Alexander (Sasha Levin)" Received: from rogue-10-255-192-101.rogue.vzwcorp.com (HELO atlantis.verizonwireless.com) ([10.255.192.101]) by fldsmtpi02.verizon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 25 Oct 2017 01:56:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1508896563; x=1540432563; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=p3bHQYe5vvQ1w+/gFuyWizTDEkwpqe5WyyMssjGjxBk=; b=rBWYJ2q0uZ+8qU8Mv7vj50YnM9gusSHvDNK2smMlD/CHnrGltVLNsv32 UfaOTE0Hclaq5DoRNQgAbLtSnLBw+n2EWxAEWYsfR+2y3BB+Irq/BlDx5 AupGFR6U9PJkeenYh0M23rpqIpkosBsaE2vuJHQCMjaKd2LzSloMbPtuv Y=; Received: from mariner.tdc.vzwcorp.com (HELO eris.verizonwireless.com) ([10.254.88.84]) by atlantis.verizonwireless.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 24 Oct 2017 21:56:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1508896563; x=1540432563; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=p3bHQYe5vvQ1w+/gFuyWizTDEkwpqe5WyyMssjGjxBk=; b=rBWYJ2q0uZ+8qU8Mv7vj50YnM9gusSHvDNK2smMlD/CHnrGltVLNsv32 UfaOTE0Hclaq5DoRNQgAbLtSnLBw+n2EWxAEWYsfR+2y3BB+Irq/BlDx5 AupGFR6U9PJkeenYh0M23rpqIpkosBsaE2vuJHQCMjaKd2LzSloMbPtuv Y=; X-Host: mariner.tdc.vzwcorp.com Received: from ohtwi1exh001.uswin.ad.vzwcorp.com ([10.144.218.43]) by eris.verizonwireless.com with ESMTP/TLS/AES128-SHA256; 25 Oct 2017 01:56:03 +0000 Received: from tbwexch09apd.uswin.ad.vzwcorp.com (153.114.162.33) by OHTWI1EXH001.uswin.ad.vzwcorp.com (10.144.218.43) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 24 Oct 2017 21:56:02 -0400 Received: from OMZP1LUMXCA19.uswin.ad.vzwcorp.com (144.8.22.197) by tbwexch09apd.uswin.ad.vzwcorp.com (153.114.162.33) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Tue, 24 Oct 2017 21:56:02 -0400 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com (144.8.22.195) by OMZP1LUMXCA19.uswin.ad.vzwcorp.com (144.8.22.197) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Tue, 24 Oct 2017 20:55:57 -0500 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com ([144.8.22.195]) by OMZP1LUMXCA17.uswin.ad.vzwcorp.com ([144.8.22.195]) with mapi id 15.00.1263.000; Tue, 24 Oct 2017 20:55:57 -0500 To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" Subject: [PATCH AUTOSEL for 4.9 09/50] PM / OPP: Error out on failing to add static OPPs for v1 bindings Thread-Topic: [PATCH AUTOSEL for 4.9 09/50] PM / OPP: Error out on failing to add static OPPs for v1 bindings Thread-Index: AQHTTTRk17WBvj8g80mmv+Rpwp9tmQ== Date: Wed, 25 Oct 2017 01:55:54 +0000 Message-ID: <20171025015539.24525-9-alexander.levin@verizon.com> References: <20171025015539.24525-1-alexander.levin@verizon.com> In-Reply-To: <20171025015539.24525-1-alexander.levin@verizon.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.144.60.250] MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Viresh Kumar [ Upstream commit 04a86a84c42ca18f37ab446127dc619b41dd3b23 ] The code adding static OPPs for V2 bindings already does so. Make the V1 bindings specific code behave the same. Signed-off-by: Viresh Kumar Reviewed-by: Stephen Boyd Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- drivers/base/power/opp/of.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) -- 2.11.0 diff --git a/drivers/base/power/opp/of.c b/drivers/base/power/opp/of.c index 5552211e6fcd..b52c617947ad 100644 --- a/drivers/base/power/opp/of.c +++ b/drivers/base/power/opp/of.c @@ -386,7 +386,7 @@ static int _of_add_opp_table_v1(struct device *dev) { const struct property *prop; const __be32 *val; - int nr; + int nr, ret; prop = of_find_property(dev->of_node, "operating-points", NULL); if (!prop) @@ -409,9 +409,13 @@ static int _of_add_opp_table_v1(struct device *dev) unsigned long freq = be32_to_cpup(val++) * 1000; unsigned long volt = be32_to_cpup(val++); - if (_opp_add_v1(dev, freq, volt, false)) - dev_warn(dev, "%s: Failed to add OPP %ld\n", - __func__, freq); + ret = _opp_add_v1(dev, freq, volt, false); + if (ret) { + dev_err(dev, "%s: Failed to add OPP %ld (%d)\n", + __func__, freq, ret); + dev_pm_opp_of_remove_table(dev); + return ret; + } nr -= 2; }