From: Vinod Koul <vkoul@kernel.org>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: gustavo.pimentel@synopsys.com, wangqing@vivo.com,
dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] dmaengine: dw-edma: Fix (and simplify) the probe broken since ecb8c88bd31c
Date: Mon, 22 Nov 2021 12:26:57 +0530 [thread overview]
Message-ID: <YZs/OeBJDMc4A4EC@matsya> (raw)
In-Reply-To: <935fbb40ae930c5fe87482a41dcb73abf2257973.1636492127.git.christophe.jaillet@wanadoo.fr>
On 09-11-21, 22:09, Christophe JAILLET wrote:
> The commit in the Fixes: tag has changed the logic of the code and now it
> is likely that the probe will return an early success (0), even if not
> completely executed.
>
> This should lead to a crash or similar issue later on when the code
> accesses to some never allocated resources.
>
> Change the '!err' into a 'err' when checking if
> 'dma_set_mask_and_coherent()' has failed or not.
>
> While at it, simplify the code and remove the "can't success code" related
> to 32 DMA mask.
> As stated in [1], 'dma_set_mask_and_coherent(DMA_BIT_MASK(64))' can't fail
> if 'dev->dma_mask' is non-NULL. And if it is NULL, it would fail for the
> same reason when tried with DMA_BIT_MASK(32).
The patch title should describe the changes in the patch and not the
outcome! So I have taken the liberty to update this to:
dmaengine: dw-edma: Fix return value check for dma_set_mask_and_coherent()
--
~Vinod
next prev parent reply other threads:[~2021-11-22 6:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-09 21:09 [PATCH] dmaengine: dw-edma: Fix (and simplify) the probe broken since ecb8c88bd31c Christophe JAILLET
2021-11-22 6:56 ` Vinod Koul [this message]
2021-11-22 19:30 ` Christophe JAILLET
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=YZs/OeBJDMc4A4EC@matsya \
--to=vkoul@kernel.org \
--cc=christophe.jaillet@wanadoo.fr \
--cc=dmaengine@vger.kernel.org \
--cc=gustavo.pimentel@synopsys.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wangqing@vivo.com \
/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