From patchwork Wed Aug 23 16:10:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aisheng Dong X-Patchwork-Id: 9917771 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E61A1608BA for ; Wed, 23 Aug 2017 16:11:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D70E22899C for ; Wed, 23 Aug 2017 16:11:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CBDE0289D7; Wed, 23 Aug 2017 16:11:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 13459289E0 for ; Wed, 23 Aug 2017 16:11:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932204AbdHWQKm (ORCPT ); Wed, 23 Aug 2017 12:10:42 -0400 Received: from mail-cys01nam02on0068.outbound.protection.outlook.com ([104.47.37.68]:31801 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932449AbdHWQKj (ORCPT ); Wed, 23 Aug 2017 12:10:39 -0400 Received: from MWHPR03CA0046.namprd03.prod.outlook.com (2603:10b6:301:3b::35) by MWHSPR01MB180.namprd03.prod.outlook.com (2603:10b6:301:7b::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1362.18; Wed, 23 Aug 2017 16:10:37 +0000 Received: from BL2FFO11FD037.protection.gbl (2a01:111:f400:7c09::158) by MWHPR03CA0046.outlook.office365.com (2603:10b6:301:3b::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1362.18 via Frontend Transport; Wed, 23 Aug 2017 16:10:37 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BL2FFO11FD037.mail.protection.outlook.com (10.173.161.133) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1341.15 via Frontend Transport; Wed, 23 Aug 2017 16:10:37 +0000 Received: from b29396-OptiPlex-7040.ap.freescale.net (b29396-OptiPlex-7040.ap.freescale.net [10.192.242.182]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v7NGABgi021744; Wed, 23 Aug 2017 09:10:33 -0700 From: Dong Aisheng To: CC: , , , , , , , , , Dong Aisheng Subject: [PATCH 6/7] cpufreq: make cpufreq_generic_init transition_latency default to CPUFREQ_ETERNAL Date: Thu, 24 Aug 2017 00:10:09 +0800 Message-ID: <1503504610-12880-7-git-send-email-aisheng.dong@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1503504610-12880-1-git-send-email-aisheng.dong@nxp.com> References: <1503504610-12880-1-git-send-email-aisheng.dong@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131479782376789166; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(39860400002)(39380400002)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(2351001)(8676002)(2906002)(47776003)(498600001)(8656003)(33646002)(81156014)(189998001)(7416002)(53936002)(8936002)(85426001)(104016004)(105606002)(81166006)(54906002)(110136004)(5003940100001)(6916009)(36756003)(48376002)(5660300001)(2950100002)(6666003)(77096006)(50986999)(305945005)(76176999)(356003)(626005)(50466002)(97736004)(50226002)(68736007)(4326008)(86362001)(106466001)(41533002); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHSPR01MB180; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD037; 1:tmauQKz72ouyFIkFMxPvWXKTJU4KTlwGAn5IDVS/W2qMzvTqxngggA00OvOJjt+lnAS120PSbEGEyI7qch8fulFE8yn8yZ/iADrw2k3J5nXb8tVojuSRDx0y6FULpr4m MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b5198ba8-4cbc-4528-6845-08d4ea417e18 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(2017052603186)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:MWHSPR01MB180; X-Microsoft-Exchange-Diagnostics: 1; MWHSPR01MB180; 3:bbFlN/ZWsrseA7cWiI+WT+E+v7wHmz01ZgaS9RDt9kS1s3Ml7NiosYoAWbU4whgSlzebQX5En7Pnybd2P08eI1Vo9OY2sR8CImv6mP1P0aYgA1dTFSBu5ImyL6LvEI4g/rzbdNFapqtffc7jjn9k6WtlLYYm7Bo4GP519adVig+mUCG/jkr3mCp7agoX4WMZ/gGStOp4V4gPmF7ZX5Sff2+Vz18HDvEHEshK8uJwvQZsTnPifoUtY/mCm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xIiLBh97owF3wCRLrhF5cql0hYFdyzAjeGLeGAaw== X-Exchange-Antispam-Report-Test: UriScan:(31051911155226)(185117386973197); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(601004)(2401047)(8121501046)(13016025)(13018025)(5005006)(93006095)(93001095)(100000703101)(100105400095)(3002001)(10201501046)(6055026)(6096035)(20161123561025)(20161123563025)(20161123559100)(20161123565025)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(20161123556025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:MWHSPR01MB180; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:MWHSPR01MB180; X-Forefront-PRVS: 040866B734 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHSPR01MB180; 23:nXOEaSkxfHweujzEd1LWiDS1IJZ2zG2vNec4M7/oq?= =?us-ascii?Q?qP/Xfn+886oZcs6KLOcjo0jNKEyO5L8tpXzdgLbreO1axUpQoDwSzNMHJKYE?= =?us-ascii?Q?uhYKNC4HCpDmjwWsd7DAEr95nTDA9rK+51BlWePgrR1jDxCWjdNKW0tjR439?= =?us-ascii?Q?3wYqMO8AcFffcGziQDm/K1xuXx4ASlBM2WzC+GA8qG+Ap8XFBNR6v+EL0sbg?= =?us-ascii?Q?qTj0T1aSop+NZcu+vofXXbeAKyYdPYLuDD1IF/xtqywW5j2S5eM5DsfUC5e3?= =?us-ascii?Q?s35FtnLkhbm49tIC/eDxQJLaGqjAUwaAOir+tYNI+u+bLsTjF0/bcUeYwKvI?= =?us-ascii?Q?6qjnvs3P7WhhhB4ox1sbiFucRdrTPhxODsuSaniHSePrN4Y/GVFg8eUvq6xs?= =?us-ascii?Q?p9O+Wxxh/tfq4f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9U5ETHeg2ASNAQMNL1JoklNZoxQpKrkK4Hk0exTR/nz1yoO1YTW3VARPa5vwobNhxa+lRLyT5IdMfnzoAcS8ZWF0OpfMFek6ehow66Jt2RiogMRxfUUq7VZ6eSXuymMUfP/Cp+pEYeBZfzZA8Se6MPKcb+qtNBguDx88OAe93//Eh4UQ52YAxURKC9WbwncobFmpDeXPLy51EsA7zUcp7D8YaWOz7+I8Mn7U1QlgJRmhERKqE3aDWg==; 5:3mEBUf9kAQVxIgbclPo62D6HpxyEBifeM2RZJOmfZFtmWjawn1bi5gOzno5Din29TdXJ2jvKVFD9TmOmpGOzFMiHtn7v0XTAgaXI2aTtUEQJf3O5W2rvYPWNKJ9CpDViZF+QErov6Ghk+5UCHNPdJQ==; 24:ZblyDNBQEsSc7hnCnYEn/QjRbXsFUdyQcyUVfyttpS1cBQk5V2/p+SY297Gr3ulzP3/dZc7xaLx5oOyoeRCzJuKC2vdpHsCzcUXT7H56YGQ=; 7:yc4+vQZTOr7b9kp+1N3GrImpS0gIQK7OVHatEfSn1iuDoHObzkRiuPp86lgfz3goNEZ8MNUok5nnqoWxSGwYAWIJ8EME3iSTzRZQLntjZQd805Tsw8eRZORmdy5CeM2flyslc7RnkOCl3awMBIfcPECIPvFnntedV8eahFqaNNKMdVK2WHlBJZ7R0ibFo2xGYLYOGtaH5lpaBF4Yu4mSmKjvo+ruGQqzmZNHCXisXRI= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2017 16:10:37.3825 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHSPR01MB180 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If no valid transition_latency specified, let's make it default to CPUFREQ_ETERNAL which is consistent with its definition. This can save some of the same checkings like this: transition_latency = dev_pm_opp_get_max_transition_latency(cpu_dev); - if (!transition_latency) - transition_latency = CPUFREQ_ETERNAL; ret = cpufreq_generic_init(policy, freq_table, transition_latency); Cc: Viresh Kumar Cc: Nishanth Menon Cc: Stephen Boyd Cc: "Rafael J. Wysocki" Signed-off-by: Dong Aisheng --- drivers/cpufreq/cpufreq.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 9bf97a3..da07de6 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -180,6 +180,8 @@ int cpufreq_generic_init(struct cpufreq_policy *policy, return ret; } + if (!transition_latency) + transition_latency = CPUFREQ_ETERNAL; policy->cpuinfo.transition_latency = transition_latency; /*