Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp2764193pxb; Mon, 18 Apr 2022 07:47:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrNkFgsuA4R0xQn+GrKCERL5wDj2T722hmhkTuDAroIvjPZxMLayABp6BUD/Fu/fK0zoFv X-Received: by 2002:a17:907:980b:b0:6e8:b8a8:d045 with SMTP id ji11-20020a170907980b00b006e8b8a8d045mr10146052ejc.460.1650293247579; Mon, 18 Apr 2022 07:47:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650293247; cv=none; d=google.com; s=arc-20160816; b=AXJ3/R/XsRpDQqYYE9akLrVds9QpzXc9+jpDLgQCC/yfLtgN618g9bVGJVQ+VNJKCw gm+jCm6opMy7AuwWmWcPAz4aP4tfInYRc0IZQZs1zndeIxTktGaYxBjrTNfi5gGAbNy/ xL6BhRFmuZ1ed2VUl0X93XPGMyFlE3C0s1KTDiuQBzZ8A5p5t72GAG51vNBk1cuWMslS w3Ky/gkrXkSBFlLcL2/S7tVUuzxeoxt3JVjj7CUdYTyoajTIu7oS2fODKMzyfzaRzPGp q7K3R1jyfm8+g/zH753jXj1d0W2/b8o9U4lWms1N07BSptzE8cUtzRHITanAjE+lKgwP OOkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=mJYathoFEIzfoBsN3XEQLNGQPaiEyKTpa9HUFEQqI7g=; b=SvIi0xtWK3/GS61XYw2uFQ4Be3lXzQKsLoR/rx904c9bjIkCWDSBbCo6voTwcpVbhH sWdS0PcXmYm0ejk+Aq+uHgoqIWVIYJQAfemKL3UzRLF/4R8nZVHPOJGOZ2vNtOAHr+on BkVHc8257mPA3QRHf2HEQjtb/tkwMt429+iJoJD5MR3lJeQ6iv1pQ5k9eNPRe5UpnghL Q1xmejsbGtD0Tr4EkM3XwaIacppNG/dDsuyDGS0Oacka2rR4H2UMyxcrvzjOm2phKHzo XTuPrfCkY3ZU2RvW5xZYfi/TmlvEm67PzDcHrDuC36TjoZoCb3skLDWRG+yAGmwhQFkx oycw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=otiHr0bh; 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=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nc24-20020a1709071c1800b006df7a784b52si7175857ejc.508.2022.04.18.07.47.04; Mon, 18 Apr 2022 07:47:27 -0700 (PDT) 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=@gmail.com header.s=20210112 header.b=otiHr0bh; 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=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236404AbiDRK5z (ORCPT + 99 others); Mon, 18 Apr 2022 06:57:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231597AbiDRK5y (ORCPT ); Mon, 18 Apr 2022 06:57:54 -0400 Received: from mail-qk1-x731.google.com (mail-qk1-x731.google.com [IPv6:2607:f8b0:4864:20::731]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E86E915FEF; Mon, 18 Apr 2022 03:55:15 -0700 (PDT) Received: by mail-qk1-x731.google.com with SMTP id q75so2211736qke.6; Mon, 18 Apr 2022 03:55:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=mJYathoFEIzfoBsN3XEQLNGQPaiEyKTpa9HUFEQqI7g=; b=otiHr0bhsPiEU8mmgnUvrKkI2Hme7D0hd1f1xUpHNTxAtDGxbXw9qmpRIQM6ZHTWe5 NIHfSibH1l72sCyeyrbuauPKdGlrlNA8FnuLZ66avEHTeGDchDF8A7qq701Js0eX6wio /vNqY5mmF7uugqodylWVPUwWcxxPkdMTo/CMOAkNzQAB9wG+chcbUaUnSzr3awWtnsHk yU/wYJx6EEUNHF9MadCIfmp1nfv7+9ZUOcfv8qlGqGP3KXYD6855+yrEAN0j8MbwB9oY ZdMgcLn7RLOc8R7f0AIpFLRoWErnEG3YKu8jXNx27x/1LQ8NTQms4mc8NNP1lPCV4NAE Oi2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=mJYathoFEIzfoBsN3XEQLNGQPaiEyKTpa9HUFEQqI7g=; b=x/RIdtHsJ8COIPQDLyd9KPpcgYprtWfJ8mndYBwz2lq2++fGR/ZFI9zMmRDjVS24Nz EPxTgkXT6T/dTH1O8rccxbMudK5Zc5VKZEuCo4kBB6SzBauOvTY5hR/xg03GuyoK9dw4 qDgwmcWz0910qM7lGP/wAss2kPNlw9Z+iUX3I3UE6u+j+JfLdzek/tPfWG9fV8fdvoNF Zd9VJmLPe1q4DeWVhXThXiOGIDKwryTpOwau9UywV7zJEEKCwrzcb2CBq+vteml8ijYO 5BAetMT10U9Rk3JLC1xJhIUvW8gL2jnZbHCTNKD/ksKjwj9VI0F5FAEXyB35fkFXqUQU GHag== X-Gm-Message-State: AOAM531jqgbdcRg4C5VlnHYjVBeS2cqIcnxLPplK7tDjuLrtHjGWon87 o/iqZ1HatpynUhN1wVJeMlPWxakmj4I= X-Received: by 2002:a05:620a:2415:b0:69e:784d:3a4c with SMTP id d21-20020a05620a241500b0069e784d3a4cmr5166230qkn.14.1650279315087; Mon, 18 Apr 2022 03:55:15 -0700 (PDT) Received: from localhost.localdomain ([193.203.214.57]) by smtp.gmail.com with ESMTPSA id d126-20020a37b484000000b0067e60283d08sm6287438qkf.40.2022.04.18.03.55.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Apr 2022 03:55:14 -0700 (PDT) From: cgel.zte@gmail.com X-Google-Original-From: chi.minghao@zte.com.cn To: ohad@wizery.com Cc: bjorn.andersson@linaro.org, linux-omap@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, Minghao Chi , Zeal Robot Subject: [PATCH] hwspinlock: using pm_runtime_resume_and_get instead of pm_runtime_get_sync Date: Mon, 18 Apr 2022 10:55:08 +0000 Message-Id: <20220418105508.2558696-1-chi.minghao@zte.com.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 From: Minghao Chi Using pm_runtime_resume_and_get is more appropriate for simplifing code Reported-by: Zeal Robot Signed-off-by: Minghao Chi --- drivers/hwspinlock/omap_hwspinlock.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/hwspinlock/omap_hwspinlock.c b/drivers/hwspinlock/omap_hwspinlock.c index 33eeff94fc2a..1fb3a2550e29 100644 --- a/drivers/hwspinlock/omap_hwspinlock.c +++ b/drivers/hwspinlock/omap_hwspinlock.c @@ -94,11 +94,9 @@ static int omap_hwspinlock_probe(struct platform_device *pdev) * the module SYSSTATUS register */ pm_runtime_enable(&pdev->dev); - ret = pm_runtime_get_sync(&pdev->dev); - if (ret < 0) { - pm_runtime_put_noidle(&pdev->dev); + ret = pm_runtime_resume_and_get(&pdev->dev); + if (ret < 0) goto runtime_err; - } /* Determine number of locks */ i = readl(io_base + SYSSTATUS_OFFSET); -- 2.25.1