Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp2725485imc; Tue, 12 Mar 2019 23:03:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqzEz7yLdSau2iNUgdfnDX/R2rc1VuYK+GJLMxcgY7F9UUdIiDzOE+uVB044EaGi9ZO4GBFj X-Received: by 2002:a65:654d:: with SMTP id a13mr39398165pgw.181.1552456980334; Tue, 12 Mar 2019 23:03:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552456980; cv=none; d=google.com; s=arc-20160816; b=iScYsQDAJDluf8l7q57yQDQhyJg8933+47bnRUNNy/2qsNL5ahbASImFPnVMx6lttx /hBcVNlfjpn+wfoo0OMhYULwtycqZ9+A7xruSCdGO6WgDvvxZpQJwXxLCD5fKByCJcLk 1mwUyADLw9WlM0ngYqrUFpwVBLvpRecjOGphwckCCKiVkK6d12afK/cRbYvULtXPHMRu i2li1lM0qMQmFszn17537qY4Xy/FqRFIWaY/W2z85xlMV1Ot0qeDfZUYBeVxzf9GgTtO iMISUP5TxdvXFSQQscNzIcFtp44khYVnVWFY8ydZoZYjzQpzP4F+/AMPASXQZQ/QGGS9 C8uA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:dkim-signature; bh=SvV0Q/eRGzkak8UgFSRaSyMDaZVhJfaHany7EqyxiC0=; b=vc+910TlNCnBze1zsJaeDE7kAsid3HRft7ineWRrdhEYob/D40q5Eh7nNE+KCeu/1c uE5N67krZJx7thG7sCwXEEsfk4wmQObZI35w0ioTvWzZmG1zxSBEyBpe2JL9jfYPZe+7 wIi0WFGUPmf/aYZKHmrotjo8W7ahLhvfwhXTWm0Sc9M9SaCovKIWGDX/DEXvv6tu2o0j l0lJ+5Um17xo6ZyYOItCXncTYUy2RlPg9tjoTYdZv+zcahlbUu+d89VuVFlCh/b+EvWA /6Pk18dS6y7QVoQgNULq/xDKkcxD1bzJstwdnYY6c+lRwo6xGoHKe7F6leKXGLGto0RX ra7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=LvPrR6bo; dkim=pass header.i=@codeaurora.org header.s=default header.b="dc/gN6xm"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o15si5715060pgl.232.2019.03.12.23.02.44; Tue, 12 Mar 2019 23:03:00 -0700 (PDT) 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; dkim=pass header.i=@codeaurora.org header.s=default header.b=LvPrR6bo; dkim=pass header.i=@codeaurora.org header.s=default header.b="dc/gN6xm"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726873AbfCMGBD (ORCPT + 99 others); Wed, 13 Mar 2019 02:01:03 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:36612 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726561AbfCMGBD (ORCPT ); Wed, 13 Mar 2019 02:01:03 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 6F2E4609CD; Wed, 13 Mar 2019 06:01:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1552456862; bh=1DpymPIntb4hChHfE/YHrxYiXXtxKErjp4lax41Ufqc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=LvPrR6bozb4ZodpscbOH5Kq+uZ1fNzTx7xlPd4/KfyJlAAkiPtf3aD0Igp4oKoY+K P8hqPj0hiABQuOK/Z6XzmzB0REaWxceOaj2lLEBNaF4kaNfbHmxdi4FvjoGNpp4jmP cKaIczuqQZyMxjxLYKZ1qrPbfY6Pia8FDFVxBz9g= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 647E360767; Wed, 13 Mar 2019 06:01:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1552456861; bh=1DpymPIntb4hChHfE/YHrxYiXXtxKErjp4lax41Ufqc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=dc/gN6xmATJETCZdjuXQv/G8hszFKL15gUn0i3Zlfkt6fR5L8nJbjJCbleLaoj9B+ LJUWR/SiFjd86nTKsgzG1+2UL9H88Qoqbel0TqtFSy9Br0UPKk61e1fqdzlFrrV80S pFSOOiqdbjUCp2fGDJend3J7M1ek4VHrHuSDJ/II= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 13 Mar 2019 11:31:01 +0530 From: Sibi Sankar To: myungjoo.ham@samsung.com Cc: Chanwoo Choi , Kyungmin Park , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm-owner@vger.kernel.org, Saravana Kannan Subject: Re: [PATCH v5] PM / devfreq: Restart previous governor if new governor fails to start In-Reply-To: <20190312071714epcms1p20e78a537f8cb0d7d04e4fd077916fd51@epcms1p2> References: <20190311100630.12952-1-sibis@codeaurora.org> <20190312071714epcms1p20e78a537f8cb0d7d04e4fd077916fd51@epcms1p2> Message-ID: <2b78582a74ae7a17ed2f27187f3f32f4@codeaurora.org> X-Sender: sibis@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-03-12 12:47, MyungJoo Ham wrote: >> From: Saravana Kannan >> >> If the new governor fails to start, switch back to old governor so >> that the >> devfreq state is not left in some weird limbo. >> >> [Mjungjoo: assume fatal on revert failure and set df->governor to >> NULL] >> Signed-off-by: Sibi Sankar >> Signed-off-by: Saravana Kannan >> Reviewed-by: Chanwoo Choi > > I'll modify WARN->ERROR for the case when it's fatal: Sure, thanks. > >> + if (ret) { >> + dev_warn(dev, >> + "%s: reverting to Governor %s failed (%d)\n", >> + __func__, df->governor_name, ret); >> + df->governor = NULL; >> + } > > Acked-by: MyungJoo Ham > > >> --- >> V5: >> * assume fatal on revert failure and set df->governor to NULL >> >> V4: >> * Removed prev_governor check. >> >> V3: >> * Fix NULL deref for real this time. >> * Addressed some style preferences. >> >> V2: >> * Fixed typo in commit text >> * Fixed potential NULL deref >> >> drivers/devfreq/devfreq.c | 16 ++++++++++++++-- >> 1 file changed, 14 insertions(+), 2 deletions(-) >> -- -- Sibi Sankar -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.