From: Markus Elfring <Markus.Elfring@web.de>
To: Geert Uytterhoeven <geert@linux-m68k.org>,
Navid Emamdoost <navid.emamdoost@gmail.com>,
dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-stm32@st-md-mailman.stormreply.com
Cc: Alexandre Torgue <alexandre.torgue@st.com>,
Dan Williams <dan.j.williams@intel.com>,
Navid Emamdoost <emamd001@umn.edu>, Kangjie Lu <kjlu@umn.edu>,
Stephen McCamant <smccaman@umn.edu>, Qiushi Wu <wu000273@umn.edu>,
Vinod Koul <vkoul@kernel.org>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: dmaengine: stm32-mdma: call pm_runtime_put if pm_runtime_get_sync fails
Date: Thu, 4 Jun 2020 07:43:14 +0200 [thread overview]
Message-ID: <3eca8df2-22ae-06e0-5809-c11e459915d5@web.de> (raw)
In-Reply-To: <CAMuHMdU3wMT_pnh4NE9W9Su6qip_oObgd6OiRCwfuvouqjXKHA@mail.gmail.com>
>>> 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.
Would you like to comment any more of the presented patch review concerns?
Can it make sense to combine any adjustments into a single patch
according to the discussed software transformation pattern?
https://lore.kernel.org/patchwork/project/lkml/list/?submitter=26544&state=*&q=engine%3A+stm32&archive=both
Regards,
Markus
prev parent reply other threads:[~2020-06-04 5:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-03 18:52 [PATCH] dmaengine: stm32-mdma: call pm_runtime_put if pm_runtime_get_sync fails Markus Elfring
2020-06-03 19:17 ` Navid Emamdoost
2020-06-03 19:40 ` [PATCH v2] dmaengine: stm32-dma: " Markus Elfring
2020-06-04 9:36 ` [PATCH] dmaengine: stm32-dmamux: Fix pm_runtime_get_sync() failure cases Markus Elfring
2020-06-17 13:59 ` [PATCH] dmaengine: stm32-mdma: call pm_runtime_put if pm_runtime_get_sync fails Vinod Koul
2020-06-03 22:01 ` Geert Uytterhoeven
2020-06-04 5:43 ` Markus Elfring [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3eca8df2-22ae-06e0-5809-c11e459915d5@web.de \
--to=markus.elfring@web.de \
--cc=alexandre.torgue@st.com \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=emamd001@umn.edu \
--cc=geert@linux-m68k.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=kjlu@umn.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=navid.emamdoost@gmail.com \
--cc=smccaman@umn.edu \
--cc=vkoul@kernel.org \
--cc=wu000273@umn.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).