* [PATCH] fbdev: da8xx-fb: remove incorrect type cast
@ 2016-01-25 15:05 ` Arnd Bergmann
0 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2016-01-25 15:05 UTC (permalink / raw)
To: Tomi Valkeinen
Cc: linux-arm-kernel, Arnd Bergmann,
Jean-Christophe Plagniol-Villard, linux-fbdev, linux-kernel
The probe function correct passes a dma_addr_t pointer into
dma_alloc_coherent(), but has a cast to resource_size_t, which
might be different from dma_addr_t:
drivers/video/fbdev/da8xx-fb.c: In function 'fb_probe':
drivers/video/fbdev/da8xx-fb.c:1431:10: error: passing argument 3 of 'dma_alloc_coherent' from incompatible pointer type [-Werror=incompatible-pointer-types]
This removes the cast, which avoids the warning.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/video/fbdev/da8xx-fb.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/video/fbdev/da8xx-fb.c b/drivers/video/fbdev/da8xx-fb.c
index 0081725c6b5b..6b2a06d09f2b 100644
--- a/drivers/video/fbdev/da8xx-fb.c
+++ b/drivers/video/fbdev/da8xx-fb.c
@@ -152,7 +152,7 @@ static void lcdc_write(unsigned int val, unsigned int addr)
struct da8xx_fb_par {
struct device *dev;
- resource_size_t p_palette_base;
+ dma_addr_t p_palette_base;
unsigned char *v_palette_base;
dma_addr_t vram_phys;
unsigned long vram_size;
@@ -1428,7 +1428,7 @@ static int fb_probe(struct platform_device *device)
par->vram_virt = dma_alloc_coherent(NULL,
par->vram_size,
- (resource_size_t *) &par->vram_phys,
+ &par->vram_phys,
GFP_KERNEL | GFP_DMA);
if (!par->vram_virt) {
dev_err(&device->dev,
@@ -1448,7 +1448,7 @@ static int fb_probe(struct platform_device *device)
/* allocate palette buffer */
par->v_palette_base = dma_zalloc_coherent(NULL, PALETTE_SIZE,
- (resource_size_t *)&par->p_palette_base,
+ &par->p_palette_base,
GFP_KERNEL | GFP_DMA);
if (!par->v_palette_base) {
dev_err(&device->dev,
--
2.7.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] fbdev: da8xx-fb: remove incorrect type cast
@ 2016-01-25 15:05 ` Arnd Bergmann
0 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2016-01-25 15:05 UTC (permalink / raw)
To: linux-arm-kernel
The probe function correct passes a dma_addr_t pointer into
dma_alloc_coherent(), but has a cast to resource_size_t, which
might be different from dma_addr_t:
drivers/video/fbdev/da8xx-fb.c: In function 'fb_probe':
drivers/video/fbdev/da8xx-fb.c:1431:10: error: passing argument 3 of 'dma_alloc_coherent' from incompatible pointer type [-Werror=incompatible-pointer-types]
This removes the cast, which avoids the warning.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/video/fbdev/da8xx-fb.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/video/fbdev/da8xx-fb.c b/drivers/video/fbdev/da8xx-fb.c
index 0081725c6b5b..6b2a06d09f2b 100644
--- a/drivers/video/fbdev/da8xx-fb.c
+++ b/drivers/video/fbdev/da8xx-fb.c
@@ -152,7 +152,7 @@ static void lcdc_write(unsigned int val, unsigned int addr)
struct da8xx_fb_par {
struct device *dev;
- resource_size_t p_palette_base;
+ dma_addr_t p_palette_base;
unsigned char *v_palette_base;
dma_addr_t vram_phys;
unsigned long vram_size;
@@ -1428,7 +1428,7 @@ static int fb_probe(struct platform_device *device)
par->vram_virt = dma_alloc_coherent(NULL,
par->vram_size,
- (resource_size_t *) &par->vram_phys,
+ &par->vram_phys,
GFP_KERNEL | GFP_DMA);
if (!par->vram_virt) {
dev_err(&device->dev,
@@ -1448,7 +1448,7 @@ static int fb_probe(struct platform_device *device)
/* allocate palette buffer */
par->v_palette_base = dma_zalloc_coherent(NULL, PALETTE_SIZE,
- (resource_size_t *)&par->p_palette_base,
+ &par->p_palette_base,
GFP_KERNEL | GFP_DMA);
if (!par->v_palette_base) {
dev_err(&device->dev,
--
2.7.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] fbdev: da8xx-fb: remove incorrect type cast
@ 2016-01-25 15:05 ` Arnd Bergmann
0 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2016-01-25 15:05 UTC (permalink / raw)
To: linux-arm-kernel
The probe function correct passes a dma_addr_t pointer into
dma_alloc_coherent(), but has a cast to resource_size_t, which
might be different from dma_addr_t:
drivers/video/fbdev/da8xx-fb.c: In function 'fb_probe':
drivers/video/fbdev/da8xx-fb.c:1431:10: error: passing argument 3 of 'dma_alloc_coherent' from incompatible pointer type [-Werror=incompatible-pointer-types]
This removes the cast, which avoids the warning.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/video/fbdev/da8xx-fb.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/video/fbdev/da8xx-fb.c b/drivers/video/fbdev/da8xx-fb.c
index 0081725c6b5b..6b2a06d09f2b 100644
--- a/drivers/video/fbdev/da8xx-fb.c
+++ b/drivers/video/fbdev/da8xx-fb.c
@@ -152,7 +152,7 @@ static void lcdc_write(unsigned int val, unsigned int addr)
struct da8xx_fb_par {
struct device *dev;
- resource_size_t p_palette_base;
+ dma_addr_t p_palette_base;
unsigned char *v_palette_base;
dma_addr_t vram_phys;
unsigned long vram_size;
@@ -1428,7 +1428,7 @@ static int fb_probe(struct platform_device *device)
par->vram_virt = dma_alloc_coherent(NULL,
par->vram_size,
- (resource_size_t *) &par->vram_phys,
+ &par->vram_phys,
GFP_KERNEL | GFP_DMA);
if (!par->vram_virt) {
dev_err(&device->dev,
@@ -1448,7 +1448,7 @@ static int fb_probe(struct platform_device *device)
/* allocate palette buffer */
par->v_palette_base = dma_zalloc_coherent(NULL, PALETTE_SIZE,
- (resource_size_t *)&par->p_palette_base,
+ &par->p_palette_base,
GFP_KERNEL | GFP_DMA);
if (!par->v_palette_base) {
dev_err(&device->dev,
--
2.7.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] fbdev: da8xx-fb: remove incorrect type cast
2016-01-25 15:05 ` Arnd Bergmann
(?)
@ 2016-01-29 11:42 ` Tomi Valkeinen
-1 siblings, 0 replies; 6+ messages in thread
From: Tomi Valkeinen @ 2016-01-29 11:42 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linux-arm-kernel, Jean-Christophe Plagniol-Villard, linux-fbdev,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 694 bytes --]
On 25/01/16 17:05, Arnd Bergmann wrote:
> The probe function correct passes a dma_addr_t pointer into
> dma_alloc_coherent(), but has a cast to resource_size_t, which
> might be different from dma_addr_t:
>
> drivers/video/fbdev/da8xx-fb.c: In function 'fb_probe':
> drivers/video/fbdev/da8xx-fb.c:1431:10: error: passing argument 3 of 'dma_alloc_coherent' from incompatible pointer type [-Werror=incompatible-pointer-types]
>
> This removes the cast, which avoids the warning.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/video/fbdev/da8xx-fb.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Thanks, queued for 4.5 fixes.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] fbdev: da8xx-fb: remove incorrect type cast
@ 2016-01-29 11:42 ` Tomi Valkeinen
0 siblings, 0 replies; 6+ messages in thread
From: Tomi Valkeinen @ 2016-01-29 11:42 UTC (permalink / raw)
To: linux-arm-kernel
[-- Attachment #1: Type: text/plain, Size: 694 bytes --]
On 25/01/16 17:05, Arnd Bergmann wrote:
> The probe function correct passes a dma_addr_t pointer into
> dma_alloc_coherent(), but has a cast to resource_size_t, which
> might be different from dma_addr_t:
>
> drivers/video/fbdev/da8xx-fb.c: In function 'fb_probe':
> drivers/video/fbdev/da8xx-fb.c:1431:10: error: passing argument 3 of 'dma_alloc_coherent' from incompatible pointer type [-Werror=incompatible-pointer-types]
>
> This removes the cast, which avoids the warning.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/video/fbdev/da8xx-fb.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Thanks, queued for 4.5 fixes.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] fbdev: da8xx-fb: remove incorrect type cast
@ 2016-01-29 11:42 ` Tomi Valkeinen
0 siblings, 0 replies; 6+ messages in thread
From: Tomi Valkeinen @ 2016-01-29 11:42 UTC (permalink / raw)
To: linux-arm-kernel
On 25/01/16 17:05, Arnd Bergmann wrote:
> The probe function correct passes a dma_addr_t pointer into
> dma_alloc_coherent(), but has a cast to resource_size_t, which
> might be different from dma_addr_t:
>
> drivers/video/fbdev/da8xx-fb.c: In function 'fb_probe':
> drivers/video/fbdev/da8xx-fb.c:1431:10: error: passing argument 3 of 'dma_alloc_coherent' from incompatible pointer type [-Werror=incompatible-pointer-types]
>
> This removes the cast, which avoids the warning.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/video/fbdev/da8xx-fb.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Thanks, queued for 4.5 fixes.
Tomi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160129/a67d14d2/attachment-0001.sig>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-01-29 11:43 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-25 15:05 [PATCH] fbdev: da8xx-fb: remove incorrect type cast Arnd Bergmann
2016-01-25 15:05 ` Arnd Bergmann
2016-01-25 15:05 ` Arnd Bergmann
2016-01-29 11:42 ` Tomi Valkeinen
2016-01-29 11:42 ` Tomi Valkeinen
2016-01-29 11:42 ` Tomi Valkeinen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.