[PATCH] staging: fbtft: Do not use binary constants

Geert Uytterhoeven geert at linux-m68k.org
Tue Mar 10 21:53:43 UTC 2015


Hi Joe,

On Tue, Mar 10, 2015 at 10:50 PM, Joe Perches <joe at perches.com> wrote:
> On Tue, 2015-03-10 at 22:34 +0100, Geert Uytterhoeven wrote:
>> Gcc < 4.3 doesn't understand binary constants (0b*):
>
> trivia:
>
>> diff --git a/drivers/staging/fbtft/fb_hx8340bn.c b/drivers/staging/fbtft/fb_hx8340bn.c
> []
>> @@ -156,10 +156,10 @@ static int set_var(struct fbtft_par *par)
>>  static int set_gamma(struct fbtft_par *par, unsigned long *curves)
>>  {
>>       unsigned long mask[] = {
>
> static const

"static const u8", and convert all the wasteful "unsigned long" curve arrays
to u8 arrays, as they store 5-bit quantities only.

This is staging, so your eyes start hurting as soon as you dive into it...

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at 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


More information about the devel mailing list