Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1047973pxj; Fri, 21 May 2021 05:23:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHRaq1OpYXbw7TlAKSCMSzH+o1p0tGnu4jjph2oiDq4vP7CIFshHJgK6QbLASrPHHSxQ2i X-Received: by 2002:a02:8787:: with SMTP id t7mr3963336jai.53.1621599835417; Fri, 21 May 2021 05:23:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621599835; cv=none; d=google.com; s=arc-20160816; b=qmVyp/kUV8r2LjpxvxswJTWrKtJDeIETfQR0FvhJF5Qrko3WhGsFhMVawti4g6XVe3 BMXl19kgrVOeu+wywkm/rVH0ihl0LedypR4zDX8iRsEfESzjgMATIms0K7T1w5SzF0Bb xogLRpN+T3O38ceaTbujcB2rKFkx1WD3rHkAyOCkwcISx7mfsYotlH/S4J5DOR9RCVY2 GFvkIYk62X4zOzbqeFgO0QvDP2BDkD0qwo7iNieBC9M+9eKVMbEa8ZRP2z9542RnnvDG S2i2bdo4PpG1e+66ugE25l+7TRUC1z/wYQhWt8P89y9U77kD5G58f8KDoYRxnA4EXjAy Hb7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=x9QeAuKPtkUv6ZpvmdpqQaHgtAYj6ktz1zWOx4dEWL0=; b=b6cZOxdgiKKz17gYod5iN+tIQxaxI0CYyQROURegpSuH887zwggFbYBZm6tv5ulPE/ XfkgkvvTeNW+fbpqh/NUBgK8/ZkUB/BpI2hfR354guOoISuUJNmI/t4fhuxpKoThQmqg 4pia7XWnPXfDK12MIWDXQbDAtAiyQc7iNKfc2MN8+GTUHYb4IgIXx9ovfZezEixE2ffA Iw70mqtgYayDztSxOKwznfMrdTl4xgb8TZp7ZCM2HyVTQffU0FHmy71zAeohkkvA1HrD TqAq3dQCKiPYbvpBeotGSJe7g2+xYWwOvRbchbjpouwNMX2hzhcwGXfiXTi6n+iyYO9v k4ig== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l11si5678670jak.61.2021.05.21.05.23.23; Fri, 21 May 2021 05:23:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230504AbhEULZc (ORCPT + 99 others); Fri, 21 May 2021 07:25:32 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:41938 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230119AbhEULZc (ORCPT ); Fri, 21 May 2021 07:25:32 -0400 Received: from mail-vk1-f199.google.com ([209.85.221.199]) by youngberry.canonical.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1lk3GC-0004Yk-Vn for linux-crypto@vger.kernel.org; Fri, 21 May 2021 11:24:09 +0000 Received: by mail-vk1-f199.google.com with SMTP id w127-20020a1f62850000b0290200994bf3c9so1027428vkb.13 for ; Fri, 21 May 2021 04:24:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=x9QeAuKPtkUv6ZpvmdpqQaHgtAYj6ktz1zWOx4dEWL0=; b=TEsz4EjDPdkeA5rsank362NgxtOFXKlfUVhuXN8IxnEuf28S8zUBXXH0s/b3Sv9rgk fw2SkP3oCIaUYhpaheZg+R5AE1pPDodEYXrnYVKDfvIClvM/6sdwADzUTHxlvYmynqqd 96kfgbThWfUxhGOf3A2XCmTqMv08Qkn2hgaXh/QGYcY7SwSNnuUnzotUSHQxFUJbGw68 dSzHhVbX/nMvPGIOlppcwhTmyEdA9rBtssCzY+0UJl6xJTfyS+/jODHQyRAWUVpPPTM/ +smRkym2p2wpkf2rVYe90KULerJ+zrxt1hsDzitok1SNm36gIGSJ7/exhCU1z6RpNVYm Ybpw== X-Gm-Message-State: AOAM532+ChERvz7NNHetLRezTbXndZt0UjDecZxCBhnMaOXSzHxwlFni MIEGq558mX9uEIqPqcdyNruVNmhPiFCCeDuoY82AHFq5OrYW4/AMVFERDFoyBgR3oGTMpeL/WQ8 nqzyayFG+SgaSX7OI9AfBYC4/vJbibqIiAwFekMgFIg== X-Received: by 2002:a67:f702:: with SMTP id m2mr10248178vso.40.1621596247800; Fri, 21 May 2021 04:24:07 -0700 (PDT) X-Received: by 2002:a67:f702:: with SMTP id m2mr10248173vso.40.1621596247673; Fri, 21 May 2021 04:24:07 -0700 (PDT) Received: from [192.168.1.4] ([45.237.48.2]) by smtp.gmail.com with ESMTPSA id t18sm896471vke.3.2021.05.21.04.24.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 21 May 2021 04:24:07 -0700 (PDT) Subject: Re: [PATCH] hwrng: exynos: Use pm_runtime_resume_and_get() to replace open coding To: Tian Tao , l.stelmach@samsung.com Cc: linux-samsung-soc@vger.kernel.org, linux-crypto@vger.kernel.org References: <1621569489-20554-1-git-send-email-tiantao6@hisilicon.com> From: Krzysztof Kozlowski Message-ID: Date: Fri, 21 May 2021 07:24:05 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <1621569489-20554-1-git-send-email-tiantao6@hisilicon.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On 20/05/2021 23:58, Tian Tao wrote: > use pm_runtime_resume_and_get() to replace pm_runtime_get_sync and > pm_runtime_put_noidle. this change is just to simplify the code, no > actual functional changes. > > Signed-off-by: Tian Tao > --- > drivers/char/hw_random/exynos-trng.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/char/hw_random/exynos-trng.c b/drivers/char/hw_random/exynos-trng.c > index 8e1fe3f..d71ef3c 100644 > --- a/drivers/char/hw_random/exynos-trng.c > +++ b/drivers/char/hw_random/exynos-trng.c > @@ -196,10 +196,9 @@ static int __maybe_unused exynos_trng_resume(struct device *dev) > { > int ret; > > - ret = pm_runtime_get_sync(dev); > - if (ret < 0) { > + ret = pm_runtime_resume_and_get(dev); > + if (ret) { > dev_err(dev, "Could not get runtime PM.\n"); > - pm_runtime_put_noidle(dev); > return ret; Reviewed-by: Krzysztof Kozlowski Best regards, Krzysztof