Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp620904pxy; Thu, 22 Apr 2021 09:31:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHR1TrJGWa+NytGdZ7Th0aHo6GmUvTO9rybOu1xBjAhuHu+dIec1RZ2CfzVN/f26bBY8sR X-Received: by 2002:a17:90b:3649:: with SMTP id nh9mr4807661pjb.0.1619109111948; Thu, 22 Apr 2021 09:31:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619109111; cv=none; d=google.com; s=arc-20160816; b=N7N/B/oPZO8FVFbmKkO7Bm1fIB0brCnbBg4ZaALpWFF7YxWAudDt24jt8tE70p2RzU z417mqlAslEOPSBW9RHn1X1icnBREpI3XY0LdA4ugyL1iSLwXNIdYp2CdlZKayQ2d55A 7VsBK1OS0KV7/7tEm9SFXtQqud1OeENmi2qJEue6R1fTiDB1ME8yHUa3E+7YGPHxTTp8 N2iVwPGIlkAjKtydg0iz6p6IQpJDqRI4/urUZziv1rroYBWb0UThqfvmf/8Tn/XpGerN k4CMh0E5GWqnT31F0vCAI/Uaur9CDCCMp/brTrtImdvXaSpa4cyBf3EU5SQ6SAJXbTQJ sqKA== 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=ppnGNxh0eFn8x7BCY1HCM1XkgXlS39iBEur/NFl3YdQ=; b=MEQ4FzWyHyS119O52GnJKcNibQpPCboRZE/sV5IC+vD85uEnFqDaQAM2PD+bapDVI4 9xlmJalVtjb+TLKRdnMWbj4WTJ//v2ze+5JzPM3Vxeiig5SsPlLMgLeqqLHG4X1ebL8t PtFO275srkQjYHUZMcuIF1S0C6A/sUHhVhLVscpmaytiEbke8dcgXSNSNtE/vrd6tFxF TsxkTGT8YjbwRSZOvsBrLjKZ3Y0Xw+Tp1ChJrLFWrAZC+EOw/MqEo4oPwfOnRv+rQ8x0 AJxNPfOqPyCfPQXtm7iG6n5IRzlH/FCkxl7MpmxoZOhKx2sIDFxoK0Wzm7QNm4T3iqez tbug== 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 a8si3338091pff.67.2021.04.22.09.31.31; Thu, 22 Apr 2021 09:31:51 -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 S236357AbhDVQb7 (ORCPT + 99 others); Thu, 22 Apr 2021 12:31:59 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:43004 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236333AbhDVQb6 (ORCPT ); Thu, 22 Apr 2021 12:31:58 -0400 Received: from mail-wr1-f69.google.com ([209.85.221.69]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lZcEd-0002xP-3F for linux-crypto@vger.kernel.org; Thu, 22 Apr 2021 16:31:23 +0000 Received: by mail-wr1-f69.google.com with SMTP id s7-20020adfc5470000b0290106eef17cbdso10597735wrf.11 for ; Thu, 22 Apr 2021 09:31:23 -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=ppnGNxh0eFn8x7BCY1HCM1XkgXlS39iBEur/NFl3YdQ=; b=VdntrgaDp4OMXsRBLHIBQ2nlfSSL+IPRv/FROAlsbmC+uCo8HH0t2sw1Rpr6+9kRZJ S0PbLWPixpgjDJqM8Qbw3kHhXXDfPPzKehSK970br/EdpTiLae/0dZ1Zlf4cSMA8k7zZ RnfMgarAVKPUSIX+NSR3oS0ew0bUwdqvyTrBkYMOaZ1k2GM83qmveC+8r8SRPONjR7XY Rst4344VWF/QNkMbClmO0cE8fHw5mRJRuoqdG3+pFx5R6Jx/NlgwEpjCKvlTCuEfgqgN HxEyMwtwzVsyA5icg/yV9TbAvDkAlSvlvszsvK5LsJbeCLNjcH8uP2TpwPxqLxB79tjS neeg== X-Gm-Message-State: AOAM533Ht7mxZsffFAUNixY81M9sIzmqb2hAbBk2XzoExX9aCxleth0r 6QiItc/PgxXIXyG/oXL1WzJw2A2amI4MXamPmfFwj4arsi6tx0gEjm2hgA3IFgFdEHyEZdRK5Wh jmYabedYqm8EMyKQNbdrSYkTVNZaqTrt8qIPGJ6/kXQ== X-Received: by 2002:adf:f742:: with SMTP id z2mr5238198wrp.82.1619109082869; Thu, 22 Apr 2021 09:31:22 -0700 (PDT) X-Received: by 2002:adf:f742:: with SMTP id z2mr5238180wrp.82.1619109082726; Thu, 22 Apr 2021 09:31:22 -0700 (PDT) Received: from [192.168.1.115] (xdsl-188-155-180-75.adslplus.ch. [188.155.180.75]) by smtp.gmail.com with ESMTPSA id g12sm4569107wru.47.2021.04.22.09.31.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 22 Apr 2021 09:31:22 -0700 (PDT) Subject: Re: [PATCH v2] hwrng: exynos - Fix runtime PM imbalance on error To: =?UTF-8?Q?=c5=81ukasz_Stelmach?= Cc: Matt Mackall , Herbert Xu , linux-samsung-soc@vger.kernel.org, linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, =?UTF-8?Q?Bart=c5=82omiej_=c5=bbolnierkiewicz?= , Marek Szyprowski References: From: Krzysztof Kozlowski Message-ID: Date: Thu, 22 Apr 2021 18:31:21 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On 22/04/2021 13:22, Łukasz Stelmach wrote: > It was <2021-04-22 czw 12:46>, when Krzysztof Kozlowski wrote: >> On 22/04/2021 12:41, Łukasz Stelmach wrote: >>> pm_runtime_get_sync() increments the runtime PM usage counter even >>> the call returns an error code. Thus a pairing decrement is needed >>> on the error handling path to keep the counter balanced. >> >> It's exactly the same as Dinghao's patch: >> https://lore.kernel.org/linux-samsung-soc/20200522011659.26727-1-dinghao.liu@zju.edu.cn/ >> which you reviewed. It has even the same commit msg >> (although it's difficult to be creative here). >> >> I think it's better to resend his patch instead. > > It isn't the same because it uses pm_runtime_put_noidle() as discussed > here[1], applied here[2] and advised here[2]. Dinghao didn't prepare > v3[4] for exynos. Thanks, makes sense but then I would prefer Marek's approach of pm_runtime_resume_and_get(). Best regards, Krzysztof