Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp766398pxy; Wed, 28 Apr 2021 13:51:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx13Ad7puXoSBpu7mSGkMih6NyMmfJkin29NzlLutJwb/j2SOx0F0f3NHH0dU4gI8nFRPG/ X-Received: by 2002:a05:6402:270c:: with SMTP id y12mr14168265edd.284.1619643079476; Wed, 28 Apr 2021 13:51:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619643079; cv=none; d=google.com; s=arc-20160816; b=fnn7OsDzppBQyUe9YoQyAaYHH2ATE5+r87JtVsJkGCREOSPmOOxWOZdvw9hvIVlXpD JLYnALR1WZCAxCZQFRrBObtXiszL3DAhlC2WpP+coYi/Vmkhpzof8kFt/NKQ7a6DxfzC +IEBG+ONQa5PUd/fNIsM9KdxxBb+H0dH8Ex39FN++RW0BnclAWysN1k3ZqLzVV+0KOQl J2cAnQJhqwsrbGTIqK+dslgWbvwc1pv+nN36Ad2PwXstCD+Oxqad0lekaxjNtSSL+6lv jf4l0raryhGnLF7IYzLB3TkMDPxrd4pL/lsajX9kUKm3npQ7r+NSrNpOTtqXl4cjiU6Q nRwQ== 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 :user-agent:organization:references:in-reply-to:date:cc:to:from :subject:message-id; bh=nnUWswK9/uEZvQi7Bvq3hnY4+retTlAmSA7Daw142P8=; b=OQApzQyohUXSMhfm3Cz/2kz648d7s/ogD0ACvdZtNbYU+zjljV4C0fYyy0xuPtV1b/ syTTmIAS/TYEp5VHUZ/CJKSSUU2+x+0V+Jpb4hGTL1OtP5xjHuajk5CM2nOCnx/4l/lu Yxsh02JpTMBs4cFIAtg0JaRJbyb9+K+nqiluI/dl6xZsFeSYtN8VBvpMGLLVjzWOFYZO V/phYylEzd7o6mcQ1I8pQFT7aSVgF2Q0AwTDvy6QrBXEHH/ktR8p6s73XyTskbO5lLWw jiBjzki7EXFwXKLVdS0QcRNJe6H0vmTZZvvS3e6U9U3rXvr5BkzpGKD8EZ6IOi++LBRz 8mlg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 20si1012053ejy.225.2021.04.28.13.50.56; Wed, 28 Apr 2021 13:51:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241509AbhD1RKg (ORCPT + 99 others); Wed, 28 Apr 2021 13:10:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241483AbhD1RKf (ORCPT ); Wed, 28 Apr 2021 13:10:35 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8AA7FC061573; Wed, 28 Apr 2021 10:09:50 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: ezequiel) with ESMTPSA id 986DE1F42B77 Message-ID: Subject: Re: [PATCH 70/78] media: rga-buf: use pm_runtime_resume_and_get() From: Ezequiel Garcia To: Mauro Carvalho Chehab Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Heiko Stuebner , Jacob Chen , Mauro Carvalho Chehab , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org Date: Wed, 28 Apr 2021 14:09:40 -0300 In-Reply-To: References: Organization: Collabora Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.2-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 2021-04-24 at 08:45 +0200, Mauro Carvalho Chehab wrote: > Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") > added pm_runtime_resume_and_get() in order to automatically handle > dev->power.usage_count decrement on errors. > > Use the new API, in order to cleanup the error check logic. > > Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Ezequiel Garcia Thanks, > --- >  drivers/media/platform/rockchip/rga/rga-buf.c | 3 +-- >  1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/media/platform/rockchip/rga/rga-buf.c b/drivers/media/platform/rockchip/rga/rga-buf.c > index bf9a75b75083..81508ed5abf3 100644 > --- a/drivers/media/platform/rockchip/rga/rga-buf.c > +++ b/drivers/media/platform/rockchip/rga/rga-buf.c > @@ -79,9 +79,8 @@ static int rga_buf_start_streaming(struct vb2_queue *q, unsigned int count) >         struct rockchip_rga *rga = ctx->rga; >         int ret; >   > -       ret = pm_runtime_get_sync(rga->dev); > +       ret = pm_runtime_resume_and_get(rga->dev); >         if (ret < 0) { > -               pm_runtime_put_noidle(rga->dev); >                 rga_buf_return_buffers(q, VB2_BUF_STATE_QUEUED); >                 return ret; >         }