Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp4177835ybg; Mon, 8 Jun 2020 00:42:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLyAJV7f/n4JU8aBedXKNmHuHPdWHN+pR7YowACKaSi4PlS05JUXYVf+KsKchBa+mAvPzh X-Received: by 2002:a17:906:3b0f:: with SMTP id g15mr11811098ejf.363.1591602157669; Mon, 08 Jun 2020 00:42:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591602157; cv=none; d=google.com; s=arc-20160816; b=qg1mx5rCH56kpO4L+KBvMobJWluCv27TQG4oFxnI3E54NE+UsNtiMZG3x3CkT4EoBe NR+qBdSx2gjF9XtV1TplRgfhsqbcflzyFex/3CA6UwH3iDA429IE0z4tTC45J7J2bOcy 1uRq+SKGVce+A5jOYyR6IFJeZ3lAldZzEaPnANYsNNU6iXFHJ9mmuxWQ8xMV0aEuiWbv 1meUtmPT3AoY9Y0lPFH+rJ3dn3MA546YRFf7o1zKCz670i6uFVwB38rMRU0di92c2b2Q ONPCAExyykNB91WxuATwQMtcjLGZvuUnn3ms1lYLyOnOvTFBF7XDX+dJoIyG7LmDsGL5 Ejfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=aDfs1F4OdafycBApWUDwkkf2j85MeirTmfPU3v1iT58=; b=D+a5662VeJ7w/YNKzL8eDsSc44dIm9nniNcKj93yPJS9GALCJO4JS1pWBqR7qkM/7n Gvl4nVkUDLKcg22gZTVwA/K6WV+5bl62oxN4zKzDmEEhsISdy+YAWo/w6HmGmuKOXkwO XDJhgg86aln9yiZGj0Vn4FESmedor0MDIPLO+OtKZsqwoOqznbqxF29LJaDxLQZlnUzE KGBAKZtYZZsIw9bZOOWc/XQJe1F3ZJlwZ0CERqhRfC4w/9MyEsAyuRinX7QrGQz4Xz5E MqmdxilqzfIERGUl4tDBbbLaef6zIQn//MiSt1hEENJVHnYsXpM+nbcI9GRdhzq/XnmB KnAw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ni6si7989559ejb.360.2020.06.08.00.42.15; Mon, 08 Jun 2020 00:42:37 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729048AbgFHHkH (ORCPT + 99 others); Mon, 8 Jun 2020 03:40:07 -0400 Received: from mail-ot1-f67.google.com ([209.85.210.67]:36036 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726009AbgFHHkF (ORCPT ); Mon, 8 Jun 2020 03:40:05 -0400 Received: by mail-ot1-f67.google.com with SMTP id 97so1498213otg.3; Mon, 08 Jun 2020 00:40:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=aDfs1F4OdafycBApWUDwkkf2j85MeirTmfPU3v1iT58=; b=gNG5Mbw3UmCuTySLt83VBAhd8r9VPz7xnAJW1303GSE3htiAzdBaQPTYmpx+DTK9kQ z9cSiAra/4GVlGqiMtYRz3GUhTOokgAFERBePf0vJEiwOK1cUHBJ0r1c231+NJFuW2DK bm6osqyuchCy4YH2QTzYxRfw1BAeY3B3Oo210ETMcyC7KZ2ENRL42mdqB7updHJdCKfy qx9RtkyoI37ioda4jVe4D6uBRa4A5GRO1txDHe2jNlYq9rA3KH1B0oAeFz15IT/A3yyR fzkzG4tQCPCb1oHaA8xd4Tt6Efr8Sp/jN+7H8PlXVpnuHOWDPcwNx8MgpEbQmHuP1vRm t4fw== X-Gm-Message-State: AOAM5317dVcrijgHPoSZJlP4a6yeq9c0Hezh313PqieNy45ZOwRSH6zz 1xgLmq6YMVhSA/TbCnCqVHvp6/F6Nwl7disC0hM= X-Received: by 2002:a9d:c29:: with SMTP id 38mr15599146otr.107.1591602002975; Mon, 08 Jun 2020 00:40:02 -0700 (PDT) MIME-Version: 1.0 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> In-Reply-To: <7b79863f.f636d.17291e1ff94.Coremail.dinghao.liu@zju.edu.cn> From: Geert Uytterhoeven Date: Mon, 8 Jun 2020 09:39:51 +0200 Message-ID: Subject: Re: Re: [PATCH] media: vsp1: Fix runtime PM imbalance in vsp1_probe To: dinghao.liu@zju.edu.cn Cc: Laurent Pinchart , Kangjie Lu , Kieran Bingham , Mauro Carvalho Chehab , Linux Media Mailing List , Linux-Renesas , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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). Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds