From: Benjamin GAIGNARD <benjamin.gaignard@st.com>
To: Arnaud POULIQUEN <arnaud.pouliquen@st.com>,
"Andy Gross <andy.gross@linaro.org> ; David Brown"
<david.brown@linaro.org>, "Arnd Bergmann" <arnd@arndb.de>
Cc: "linux-arm-msm@vger.kernel.org" <linux-arm-msm@vger.kernel.org>,
"linux-soc@vger.kernel.org" <linux-soc@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Benjamin Gaignard" <benjamin.gaignard@linaro.org>
Subject: Re: Compilation error report for: drivers/firmware/qcom_scm.c:469:47: error: passing argument 3 of ‘dma_alloc_coherent’ from incompatible pointer type
Date: Tue, 30 Jan 2018 10:11:46 +0000 [thread overview]
Message-ID: <e804928d-deb9-668a-7012-2843ba85285e@st.com> (raw)
In-Reply-To: <a2a6bf12-529c-cb20-c69f-106d34e1204a@st.com>
On 01/12/2018 05:11 PM, Arnaud Pouliquen wrote:
> Hello Andy,David,
+ Arnd
I have the same issue on drm-misc-next.
Does Arnaud's fix make sense or should we update/change the way of how
we compile the kernel ?
Regards,
Benjamin
>
>
> I'm facing a compilation error using COMPILE_TEST config,
> could you crosscheck the issue.
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
> commit: b2cd1df66037e7c4697c7e40496bf7e4a5e16a2d :Linux 4.15-rc7
>
> reproduce:
> ---------
> #apt-get install gcc-arm-linux-gnueabi
> #apt-get install gcc-arm-linux-gnueabihf
>
> apply .config (in attachment)
>
> #make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j4
>
>
> error:
> -----
> CC drivers/firmware/qcom_scm.o
> drivers/firmware/qcom_scm.c: In function ‘qcom_scm_assign_mem’:
> drivers/firmware/qcom_scm.c:469:47: error: passing argument 3 of
> ‘dma_alloc_coherent’ from incompatible pointer type
> [-Werror=incompatible-pointer-types]
> ptr = dma_alloc_coherent(__scm->dev, ptr_sz, &ptr_phys, GFP_KERNEL);
> ^
> In file included from drivers/firmware/qcom_scm.c:21:0:
> ./include/linux/dma-mapping.h:549:21: note: expected ‘dma_addr_t * {aka
> long long unsigned int *}’ but argument is of type ‘phys_addr_t * {aka
> unsigned int *}’
> static inline void *dma_alloc_coherent(struct device *dev, size_t size,
> ^
> cc1: some warnings being treated as errors
> scripts/Makefile.build:310: recipe for target
> 'drivers/firmware/qcom_scm.o' failed
> make[2]: *** [drivers/firmware/qcom_scm.o] Error 1
>
> patch to fix compilation issue:
> ------------------------------
> diff --git a/drivers/firmware/qcom_scm.c b/drivers/firmware/qcom_scm.c
> index af4c752..8dfbe61 100644
> --- a/drivers/firmware/qcom_scm.c
> +++ b/drivers/firmware/qcom_scm.c
> @@ -448,7 +448,7 @@ int qcom_scm_assign_mem(phys_addr_t mem_addr, size_t
> mem_sz,
> struct qcom_scm_mem_map_info *mem_to_map;
> phys_addr_t mem_to_map_phys;
> phys_addr_t dest_phys;
> - phys_addr_t ptr_phys;
> + dma_addr_t ptr_phys;
> size_t mem_to_map_sz;
> size_t dest_sz;
> size_t src_sz;
>
> Thanks,
> Arnaud
next parent reply other threads:[~2018-01-30 10:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <a2a6bf12-529c-cb20-c69f-106d34e1204a@st.com>
2018-01-30 10:11 ` Benjamin GAIGNARD [this message]
2018-01-30 13:25 ` Arnd Bergmann
2018-01-30 14:00 ` Benjamin Gaignard
2018-01-30 14:17 ` Arnd Bergmann
2018-02-02 23:29 ` Compilation error report for: drivers/firmware/qcom_scm.c:469:47: error: passing argument 3 of ?dma_alloc_coherent? " Bjorn Andersson
2018-02-04 10:01 ` Benjamin Gaignard
2018-02-05 16:34 ` Arnd Bergmann
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=e804928d-deb9-668a-7012-2843ba85285e@st.com \
--to=benjamin.gaignard@st.com \
--cc=arnaud.pouliquen@st.com \
--cc=arnd@arndb.de \
--cc=benjamin.gaignard@linaro.org \
--cc=david.brown@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-soc@vger.kernel.org \
/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
all inboxes | Powered by JetHome®