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 X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D4EDCC433DF for ; Wed, 3 Jun 2020 22:01:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B009F20734 for ; Wed, 3 Jun 2020 22:01:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726689AbgFCWBc convert rfc822-to-8bit (ORCPT ); Wed, 3 Jun 2020 18:01:32 -0400 Received: from mail-oo1-f68.google.com ([209.85.161.68]:38458 "EHLO mail-oo1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725922AbgFCWBc (ORCPT ); Wed, 3 Jun 2020 18:01:32 -0400 Received: by mail-oo1-f68.google.com with SMTP id i9so847674ool.5; Wed, 03 Jun 2020 15:01:31 -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:content-transfer-encoding; bh=+06hodQysHDpNsjgZkygN56Nz2rPEoF5BWYIAZ/Qdgo=; b=bI1qjDPGiH/5WhnPDc93mMDeP0Fbt7CeBw42HnrQ6+aiU+ZpqPAYjoHS4pO8EwNwEG Hb9TUtLc4z1wXSTHVeEIsk/qfqLN6V47iCS1sr+5q7aMnSeVLxar3DjcrnCJo8RTu7fh 8myoCwR/9L/WJovp4k4YbyLFBw04Jf8ibmYzVyXYo+V7leeS9NLRcHkx4ibt3gEMbHOx 2t15KjOEna098fBwbtLKrKZDK56JdXzTTPpbWsyJThSapyE/Qy6QvYYnDX2rwySfIhng Sj0vk56UNuvXWCfLmrPwCi9kex+QmXexLW3DdrsQZfKqRB5CaaEynW7LGfu4ouEKNgEU o1mg== X-Gm-Message-State: AOAM530mPTDqC9wJTz5wjmL71KcUeWNoq4PbCxUQW9mWQxbPfBpLQGem 5MbpnBLt6esOVDG52Cgu4nKqyL8zpqNzO+OI6Pw= X-Google-Smtp-Source: ABdhPJw2dvLU83LDOWGT3Ey3MICfHVX0fif6rBgcuJmgPR+tbro9yGk/hxuKrku9g4yCfFqkljto2jY7BsgBPmTl34k= X-Received: by 2002:a4a:db4b:: with SMTP id 11mr1580565oot.11.1591221690958; Wed, 03 Jun 2020 15:01:30 -0700 (PDT) MIME-Version: 1.0 References: <873bfb31-52d8-7c9b-5480-4a94dc945307@web.de> In-Reply-To: <873bfb31-52d8-7c9b-5480-4a94dc945307@web.de> From: Geert Uytterhoeven Date: Thu, 4 Jun 2020 00:01:19 +0200 Message-ID: Subject: Re: [PATCH] dmaengine: stm32-mdma: call pm_runtime_put if pm_runtime_get_sync fails To: Markus Elfring Cc: Navid Emamdoost , dmaengine , Linux ARM , linux-stm32@st-md-mailman.stormreply.com, Alexandre Torgue , Dan Williams , Navid Emamdoost , Kangjie Lu , Stephen McCamant , Qiushi Wu , Vinod Koul , Maxime Coquelin , Linux Kernel Mailing List , kernel-janitors@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org Hi Markus, Thanks for your comment! On Wed, Jun 3, 2020 at 8:53 PM Markus Elfring wrote: > > Calling pm_runtime_get_sync increments the counter even in case of > > failure, causing incorrect ref count. Call pm_runtime_put if > > pm_runtime_get_sync fails. > > Is it appropriate to copy a sentence from the change description > into the patch subject? > > How do you think about a wording variant like the following? > > The PM runtime reference counter is generally incremented by a call of > the function “pm_runtime_get_sync”. > Thus call the function “pm_runtime_put” also in two error cases > to keep the reference counting consistent. IMHO the important part is "even in case of failure", which you dropped. Missing that point was the root cause of the issue being fixed. Hence I prefer the original description, FWIW. 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