[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [PATCH 2/4] m68k/atari - atafb: convert allocation of fb ram to new interface



Hi Michael,

On Sun, Mar 30, 2014 at 1:01 AM, Michael Schmitz <schmitzmic@gmail.com> wrote:
> @@ -3166,13 +3167,13 @@ int __init atafb_init(void)
>                 memset(screen_base, 0, mem_req);
>                 pad = -(unsigned long)screen_base & (PAGE_SIZE - 1);
>                 screen_base += pad;
> -               real_screen_base = screen_base + ovsc_offset;
> +               real_screen_base = (void *) atari_stram_to_phys(screen_base + ovsc_offset);

I think real_screen_base should be renamed to e.g. "phys_screen_base",
and changed to "unsigned long", so you can drop the above cast (and a few
more while assigning it to fix->smem_start).

This will also expose that ATAFB_EXT is broken, and what needs to be
done to fix it (follow the chain of casts, phys addresses are unsigned long,
virt addresses are void *).

Thanks!

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds


Reply to: