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

From: Geert Uytterhoeven
Date: Tue Mar 10 2015 - 17:53:51 EST


Hi Joe,

On Tue, Mar 10, 2015 at 10:50 PM, Joe Perches <joe@xxxxxxxxxxx> 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@xxxxxxxxxxxxxx

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/