From: Nicolas Boichat <drinkcat@chromium.org>
To: Tzung-Bi Shih <tzungbi@google.com>
Cc: Ohad Ben-Cohen <ohad@wizery.com>,
kernel test robot <lkp@intel.com>,
"open list:REMOTE PROCESSOR \(REMOTEPROC\) SUBSYSTEM"
<linux-remoteproc@vger.kernel.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Guenter Roeck <groeck@chromium.org>,
"moderated list:ARM/Mediatek SoC support"
<linux-mediatek@lists.infradead.org>,
Pi-Hsun Shih <pihsun@chromium.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
linux-arm Mailing List <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v2 2/2] remoteproc/mediatek: fix sparse errors on dma_alloc and dma_free
Date: Mon, 16 Nov 2020 16:45:17 +0800 [thread overview]
Message-ID: <CANMq1KAuZ4gsTmYC_kQvhzpg-AEfXhBqypS0bdogv15THQCTiA@mail.gmail.com> (raw)
In-Reply-To: <20201116082537.3287009-3-tzungbi@google.com>
On Mon, Nov 16, 2020 at 4:26 PM Tzung-Bi Shih <tzungbi@google.com> wrote:
>
> Fixes the following sparse errors on dma_alloc_coherent() and
> dma_free_coherent().
>
> On drivers/remoteproc/mtk_scp.c:559:23:
> warning: incorrect type in assignment (different address spaces)
> expected void [noderef] __iomem *cpu_addr
> got void *
>
> On drivers/remoteproc/mtk_scp.c:572:56:
> warning: incorrect type in argument 3 (different address spaces)
> expected void *cpu_addr
> got void [noderef] __iomem *cpu_addr
>
> The cpu_addr is not a __iomem address. Removes the marker.
>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
> ---
> drivers/remoteproc/mtk_common.h | 2 +-
> drivers/remoteproc/mtk_scp.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/remoteproc/mtk_common.h b/drivers/remoteproc/mtk_common.h
> index 47b4561443a9..b3397d327786 100644
> --- a/drivers/remoteproc/mtk_common.h
> +++ b/drivers/remoteproc/mtk_common.h
> @@ -99,7 +99,7 @@ struct mtk_scp {
> bool ipi_id_ack[SCP_IPI_MAX];
> wait_queue_head_t ack_wq;
>
> - void __iomem *cpu_addr;
> + void *cpu_addr;
> dma_addr_t dma_addr;
> size_t dram_size;
>
> diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c
> index 8ed89ea1eb78..a1e23b5f19b9 100644
> --- a/drivers/remoteproc/mtk_scp.c
> +++ b/drivers/remoteproc/mtk_scp.c
> @@ -413,7 +413,7 @@ static void *scp_da_to_va(struct rproc *rproc, u64 da, size_t len)
> } else if (scp->dram_size) {
> offset = da - scp->dma_addr;
> if (offset >= 0 && (offset + len) < scp->dram_size)
> - return (void __force *)scp->cpu_addr + offset;
> + return scp->cpu_addr + offset;
> }
>
> return NULL;
> --
> 2.29.2.299.gdc1121823c-goog
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-11-16 8:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-16 8:25 [PATCH v2 0/2] remoteproc/mediatek: fix sparse errors Tzung-Bi Shih
2020-11-16 8:25 ` [PATCH v2 1/2] remoteproc/mediatek: fix sparse errors on sram power on and off Tzung-Bi Shih
2020-11-16 8:42 ` Nicolas Boichat
2020-11-16 20:25 ` Mathieu Poirier
2020-11-16 8:25 ` [PATCH v2 2/2] remoteproc/mediatek: fix sparse errors on dma_alloc and dma_free Tzung-Bi Shih
2020-11-16 8:45 ` Nicolas Boichat [this message]
2020-11-16 20:32 ` Mathieu Poirier
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=CANMq1KAuZ4gsTmYC_kQvhzpg-AEfXhBqypS0bdogv15THQCTiA@mail.gmail.com \
--to=drinkcat@chromium.org \
--cc=bjorn.andersson@linaro.org \
--cc=groeck@chromium.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=lkp@intel.com \
--cc=matthias.bgg@gmail.com \
--cc=ohad@wizery.com \
--cc=pihsun@chromium.org \
--cc=tzungbi@google.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;
as well as URLs for NNTP newsgroup(s).