From: Arnd Bergmann <arnd@arndb.de>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: stable@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
Rob Clark <robdclark@gmail.com>,
freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: [PATCH 7/7] [stable-4.19] drm/msm: fix address space warning
Date: Fri, 14 Dec 2018 23:10:12 +0100 [thread overview]
Message-ID: <20181214221023.3878670-8-arnd@arndb.de> (raw)
In-Reply-To: <20181214221023.3878670-1-arnd@arndb.de>
In the linux-4.19 stable kernel, we get a warning about a type
mismatch between phys_addr_t and dma_addr_t:
drivers/gpu/drm/msm/disp/dpu1/dpu_dbg.c: In function '_dpu_dbg_dump_dpu_dbg_bus':
drivers/gpu/drm/msm/disp/dpu1/dpu_dbg.c:2003:16: error: passing argument 3 of 'dma_alloc_coherent' from incompatible pointer type [-Werror=incompatible-pointer-types]
list_size, &phys, GFP_KERNEL);
^~~~~
In file included from include/linux/dma-buf.h:31,
from drivers/gpu/drm/msm/disp/dpu1/dpu_dbg.c:20:
include/linux/dma-mapping.h:561:15: note: expected 'dma_addr_t *' {aka 'long long unsigned int *'} but argument is of type 'phys_addr_t *' {aka 'unsigned int *'}
dma_addr_t *dma_handle, gfp_t flag)
~~~~~~~~~~~~^~~~~~~~~~
drivers/gpu/drm/msm/disp/dpu1/dpu_dbg.c: In function '_dpu_dbg_dump_vbif_dbg_bus':
drivers/gpu/drm/msm/disp/dpu1/dpu_dbg.c:2154:16: error: passing argument 3 of 'dma_alloc_coherent' from incompatible pointer type [-Werror=incompatible-pointer-types]
list_size, &phys, GFP_KERNEL);
^~~~~
In file included from include/linux/dma-buf.h:31,
from drivers/gpu/drm/msm/disp/dpu1/dpu_dbg.c:20:
include/linux/dma-mapping.h:561:15: note: expected 'dma_addr_t *' {aka 'long long unsigned int *'} but argument is of type 'phys_addr_t *' {aka 'unsigned int *'}
This code was removed in linux-4.20 with upstream commit effec874792f
("drm/msm/dpu: Remove dpu_dbg"). Rather than backporting the large
patch, this just fixes the warning by using the correct type.
Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/gpu/drm/msm/disp/dpu1/dpu_dbg.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_dbg.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_dbg.c
index ae2aee7ed9e1..e741d26185df 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_dbg.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_dbg.c
@@ -1962,7 +1962,7 @@ static void _dpu_dbg_dump_dpu_dbg_bus(struct dpu_dbg_dpu_debug_bus *bus)
u32 *dump_addr = NULL;
u32 status = 0;
struct dpu_debug_bus_entry *head;
- phys_addr_t phys = 0;
+ dma_addr_t dma = 0;
int list_size;
int i;
u32 offset;
@@ -2000,7 +2000,7 @@ static void _dpu_dbg_dump_dpu_dbg_bus(struct dpu_dbg_dpu_debug_bus *bus)
if (in_mem) {
if (!(*dump_mem))
*dump_mem = dma_alloc_coherent(dpu_dbg_base.dev,
- list_size, &phys, GFP_KERNEL);
+ list_size, &dma, GFP_KERNEL);
if (*dump_mem) {
dump_addr = *dump_mem;
@@ -2101,7 +2101,7 @@ static void _dpu_dbg_dump_vbif_dbg_bus(struct dpu_dbg_vbif_debug_bus *bus)
u32 value, d0, d1;
unsigned long reg, reg1, reg2;
struct vbif_debug_bus_entry *head;
- phys_addr_t phys = 0;
+ dma_addr_t dma = 0;
int i, list_size = 0;
void __iomem *mem_base = NULL;
struct vbif_debug_bus_entry *dbg_bus;
@@ -2151,7 +2151,7 @@ static void _dpu_dbg_dump_vbif_dbg_bus(struct dpu_dbg_vbif_debug_bus *bus)
if (in_mem) {
if (!(*dump_mem))
*dump_mem = dma_alloc_coherent(dpu_dbg_base.dev,
- list_size, &phys, GFP_KERNEL);
+ list_size, &dma, GFP_KERNEL);
if (*dump_mem) {
dump_addr = *dump_mem;
--
2.20.0
next prev parent reply other threads:[~2018-12-14 22:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-14 22:10 [PATCH 0/7] v4.19-stable randconfig fixes Arnd Bergmann
2018-12-14 22:10 ` [PATCH 1/7] sched/pelt: Fix warning and clean up IRQ PELT config Arnd Bergmann
2018-12-14 22:10 ` [PATCH 2/7] scsi: raid_attrs: fix unused variable warning Arnd Bergmann
2018-12-14 22:10 ` [PATCH 3/7] staging: olpc_dcon: add a missing dependency Arnd Bergmann
2018-12-14 22:10 ` [PATCH 4/7] slimbus: ngd: mark PM functions as __maybe_unused Arnd Bergmann
2018-12-14 22:10 ` [PATCH 5/7] [stable-4.19] i2c: aspeed: fix build warning Arnd Bergmann
2018-12-14 23:30 ` Brendan Higgins
2018-12-14 22:10 ` [PATCH 6/7] [stable-4.19] ARM: dts: qcom-apq8064-arrow-sd-600eval fix graph_endpoint warning Arnd Bergmann
2018-12-14 22:10 ` Arnd Bergmann [this message]
2018-12-18 0:20 ` [PATCH 0/7] v4.19-stable randconfig fixes Sasha Levin
2018-12-18 15:12 ` Greg Kroah-Hartman
2018-12-18 16:20 ` Sasha Levin
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=20181214221023.3878670-8-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=freedreno@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robdclark@gmail.com \
--cc=stable@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;
as well as URLs for NNTP newsgroup(s).