From patchwork Sat Nov 26 13:34:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 26246 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp4634314wrr; Sat, 26 Nov 2022 05:36:19 -0800 (PST) X-Google-Smtp-Source: AA0mqf6NzPmM/86uHkPnae69znm51h2rd70JXI6r+sDVOKfK5fpCs8Zd/HuTTwBdsBvuLs0FSP6z X-Received: by 2002:a17:90a:588b:b0:219:c40:e5f with SMTP id j11-20020a17090a588b00b002190c400e5fmr8400500pji.49.1669469779110; Sat, 26 Nov 2022 05:36:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669469779; cv=none; d=google.com; s=arc-20160816; b=dSQTcJBIC99KY9glSipNRmgmDJOcS/s1ai2hDn7JChpChqPBZ/24tUzS7FnxrSF0bX gevlcj2mjvrOV5z0Di/lrTL68FaI88a+TqTuxzhlr3/RbIBUVRzUi/clwgcRABgzl98E 4qskzP2QSHTZV+3O2oPpu8vlnW6fgNmE/4mTO8NqrJg2pkxT7pCESaingom69yINCom+ +2R7NkF5k3VxpGP7eQAYyLDFVnfNMvR+t3lnbHE0hjITOVFoOD0GYobunefFT+2DETF5 LwdmAWbsMnESfwGQiRgRYnBovMTR//Bh+aNgNATjbldL5O4R1B/5ETNItaHRhxYnxJAi NwNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=0bzeurKs43bdeMtLCP7XNpz7DjxYDtCiG6Qg2Pn3fZ0=; b=QT5IjsvlarY32yb2ZeaNlchulIHznL34zQo8d0NfzUDgNTaDynPfiHfJAD5SzsSHGN w0TdoJz7wRjPyf91+noJdNVmKczJ589yKIpjDQZ+AsGiD/bSDYIJuB1ipMmJVrKjkMcD s4jOYb3xl0PloNlKarJeTbM7fIeQKi5w9fijxsw5hBfVXX2dK0CmEHgUcFC0DqGHjSM0 Yg52ozNTIezUKof+Me47QH1/tC+QQ7GncxOff2OQtsZsLHFvKjtD0fhTramJCMJWWnEX EzrPWV7U0gaO+YJ4TUAWHSP9mq+aNzvYPNseHKI3g7MYfCaPRAh9PZ6cQvnK6NWqiNR3 WsLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=bgFZ4NMs; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q190-20020a6343c7000000b0046ff3634a6asi6891008pga.215.2022.11.26.05.36.05; Sat, 26 Nov 2022 05:36:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=bgFZ4NMs; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229630AbiKZNep (ORCPT + 99 others); Sat, 26 Nov 2022 08:34:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229563AbiKZNef (ORCPT ); Sat, 26 Nov 2022 08:34:35 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2728119039 for ; Sat, 26 Nov 2022 05:34:35 -0800 (PST) Date: Sat, 26 Nov 2022 13:34:32 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1669469673; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0bzeurKs43bdeMtLCP7XNpz7DjxYDtCiG6Qg2Pn3fZ0=; b=bgFZ4NMsZouF3z70TBNriLdDNSYDggJflWNRas0DtK5Rrx7EavTY6DiO+u9D3NmY3f0289 3j/A9OOZeSWz020q7lX07yJX7EjD0UUz8XnPS3WbaqmSFjE4F8PN36yRJikJG49nhzyo2u 5b4+cKhtxUAgh9tYynJ/epoFW9tl99VxUsM3h2DwSUYZOuVis0aWsrnJNdZikf9cdfnPww tirDYfFTeNPsgEq7ME068cQzcApRY+ZsuoEYi7VqTI40v1yF9zxNA1n8wLH38HmKod7BH0 jZXRLhouklysFUG70fVcBMeydamyaVJg1L3Erl6+UTziSPnbp11NDOWfz818Ag== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1669469673; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0bzeurKs43bdeMtLCP7XNpz7DjxYDtCiG6Qg2Pn3fZ0=; b=/V2uCyUubcRM6Y3JB7jcAgUl6PJXf3ifCuPWYbVKLGzGEJ6/Wtxp+8n5VCshCVAJw0H0rv s2+dWJ76o7TamzCg== From: "irqchip-bot for Shang XiaoJing" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-kernel@vger.kernel.org Subject: [irqchip: irq/irqchip-next] irqchip: gic-pm: Use pm_runtime_resume_and_get() in gic_probe() Cc: Shang XiaoJing , Marc Zyngier , tglx@linutronix.de In-Reply-To: <20221124065150.22809-1-shangxiaojing@huawei.com> References: <20221124065150.22809-1-shangxiaojing@huawei.com> MIME-Version: 1.0 Message-ID: <166946967257.4906.15241711598038467524.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750361272265167996?= X-GMAIL-MSGID: =?utf-8?q?1750565943460080788?= The following commit has been merged into the irq/irqchip-next branch of irqchip: Commit-ID: f9ee20c85b3a3ba0afd3672630ec4f93d339f015 Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/f9ee20c85b3a3ba0afd3672630ec4f93d339f015 Author: Shang XiaoJing AuthorDate: Thu, 24 Nov 2022 14:51:50 +08:00 Committer: Marc Zyngier CommitterDate: Sat, 26 Nov 2022 13:29:42 irqchip: gic-pm: Use pm_runtime_resume_and_get() in gic_probe() gic_probe() calls pm_runtime_get_sync() and added fail path as rpm_put to put usage_counter. However, pm_runtime_get_sync() will increment usage_counter even it failed. Fix it by replacing it with pm_runtime_resume_and_get() to keep usage counter balanced. Fixes: 9c8edddfc992 ("irqchip/gic: Add platform driver for non-root GICs that require RPM") Signed-off-by: Shang XiaoJing Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124065150.22809-1-shangxiaojing@huawei.com --- drivers/irqchip/irq-gic-pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-gic-pm.c b/drivers/irqchip/irq-gic-pm.c index b60e185..3989d16 100644 --- a/drivers/irqchip/irq-gic-pm.c +++ b/drivers/irqchip/irq-gic-pm.c @@ -102,7 +102,7 @@ static int gic_probe(struct platform_device *pdev) pm_runtime_enable(dev); - ret = pm_runtime_get_sync(dev); + ret = pm_runtime_resume_and_get(dev); if (ret < 0) goto rpm_disable;