Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp1089364pxb; Fri, 22 Apr 2022 19:15:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxG/7GmYnRIscPyyKAaPDGDRG9lQ5K3a348e4SJohwOfRf/A14w8jv0mYlXR9Z/fzXP4dfM X-Received: by 2002:aa7:8094:0:b0:505:b544:d1ca with SMTP id v20-20020aa78094000000b00505b544d1camr7962858pff.26.1650680106634; Fri, 22 Apr 2022 19:15:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650680106; cv=none; d=google.com; s=arc-20160816; b=FZL5g5PklaaBfJW6D/U3LLyk4b8mBa1UG2MQot08UFCZc4yrtrsOQQeS0QsPWz7Tlp m8NO7gUCr/iW5h7hwXAFRcrRhS1c34dzfBzfEpROMtbwr7bRA48zeDDY05w2MX1RutLt elaqo5ern7Id3Ad5FJS0be4wBJGiPKgx2q4CwwwYmbZnNMraFZk4yZxrXFF2yeUO6Q3F 7/ROPmi/TSaZ/7KfUla4HrjiRsxpTrAmAVJ5Z6V4NxRpLPxowdXLO4agLSSA92nJtrUs vLXs9b0Pi6LSAwsVIxcwfAoOPWV49QXG8FNY/PRsYhy8TSfkduKHFLCL+vAcq/z61L6r Y4OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:user-agent:date:to:cc:from:subject :references:in-reply-to:content-transfer-encoding:mime-version :dkim-signature; bh=MUbzwIKeIDIbthjzSiVlE8aiuMB6U9nO4D5SYkmu++M=; b=SgM3LGlmSE/w6WSm+YaEYx7UA5o5yiY1giFhxGfJZ7Q6OlWwjF7tMdn9dezcloyh3i rsG+GQJih4GZcHqWWuffNmDIWqYDfvAgrlkelac6gTMdFcJblK6qxfhOP27znRtF1x0t 04lCsPDDE2N+7S4zcF1Pxxuna1uF02KgkE/nxfnWCSP0iK2phr0ojD/0dKuyxswjXm1r RtLK9ewj1T4jcDKf267nl2NBiQiLJvg+KqGjGVcrSIFuD0SbOwz3LlVemM/zp3OpbxU+ ZAULmeY7k5X8zSMxST9ehY+oJ1b2BxXxCx+w+QGqMCVpoL+3lwr2HdWiDtexhXreeE7F V+pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=S5RTchA+; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b10-20020a631b4a000000b0039f79dbe674si10079745pgm.309.2022.04.22.19.14.50; Fri, 22 Apr 2022 19:15:06 -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=@kernel.org header.s=k20201202 header.b=S5RTchA+; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231737AbiDWCFR (ORCPT + 99 others); Fri, 22 Apr 2022 22:05:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229681AbiDWCFQ (ORCPT ); Fri, 22 Apr 2022 22:05:16 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6DA09BB9; Fri, 22 Apr 2022 19:02:21 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id EC058B8321B; Sat, 23 Apr 2022 02:02:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8DCE5C385A0; Sat, 23 Apr 2022 02:02:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1650679338; bh=fXgFLAhzN5Q2JTBE1pkW4tLPG1dPXt9eK/EpN+mHbbA=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=S5RTchA+DHkFfl58qbTiHwUByXGgnq6Wa5EAIGROkk/bupzj5Tny5lVMvncPDhtP6 AExYXaDZwjZWgc1e+6vh+dUMFWvo/l6X03XEwnpOpHexiyelokt9W+h6ul7SbemnOE 1d65O58+LZQfbrjN5BNjPXzQcs4zetl8jBsYl/6k5CSv9qaUCo27tel5qohNI3hT7s 9Y+6gNt/TexCDz76qSV5b1iPkpEq8HnoVVgqf203AOWYRi/bG4uWIjCD8Ote74hGWL J1uI1xFPpBEtDxqB9fEt6ndCcE0jz0XLFz7FkUuVuSOH00JyRsqoj5CYRto4ECS50C 6pph+X8jqMNgQ== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20220418110455.2559264-1-chi.minghao@zte.com.cn> References: <20220418110455.2559264-1-chi.minghao@zte.com.cn> Subject: Re: [PATCH] clk: using pm_runtime_resume_and_get instead of pm_runtime_get_sync From: Stephen Boyd Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Minghao Chi , Zeal Robot To: cgel.zte@gmail.com, mturquette@baylibre.com Date: Fri, 22 Apr 2022 19:02:16 -0700 User-Agent: alot/0.10 Message-Id: <20220423020218.8DCE5C385A0@smtp.kernel.org> X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 Quoting cgel.zte@gmail.com (2022-04-18 04:04:55) > From: Minghao Chi >=20 > Using pm_runtime_resume_and_get is more appropriate > for simplifing code >=20 > Reported-by: Zeal Robot > Signed-off-by: Minghao Chi > --- > drivers/clk/clk.c | 8 ++------ > 1 file changed, 2 insertions(+), 6 deletions(-) >=20 > diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c > index ed119182aa1b..544e940bf40b 100644 > --- a/drivers/clk/clk.c > +++ b/drivers/clk/clk.c > @@ -113,12 +113,8 @@ static int clk_pm_runtime_get(struct clk_core *core) > if (!core->rpm_enabled) > return 0; > =20 > - ret =3D pm_runtime_get_sync(core->dev); > - if (ret < 0) { > - pm_runtime_put_noidle(core->dev); > - return ret; > - } > - return 0; > + ret =3D pm_runtime_resume_and_get(core->dev); > + return ret; return pm_runtime_resume_and_get() ? I got it.