diff mbox

[2/2] framebuffer: Fix int cast to pointer warnings

Message ID 1379646611.2021.7.camel@joe-AO722 (mailing list archive)
State New, archived
Headers show

Commit Message

Joe Perches Sept. 20, 2013, 3:10 a.m. UTC
Casts of int to pointer need additional casts to (unsigned long)
when compiled for x86-64 to silence the compiler.

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/video/arkfb.c    | 2 +-
 drivers/video/vt8623fb.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)



--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Tomi Valkeinen Nov. 26, 2013, 2:51 p.m. UTC | #1
On 2013-09-20 06:10, Joe Perches wrote:
> Casts of int to pointer need additional casts to (unsigned long)
> when compiled for x86-64 to silence the compiler.
> 
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>  drivers/video/arkfb.c    | 2 +-
>  drivers/video/vt8623fb.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/video/arkfb.c b/drivers/video/arkfb.c
> index b13f3f2..26fd4e4 100644
> --- a/drivers/video/arkfb.c
> +++ b/drivers/video/arkfb.c
> @@ -1016,7 +1016,7 @@ static int ark_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
>  
>  	pcibios_bus_to_resource(dev, &vga_res, &bus_reg);
>  
> -	par->state.vgabase = (void __iomem *) vga_res.start;
> +	par->state.vgabase = (void __iomem *)(unsigned long)vga_res.start;
>  
>  	/* FIXME get memsize */
>  	regval = vga_rseq(par->state.vgabase, 0x10);
> diff --git a/drivers/video/vt8623fb.c b/drivers/video/vt8623fb.c
> index 7e97c53..281d41b 100644
> --- a/drivers/video/vt8623fb.c
> +++ b/drivers/video/vt8623fb.c
> @@ -731,7 +731,7 @@ static int vt8623_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
>  
>  	pcibios_bus_to_resource(dev, &vga_res, &bus_reg);
>  
> -	par->state.vgabase = (void __iomem *) vga_res.start;
> +	par->state.vgabase = (void __iomem *)(unsigned long)vga_res.start;
>  
>  	/* Find how many physical memory there is on card */
>  	memsize1 = (vga_rseq(par->state.vgabase, 0x34) + 1) >> 1;

What's the warning? I'm not seeing anything on my machine when compiling
these two.

 Tomi
diff mbox

Patch

diff --git a/drivers/video/arkfb.c b/drivers/video/arkfb.c
index b13f3f2..26fd4e4 100644
--- a/drivers/video/arkfb.c
+++ b/drivers/video/arkfb.c
@@ -1016,7 +1016,7 @@  static int ark_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
 
 	pcibios_bus_to_resource(dev, &vga_res, &bus_reg);
 
-	par->state.vgabase = (void __iomem *) vga_res.start;
+	par->state.vgabase = (void __iomem *)(unsigned long)vga_res.start;
 
 	/* FIXME get memsize */
 	regval = vga_rseq(par->state.vgabase, 0x10);
diff --git a/drivers/video/vt8623fb.c b/drivers/video/vt8623fb.c
index 7e97c53..281d41b 100644
--- a/drivers/video/vt8623fb.c
+++ b/drivers/video/vt8623fb.c
@@ -731,7 +731,7 @@  static int vt8623_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
 
 	pcibios_bus_to_resource(dev, &vga_res, &bus_reg);
 
-	par->state.vgabase = (void __iomem *) vga_res.start;
+	par->state.vgabase = (void __iomem *)(unsigned long)vga_res.start;
 
 	/* Find how many physical memory there is on card */
 	memsize1 = (vga_rseq(par->state.vgabase, 0x34) + 1) >> 1;