From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753622AbbCJVur (ORCPT ); Tue, 10 Mar 2015 17:50:47 -0400 Received: from smtprelay0066.hostedemail.com ([216.40.44.66]:37099 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751012AbbCJVuq (ORCPT ); Tue, 10 Mar 2015 17:50:46 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::,RULES_HIT:41:355:379:541:599:960:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2692:2828:3138:3139:3140:3141:3142:3352:3622:3876:3877:4321:5007:6114:6119:6261:6642:10004:10400:10848:11026:11232:11658:11914:12043:12296:12517:12519:12555:12740:13069:13311:13357:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: story13_236453796df50 X-Filterd-Recvd-Size: 2180 Message-ID: <1426024241.18060.53.camel@perches.com> Subject: Re: [PATCH] staging: fbtft: Do not use binary constants From: Joe Perches To: Geert Uytterhoeven Cc: Thomas Petazzoni , Noralf =?ISO-8859-1?Q?Tr=F8nnes?= , Greg Kroah-Hartman , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Date: Tue, 10 Mar 2015 14:50:41 -0700 In-Reply-To: <1426023283-27561-1-git-send-email-geert@linux-m68k.org> References: <1426023283-27561-1-git-send-email-geert@linux-m68k.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.12.10-0ubuntu1~14.10.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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...