Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp1794998imc; Tue, 12 Mar 2019 00:18:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqzBloWXAJ/r9obJuaOahxtfIaHFIEPtRRz+bhFoKcxLAkCXWpQnoz6IEDQ1dN+x++yELXJc X-Received: by 2002:a63:fd03:: with SMTP id d3mr33149616pgh.359.1552375131446; Tue, 12 Mar 2019 00:18:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552375131; cv=none; d=google.com; s=arc-20160816; b=DSE8cz1RmdjXbSWl7R61guDBes8IzZStusVkv8gStCLmHcRseS2b4C1YULeR6youeq jnkp18jCmWNz7+1mm8fMen4GrKA4ngxvVlM9aJk33UCUoLK1+PYZQyA0O6zGPrnfrBLF B5MNrNX6Mu5cmFMcn4orr5uG1tJdweOVKnwXDMA+tAQBCPsil4hXB5Nm7mgnDZsWyaf0 iCqnUqmSH0dXAUB7RIcpyVoaJHtmnjBN6GwKoUzMP7jzJ0CaJ+wKp7BLSJ8sD2AT4P5c conmgmF4QJzdbfMKa7GjaPp3XS4SuwrZm2XANFeZZLe1/mTldsqmCQ4IHowrG5w7RVw+ zNLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:dlp-filter:cms-type :content-transfer-encoding:date:message-id:in-reply-to:cc:to:from :reply-to:subject:mime-version:dkim-signature:dkim-filter; bh=1IBBrG+WqDmcIXONxlC9RellrcYTCsmaFnxlYD9xyHw=; b=ec90otWdsbyTEyjLMn2CT9wUvxBi8WJIOaQ3c6sywhpOhCzrKk/kHlX/TeGX4FLEEu /RKOuG/pEsDmfN1FhBkxGvnQCrOeOWGtNzCSRQ5JWLAEVnRe41hwLbLOtvZ4uK0BC2s+ lRRrSf2fRdB62PGAJQFehXQWqXPHIx/AzmFZYyeYsgt++MY2NfGe8r3QNITGWA4TXNBU 43d8sxM6J+O5VJ1zjM9f/S9mmGTTDdUm2oaZxzGaRzRNQsd+5Y8UKHYWBsmeTzm09fad 4R5A6o3DCeZlCUVjdZzTUpFWNKtjOC1GTd2qoUUJyf68kIXwxNfvCuPgbUkkZZE67IAQ ZNHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=ry0B4Y2o; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k129si7156464pfc.45.2019.03.12.00.18.36; Tue, 12 Mar 2019 00:18:51 -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=@samsung.com header.s=mail20170921 header.b=ry0B4Y2o; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727489AbfCLHRX (ORCPT + 99 others); Tue, 12 Mar 2019 03:17:23 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:35237 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727451AbfCLHRW (ORCPT ); Tue, 12 Mar 2019 03:17:22 -0400 Received: from epcas1p2.samsung.com (unknown [182.195.41.46]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20190312071720epoutp03078b53e711c12a5bff9858b3ebbffd87~LJN-qRSau2625126251epoutp03L for ; Tue, 12 Mar 2019 07:17:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20190312071720epoutp03078b53e711c12a5bff9858b3ebbffd87~LJN-qRSau2625126251epoutp03L DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1552375040; bh=1IBBrG+WqDmcIXONxlC9RellrcYTCsmaFnxlYD9xyHw=; h=Subject:Reply-To:From:To:CC:In-Reply-To:Date:References:From; b=ry0B4Y2ohcqWbXdhxG/6sEtOZy3lvZPdIFwkcR2160e7sviEyV5apj6pv+occSWQ4 4c4zYxeIjJ0VG/JHzeSZ1b93iYGeVjC50JWzFzG7g6pP356DN0JBRpQCarwAhfenJa Wm1kWtCokb2Mpx1mc+0bL5BcWqmT6rD9wLxeSfig= Received: from epsmges1p3.samsung.com (unknown [182.195.40.157]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20190312071717epcas1p2b7342c992e6b3087f62739a2593a023e~LJN9Gt1bf1340513405epcas1p2V; Tue, 12 Mar 2019 07:17:17 +0000 (GMT) X-AuditID: b6c32a37-f19ff7000000102f-31-5c875cfa7ed9 Received: from epcas1p3.samsung.com ( [182.195.41.47]) by epsmges1p3.samsung.com (Symantec Messaging Gateway) with SMTP id C0.42.04143.AFC578C5; Tue, 12 Mar 2019 16:17:14 +0900 (KST) Mime-Version: 1.0 Subject: RE: [PATCH v5] PM / devfreq: Restart previous governor if new governor fails to start Reply-To: myungjoo.ham@samsung.com From: MyungJoo Ham To: Chanwoo Choi , Sibi Sankar CC: Kyungmin Park , "linux-pm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-msm-owner@vger.kernel.org" , Saravana Kannan X-Priority: 3 X-Content-Kind-Code: NORMAL In-Reply-To: <20190311100630.12952-1-sibis@codeaurora.org> X-Drm-Type: N,general X-Msg-Generator: Mail X-Msg-Type: PERSONAL X-Reply-Demand: N Message-ID: <20190312071714epcms1p20e78a537f8cb0d7d04e4fd077916fd51@epcms1p2> Date: Tue, 12 Mar 2019 16:17:14 +0900 X-CMS-MailID: 20190312071714epcms1p20e78a537f8cb0d7d04e4fd077916fd51 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" CMS-TYPE: 101P X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrHKsWRmVeSWpSXmKPExsWy7bCmvu6vmPYYgyuvrC2uf3nOanG26Q27 xe/FE9gtLu+aw2bxufcIo8W1he9ZLQ5cnMjmwO5xua+XyaNvyypGj8+b5AKYo7JtMlITU1KL FFLzkvNTMvPSbZW8g+Od403NDAx1DS0tzJUU8hJzU22VXHwCdN0yc4CWKymUJeaUAoUCEouL lfTtbIryS0tSFTLyi0tslVILUnIKLAv0ihNzi0vz0vWS83OtDA0MjEyBChOyM/Ye/8ZcsIej Yvf3FtYGxpdsXYycHBICJhIfdjewdzFycQgJ7GCUOPn2HpDDwcErICjxd4cwSI2wQILEq1UH GUFsIQEliYab+5gh4voSHQ+2gcXZBHQltm64ywLSKiLgI7H4qiTISGaBRUwSH88cYYXYxSsx o/0pC4QtLbF9+VZGkHpOASuJv1sFIcKiEjdXv2WHsd8fm88IYYtItN47ywxhC0o8+LmbEWbM jCn/oUZWS1ybvhjsFQmBFkaJ3tVToIr0Jc7MPQn2L6+Ar8SmCQ/B4iwCqhJ7fz6FqnGRWH4F 4hdmAXmJ7W/nMIPcxiygKbF+lz5EmE/i3dceuFd2zHvCBGGrSRzavQTqZhmJ09MXQt3pIXH3 9AMWSNA2Mkr0/DvJNIFRfhYidGch2TYLYdsCRuZVjGKpBcW56anFhgXGyBG6iRGc9rTMdzBu OOdziFGAg1GJh9ehuC1GiDWxrLgy9xCjBAezkghvl317jBBvSmJlVWpRfnxRaU5q8SFGU6Cn JzJLiSbnA1NyXkm8oamRsbGxhYmhmamhoZI473oH5xghgfTEktTs1NSC1CKYPiYOTqkGxpK0 q93vV9t16FRstLW1cX9plrUivdFJNqhfzN6avX7Tal6OfF29yFINpZpHpTH9rl9Wbl/dU8r2 fTl3nuFB109HZ7xQuexzWWhRN3+KyAmVVpFrx6WKN3z1+uIaesRB5vbjjLoDgn/OyzdPPT5/ 0cMl3FW7Gvt/xf7KOF6X3S38eBFDQes7JZbijERDLeai4kQAPyZexJEDAAA= DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20190311100759epcas5p41fc634cd67a99b39cd25c4129e489c4c References: <20190311100630.12952-1-sibis@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >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: >+ 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(-) >