Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp4315987ybg; Mon, 8 Jun 2020 04:57:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx9t4NFOvtrUDwkCBJN82t7RhCsbRckc6TV2Sued24XJ+7M6V/7TR1r8GOC+f/x1tJjfoGn X-Received: by 2002:a17:906:68ca:: with SMTP id y10mr13245072ejr.322.1591617459231; Mon, 08 Jun 2020 04:57:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591617459; cv=none; d=google.com; s=arc-20160816; b=SfqGBWN1dSit8ACQ3op2Yh0mORuajQt7juRYosAZIkvCrAe1Vo6CTjmgWG9x5v27R8 EUlyjuLaey8ifg0PujDBkGgPaTQsgsFPLJNQG4DUFfq7CNgelbD8a2kwZCWRTvaKDMaw P0y6lLhXxhYcBXQFeGO2DhLi57JdPkAI1s0L9QpI/6Oor3yVb4SvaPVKfI8Rga8S9vJJ mhQ1mAFkWKK+s940rdVASs9qFSQgMQiEehLtp5V3z+rsV4C0V9GICrSLjhC6LPmyM/gf 7ZC0AaTTdRwhnzw/ix9cck4FMprJgnb4w5qhdIdMX3cSdKc2X3Zp6+99JPoAGqf1shN9 ddkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=EY3HDhb9/7kV9gEQAk77o2IQeTd9Eo/9aUwODCqZUPs=; b=c6tIxqo8BoQmyRzQpEWArtS2mIbb1AM0hChB1nqCOXRYerXfv6eVs5h0oUb87FLrYD w3TuEcM0ObUOfWeIsb+tmBuhsCd559sCgqQciP92elybY2rLh0dfmQVDtewyKmgnXlcc KU8xH8tfDsdkLGhTEVt0wuODfhfjXH8fGkHHSi0N0JZaOG5LUwaA8sCj7+o1xFheBK7K s3J41SCFmOTtFWXU4a0J0pkVkoupERilZGP6FEEB1QolBMjbJJL2kOLmPJ/c95WKg/MC PPKe0HQ6NKh+cA6LC6HKoT6JT02GZLE5i6dc6xwKb+x1jRWDgn2lmvmFndc+KlNy/4bc 9nBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=HVQV+piK; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a2si8836412edl.517.2020.06.08.04.57.16; Mon, 08 Jun 2020 04:57:39 -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; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=HVQV+piK; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729709AbgFHLzV (ORCPT + 99 others); Mon, 8 Jun 2020 07:55:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729615AbgFHLzU (ORCPT ); Mon, 8 Jun 2020 07:55:20 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F27BC08C5C2; Mon, 8 Jun 2020 04:55:20 -0700 (PDT) Received: from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 2D0552C9; Mon, 8 Jun 2020 13:55:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1591617316; bh=1lj9FjuIipvGhcLtMC0uXaiiiMBYwOb9zRyCfR/27uw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HVQV+piKImt3IAI21N+NZKvdaNsADGQJ+OggKy6Jw8hF7GqRPeVVf0qvY+xkmGyVk FKKKJOmGaL1i8VAo+4W9PwJAresMPWF+jlCS9aV6Yr6gYpmton4jniCarYAPsZ7RqG +WfvBKQBuBT5CYAt4oYcM3LgCLTobKLnkjW6TO38= Date: Mon, 8 Jun 2020 14:54:57 +0300 From: Laurent Pinchart To: Geert Uytterhoeven Cc: dinghao.liu@zju.edu.cn, Kangjie Lu , Kieran Bingham , Mauro Carvalho Chehab , Linux Media Mailing List , Linux-Renesas , Linux Kernel Mailing List Subject: Re: Re: [PATCH] media: vsp1: Fix runtime PM imbalance in vsp1_probe Message-ID: <20200608115457.GA5896@pendragon.ideasonboard.com> References: <20200523115426.19285-1-dinghao.liu@zju.edu.cn> <20200608015456.GJ22208@pendragon.ideasonboard.com> <20200608015753.GK22208@pendragon.ideasonboard.com> <7b79863f.f636d.17291e1ff94.Coremail.dinghao.liu@zju.edu.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Geert, On Mon, Jun 08, 2020 at 09:39:51AM +0200, Geert Uytterhoeven wrote: > Hi Dinghao, > > On Mon, Jun 8, 2020 at 5:03 AM wrote: > > > > I wonder how many bugs we have today, and how many bugs will keep > > > > appearing in the future, due to this historical design mistake :-( > > > > Good question. It's hard to say if this is a design mistake (some use > > of this API does not check its return value and expects it always to > > increment the usage counter). But it does make developers misuse it easier. > > On Renesas SoCs, I believe these can only fail if there's something > seriously wrong, which means the system could never have gotten this far > in the boot sequence anyway. That's why I tend not to check the result > of pm_runtime_get_sync() at all (on drivers for Renesas SoCs). There are lots of return paths from rpm_resume() that return an error, more than just rpm_callback(). Do you consider that none of them are valid errors that drivers need to handle ? -- Regards, Laurent Pinchart