Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp506823yba; Fri, 12 Apr 2019 07:58:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqw3CLUAEqwjOixsSMPunDamm4rwc7sjVjeu8xLnMGFw/JkjHFU4cn+tQ8+43zmMQxeN76X2 X-Received: by 2002:a63:6983:: with SMTP id e125mr51169095pgc.370.1555081083169; Fri, 12 Apr 2019 07:58:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555081083; cv=none; d=google.com; s=arc-20160816; b=sVDNMXTHZpfHpcw2U1yc74AAYvPJSgWlQPz0Lj5CmrF6kEln6OzdpD5tMSIVmvcLcp aJqy+grcupxC+/L00RRayBFSbY6V2fT2ZWhIHrhVa3BHUWtdg1K4lK7mRhrq7bOLK30P n8Y2pndGky1KWaREHNcf579Iy09dc43PNkKIMhWCDCbMS/3Xm+19letF8onzhmYKfw+d 6aFYjBII/wipulibfEK60WRniY+mabORMJIZy8qNmhg00VMx7NH5sGrfIzgE2nHnLwP0 UistAeauup6YsJcwYKzio2Qhebd6REbllEQjvMqeo0iZnFiRnG99aaYX/Jr16BT33Euw KXJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=KtUqGtoa+2g6Wg5jK2k0AaunAx+eSR/fnzXVHcD6HQ0=; b=HfZwwvUpTAsLcrmxikPl5E2zp57xNY24S7WrHoH7Tx3+13Vqub23snidSUyZdf4CQU 2bsYhvB6V95asGo2WjXPQWLEHv4yzFwX39fNfaP2jdyoEVY635OCVsqcbj4jyJ7rNtYW vhfOhelhFok1l2EOkdyRrB097QEhfUM6JbJfeDQP8trKv9cduMD/IVcJSkAeB1YOlds+ ZWIeripvc3Xuv0VVvyYrMz+x7XAf41/7HUa43iu81CCxc3/DHHSB+UYZugzNu7Qzm8EP jWAwBr7kh/UQjeL76KLMJzVC6lNvBOMQaUEokuxd0jXrYQVSpiNcvoUcLO3ghCaqhahm MbKQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f59si8350134plf.343.2019.04.12.07.57.47; Fri, 12 Apr 2019 07:58:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726833AbfDLOzw (ORCPT + 99 others); Fri, 12 Apr 2019 10:55:52 -0400 Received: from verein.lst.de ([213.95.11.211]:43089 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726624AbfDLOzv (ORCPT ); Fri, 12 Apr 2019 10:55:51 -0400 Received: by newverein.lst.de (Postfix, from userid 2407) id A3D8568AFE; Fri, 12 Apr 2019 16:55:38 +0200 (CEST) Date: Fri, 12 Apr 2019 16:55:38 +0200 From: Christoph Hellwig To: Arnd Bergmann Cc: Christoph Hellwig , Linus Torvalds , Andrew Morton , linux-arch , mick@ics.forth.gr, Linux Kernel Mailing List Subject: Re: [PATCH, RFC] byteorder: sanity check toolchain vs kernel endianess Message-ID: <20190412145538.GA24473@lst.de> References: <20190412143538.11780-1-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 12, 2019 at 04:53:28PM +0200, Arnd Bergmann wrote: > On Fri, Apr 12, 2019 at 4:36 PM Christoph Hellwig wrote: > > > > When removing some dead big endian checks in the RISC-V code Nick > > suggested that we should have some generic sanity checks. I don't think > > we should have thos inside the RISC-V code, but maybe it might make > > sense to have these in the generic byteorder headers. Note that these > > are UAPI headers and some compilers might not actually define > > __BYTE_ORDER__, so we first check that it actually exists. > > > > Suggested-by: Nick Kossifidis > > Signed-off-by: Christoph Hellwig > > Acked-by: Arnd Bergmann > > Extra checking like this is good in general, but I'm not sure I see > exactly what kind of issue one might expect to prevent with this: I'm personally not worried at all. Just trying to respond to Nicks review comment and make it reasonable generic if we have to have these checks at all. I personally would be ok without them, I just don't want them hidden somewhere in the RISC-V code (RISC-V is always little endian at least right now).