From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753474AbdKIIfB (ORCPT ); Thu, 9 Nov 2017 03:35:01 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:43422 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753291AbdKIIe7 (ORCPT ); Thu, 9 Nov 2017 03:34:59 -0500 Date: Thu, 9 Nov 2017 00:34:52 -0800 From: Christoph Hellwig To: Luc Van Oostenryck Cc: "David S . Miller" , Sam Ravnborg , sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/2] sparc: pass endianness info to sparse Message-ID: <20171109083452.GA10787@infradead.org> References: <20171109061652.14948-1-luc.vanoostenryck@gmail.com> <20171109061652.14948-3-luc.vanoostenryck@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171109061652.14948-3-luc.vanoostenryck@gmail.com> User-Agent: Mutt/1.8.3 (2017-05-23) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 09, 2017 at 07:16:52AM +0100, Luc Van Oostenryck wrote: > sparc is big-endian only but sparse assumes the same endianness > as the building machine. > This is problematic for code which expect __BYTE_ORDER__ being > correctly predefined by the compiler which sparse can then > pre-process differently from what gcc would, depending on the > building machine endianness. > > Fix this by letting sparse know about the architecture endianness. You're posted patches for this for about half a dozen architectures now, but we also now have generic Kconfig symbols for the byte order. I'd much rather see this done in generic code than hacking it up everywhere.