Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp73864pxj; Thu, 3 Jun 2021 00:56:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzFBiTLrRpUi4ccKhuVmxRvykvknHPmr9EWspVpujNyhS5xdLKYGjhpem0dyyucAIoQ9c0x X-Received: by 2002:aa7:cc9a:: with SMTP id p26mr42394391edt.74.1622707001559; Thu, 03 Jun 2021 00:56:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622707001; cv=none; d=google.com; s=arc-20160816; b=prQScbebS3h4pt4u6dRjpLU900ZZWhJi4LiQp2xWshlh9RoagD3XlvetekUgwT1Vvc o8l76ETGaB6uwIR+IHYkzeKM5owVe/ah9Cb4ipgcY+gONeMSqQojcl9dY5RqH1g8r0KU cbKauJK9a694nhHovTuBzUr7zE99QfKJKL80J/5WgpZ1C0zmyctjRo+aE9r4FU4kzhnP B05pHWIVJw55jpvrC0ubJMWKrUcergzjSMJUqxPT3AGLKrE9FLhp2Uy46XIf16tVTJrX oJTHyqIxQPTbKtfc8glBWHiSeJO6IK2808CVM20nLKiSwBb2gthctw8rZGeYzPS3dGJx xNow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=mDAwQCPpjyEMHJ6+8W9IXnXAc/vZN5i56EWW4dTqtUA=; b=wuP7jp/CWSGd0WW2tE0Vy+8dHyfa+gFxqwUyxN/9BY56fOFEqUmFp5I9fBQqmK0nab 1fN/9qbYCJymErTUH1nrOBwDIys6jC2ftTkbFNpOf2XS0iYbN4YNAaGuqEwQXAp3oZ+l Y0HDR6hZ2WgaTldwlIk7s+i6bR1V4gLmkH7N6Ip5NXT2uUwJjp8AOQLX0hEd2bObOUDc eAvDEXo03+tJ3iDGsS+m3XkHEYURtAZ2AF06inwXepd4O1/mbbJWuHntsPYwb9W2GbTm 9zDYSAlIECOSWPRUYHLWrRG9M5lKy+t0/nfzoLeeKnwahNFF4/wgtyN6xb4JI9/z5+cI Bnug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l23si2112004ejb.573.2021.06.03.00.56.17; Thu, 03 Jun 2021 00:56:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229972AbhFCHz4 (ORCPT + 99 others); Thu, 3 Jun 2021 03:55:56 -0400 Received: from mail-vs1-f54.google.com ([209.85.217.54]:45740 "EHLO mail-vs1-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229775AbhFCHz4 (ORCPT ); Thu, 3 Jun 2021 03:55:56 -0400 Received: by mail-vs1-f54.google.com with SMTP id f15so2519244vsq.12; Thu, 03 Jun 2021 00:54:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mDAwQCPpjyEMHJ6+8W9IXnXAc/vZN5i56EWW4dTqtUA=; b=WNkQOkgZ/xaC8OTQBdichAobDDYE7wrJoTKO3MxaQnTuR/zkHzVY6Idrs2ikDRsUV+ c8AI+USOcXjN0qUKM4mFyV3MwEcUfTfKkpHul4J4NXpViUHVAdC/aOuRlpCLWzdmWQuu FnwNgng2ty3w3vcNyv9xH95+1A/yNEPhtg33tcSofnE28FBeJzL8ecuWMbyGChxSJWCP x0AFQULcCokdTdriUmAPwVOKBl3mm7y4QqWc8BdbTcn7I8k+CSWUFE7KRNL/gkKRmBKv xIlp4/XcNT1UpG+rw3j1ro8WITYQn5ERnfzWtuIUlczAdhoum6kRkrQiOhzLCukYJIdI ZE/w== X-Gm-Message-State: AOAM532KnjhEVO4pk3wnUQAcfAHYpNOcb7Fz+kf2B8R6NWsDeUaEEgeg t4tUcGR10YPrjSqHn0apzUZOUP5Y8w/lc5Hpv4VydTe9ZEDBBw== X-Received: by 2002:a67:fb8c:: with SMTP id n12mr16616135vsr.18.1622706851340; Thu, 03 Jun 2021 00:54:11 -0700 (PDT) MIME-Version: 1.0 References: <20210602231443.4670-1-rdunlap@infradead.org> <20210602231443.4670-3-rdunlap@infradead.org> In-Reply-To: <20210602231443.4670-3-rdunlap@infradead.org> From: Geert Uytterhoeven Date: Thu, 3 Jun 2021 09:54:00 +0200 Message-ID: Subject: Re: [RFC PATCH 3/4] sh: define __BIG_ENDIAN for math-emu To: Randy Dunlap Cc: Linux Kernel Mailing List , Yoshinori Sato , Rich Felker , Linux-sh list Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Randy, On Thu, Jun 3, 2021 at 1:17 AM Randy Dunlap wrote: > The headers in include/math-emu/ test for __BYTE_ORDER == __BIG_ENDIAN > without checking to see if these macros are defined, so add > a define for __BIG_ENDIAN before pulling in these headers. > > This placates these build warnings: > > In file included from ../arch/sh/math-emu/math.c:23: > ../include/math-emu/single.h:50:21: warning: "__BIG_ENDIAN" is not defined, evaluates to 0 [-Wundef] > 50 | #if __BYTE_ORDER == __BIG_ENDIAN > In file included from ../arch/sh/math-emu/math.c:24: > ../include/math-emu/double.h:59:21: warning: "__BIG_ENDIAN" is not defined, evaluates to 0 [-Wundef] > 59 | #if __BYTE_ORDER == __BIG_ENDIAN > > Fixes: 4b565680d163 ("sh: math-emu support") > Signed-off-by: Randy Dunlap Thanks for your patch! > --- linux-next-20210528.orig/arch/sh/math-emu/sfp-util.h > +++ linux-next-20210528/arch/sh/math-emu/sfp-util.h > @@ -70,4 +70,4 @@ > > #define __BYTE_ORDER __LITTLE_ENDIAN > > - > +#define __BIG_ENDIAN 0 I don't think this is the right fix. I think the right values should be picked up from: include/uapi/linux/byteorder/big_endian.h:#define __BIG_ENDIAN 4321 include/uapi/linux/byteorder/little_endian.h:#define __LITTLE_ENDIAN 1234 How is this picked up on other architectures using ? Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds