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

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

 



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

> -		0b1111, 0b1111, 0b11111, 0b1111, 0b1111, 0b1111, 0b11111,
> -		0b111, 0b111, 0b111, 0b111, 0b111, 0b111, 0b11, 0b11,
> -		0b1111, 0b1111, 0b11111, 0b1111, 0b1111, 0b1111, 0b11111,
> -		0b111, 0b111, 0b111, 0b111, 0b111, 0b111, 0b0, 0b0 };
> +		0x0f, 0x0f, 0x1f, 0x0f, 0x0f, 0x0f, 0x1f, 0x07, 0x07, 0x07,
> +		0x07, 0x07, 0x07, 0x03, 0x03, 0x0f, 0x0f, 0x1f, 0x0f, 0x0f,
> +		0x0f, 0x1f, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x00, 0x00,
> +	};

[]

> diff --git a/drivers/staging/fbtft/fb_hx8347d.c b/drivers/staging/fbtft/fb_hx8347d.c
[]
> @@ -115,10 +115,9 @@ static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye)
>  static int set_gamma(struct fbtft_par *par, unsigned long *curves)
>  {
>  	unsigned long mask[] = {

etc...

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux