From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 85448C25B06 for ; Sun, 14 Aug 2022 10:15:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4BEx3/O7AvOaVxBnolUysyo6ArkDe5wm8W7AfCQ5AW0=; b=n26tPqKXb1zTAy qkn/tIjtFO9YvfsCrnrku0zr7DwFhJYK8wBaKqPWHOs5MjDcWhi5QNbtGw7N+//KmTxjooX9ageXs j0AlUl0pejuHJN0L1o+ggr1wgSAcneO5LtU8OlyPNn6sfIWb1fKa6Eui7Xq/yERCcPv0DBCxRCxgZ 2QCVzXsI/q3Bb4U39yN8sEPNxUwl8M3d6ChZXHx28HHKr5xAdb/pDj55eha4BdlG8euCG5Mva5a/U Pud/csaVz9ZBb+8Prh/gVdazlr2hcKlarKh7JWit50ou28AcBpEN5oGRivsFUvbbj5puHuBv5a7HC 5/F8cCHXcoLN2fYRh4Xw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oNAd4-005jRH-Sf; Sun, 14 Aug 2022 10:13:59 +0000 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oNAd1-005jOI-Re for linux-arm-kernel@lists.infradead.org; Sun, 14 Aug 2022 10:13:57 +0000 Received: by mail-ed1-x52c.google.com with SMTP id b96so6389660edf.0 for ; Sun, 14 Aug 2022 03:13:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=s2xCRCS5m4i4+EfBqMdOEQInaq/ShuXp1FW8bVckG40=; b=WAX9jpeTuNWjlK8hqNNxEsbMZ7M3aD+MgDj/BVKuUiGwTEAG17A1knJU8BBwA4hJLI /HAobNHHkFzxsZDlBjIj+o+3o/+6iXtKmwc4xnaXjaDOY912JF8twRccony2QhKgvpfW TcyGggtlXvNwPPIoSkb9Lt9CIi6oNAHS3KlNenppEF7SnhcoEnZBDDQhFLgLWXfvP3At Yl4REhB2gt4ghQ67RDOKrPaGLyt+LOAcuXAsF+P+cbJo7vI3lVKl9iu7p857sQEhgSZn PfRVlFm+SkktqecyYSYVmEej1B8TBwHPv0SHJjpB3R9xoBcQMFRfxWnOlbgMhqYakwnF dnmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=s2xCRCS5m4i4+EfBqMdOEQInaq/ShuXp1FW8bVckG40=; b=zeSnm8ujkH6J4rSxWCsdTS6SnuWZFv2FaoIszVw6xSkB20kuBgTE8UoMRokEF42J2t yJKaPxsZ0tSygYsFPMSNCZ7xBmEBGv1d7MKGpIwgPu7jrQg1d3BpJ9s5/Nhs1ejjLdK4 6K3MlMwhC6960xRb3s23wi+btGRgoJpJ60USthDorwDO275ErX+s8ocLCUipxXXdSscQ KP6utmrM4il2ysKqA6Ct5t0Aftbu5Bwi9ivgyv2I9GyHz3cstDn4rD8BaygpYRycxzIz r5Lr86lBbKdJ94HPexwUyTFW7NO7ExVc0B/qu2Y0CTyv5GoCJLR4Dxm8wNPlraEwkjwa 2Paw== X-Gm-Message-State: ACgBeo1cLQ6QQI8Gik5/cG/9leAB5FvTmGZARZ8NERD2JVLSZndPoybr /UrgXdC3ZUARdmxxCY+3ZHFtXahALn3tZQ== X-Google-Smtp-Source: AA6agR42k51Lq8Yp/MP5cdbyrsfugOi+nLPScpkpXy8R/epCeq6yMXoPKsS9t/LJLtkE6kyFkTmLCQ== X-Received: by 2002:a05:6402:331f:b0:43d:931c:6945 with SMTP id e31-20020a056402331f00b0043d931c6945mr10280751eda.199.1660472033733; Sun, 14 Aug 2022 03:13:53 -0700 (PDT) Received: from jernej-laptop.localnet (89-212-118-115.static.t-2.net. [89.212.118.115]) by smtp.gmail.com with ESMTPSA id c18-20020a056402121200b0043cc2c9f5adsm4496602edw.40.2022.08.14.03.13.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Aug 2022 03:13:53 -0700 (PDT) From: Jernej =?utf-8?B?xaBrcmFiZWM=?= To: linux-kernel@vger.kernel.org, cgel.zte@gmail.com Cc: linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, ye xingchen , Zeal Robot Subject: Re: [PATCH linux-next] crypto: sun8i-ce:using the pm_runtime_resume_and_get to simplify the code Date: Sun, 14 Aug 2022 12:13:52 +0200 Message-ID: <8140378.NyiUUSuA9g@jernej-laptop> In-Reply-To: <20220802074820.1648786-1-ye.xingchen@zte.com.cn> References: <20220802074820.1648786-1-ye.xingchen@zte.com.cn> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220814_031355_932177_94C82772 X-CRM114-Status: GOOD ( 14.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Dne torek, 02. avgust 2022 ob 09:48:20 CEST je cgel.zte@gmail.com napisal(a): > From: ye xingchen > > Using pm_runtime_resume_and_get() to instade of pm_runtime_get_sync > and pm_runtime_put_noidle. > > Reported-by: Zeal Robot > Signed-off-by: ye xingchen > --- > drivers/crypto/allwinner/sun8i-ce/sun8i-ce-trng.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-trng.c > b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-trng.c index > 19cd2e52f89d..ef9cfc61af32 100644 > --- a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-trng.c > +++ b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-trng.c > @@ -54,9 +54,8 @@ static int sun8i_ce_trng_read(struct hwrng *rng, void > *data, size_t max, bool wa goto err_dst; > } > > - err = pm_runtime_get_sync(ce->dev); > + err = pm_runtime_resume_and_get(ce->dev); > if (err < 0) { > - pm_runtime_put_noidle(ce->dev); > goto err_pm; > } You should also remove braces, since there is only one line left. With that fixed: Acked-by: Jernej Skrabec Best regards, Jernej _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel