diff mbox series

fbdev: i740fb: use memset_io() to clear screen

Message ID 20220410202833.26608-1-linux@zary.sk (mailing list archive)
State New, archived
Headers show
Series fbdev: i740fb: use memset_io() to clear screen | expand

Commit Message

Ondrej Zary April 10, 2022, 8:28 p.m. UTC
sparse complains that using memset() on __iomem pointer is wrong:
incorrect type in argument 1 (different address spaces)

Use memset_io() to clear screen instead.

Tested on real i740 cards.

Signed-off-by: Ondrej Zary <linux@zary.sk>
---
 drivers/video/fbdev/i740fb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Helge Deller April 11, 2022, 6:16 a.m. UTC | #1
On 4/10/22 22:28, Ondrej Zary wrote:
> sparse complains that using memset() on __iomem pointer is wrong:
> incorrect type in argument 1 (different address spaces)
>
> Use memset_io() to clear screen instead.
>
> Tested on real i740 cards.
>
> Signed-off-by: Ondrej Zary <linux@zary.sk>

applied.
Thanks!

Helge


> ---
>  drivers/video/fbdev/i740fb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/video/fbdev/i740fb.c b/drivers/video/fbdev/i740fb.c
> index 52cce0db8bd3..dd45ea8203be 100644
> --- a/drivers/video/fbdev/i740fb.c
> +++ b/drivers/video/fbdev/i740fb.c
> @@ -740,7 +740,7 @@ static int i740fb_set_par(struct fb_info *info)
>  	if (i)
>  		return i;
>
> -	memset(info->screen_base, 0, info->screen_size);
> +	memset_io(info->screen_base, 0, info->screen_size);
>
>  	vga_protect(par);
>
diff mbox series

Patch

diff --git a/drivers/video/fbdev/i740fb.c b/drivers/video/fbdev/i740fb.c
index 52cce0db8bd3..dd45ea8203be 100644
--- a/drivers/video/fbdev/i740fb.c
+++ b/drivers/video/fbdev/i740fb.c
@@ -740,7 +740,7 @@  static int i740fb_set_par(struct fb_info *info)
 	if (i)
 		return i;
 
-	memset(info->screen_base, 0, info->screen_size);
+	memset_io(info->screen_base, 0, info->screen_size);
 
 	vga_protect(par);