[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7892604.CjmUVh55Wd@wuerfel>
Date: Wed, 22 Jun 2016 14:25:11 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Tomas Winkler <tomasw@...il.com>
Cc: "Levy, Amir (Jer)" <amir.jer.levy@...el.com>,
Andrew Morton <akpm@...ux-foundation.org>,
"mm-commits@...r.kernel.org" <mm-commits@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
"jpoimboe@...hat.com" <jpoimboe@...hat.com>,
Martin Jambor <mjambor@...e.cz>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
James Bottomley <James.Bottomley@...senpartnership.com>,
Denys Vlasenko <dvlasenk@...hat.com>,
Thomas Graf <tgraf@...g.ch>,
Peter Zijlstra <peterz@...radead.org>,
David Rientjes <rientjes@...gle.com>,
Ingo Molnar <mingo@...nel.org>,
Himanshu Madhani <himanshu.madhani@...gic.com>,
Dept-Eng QLA2xxx Upstream <qla2xxx-upstream@...gic.com>,
Jan Hubicka <hubicka@....cz>
Subject: Re: [PATCH v2] byteswap: try to avoid __builtin_constant_p gcc bug
On Wednesday, June 22, 2016 2:44:21 PM CEST Tomas Winkler wrote:
> >
> > There are more than 20 files that have the statement: case cpu_to_...
> > Sparse complains about: case __builtin_bswap, not about __builtin_constant_p.
>
> There is even much more in the header files used in initializers,
> which also require constants. I wonder if __builtin_bswap produces
> constant expression correctly under gcc?
In gcc-4.8 or later yes. gcc-4.6/4.7 on powerpc was a special case that we
have worked around now, as the 16-bit byteswap there was not a constant
expression, unlike the 32-bit and 64-bit ones.
Arnd
Powered by blists - more mailing lists