Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp163298pxv; Wed, 30 Jun 2021 02:36:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfCA45KqOUtKzTpuM/LzaxQcQ6MPJsrW6+V8YvgtmjrIMKvaqjDadYj5jwqlASpvWzIs18 X-Received: by 2002:a6b:b5c7:: with SMTP id e190mr7356529iof.31.1625045799786; Wed, 30 Jun 2021 02:36:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625045799; cv=none; d=google.com; s=arc-20160816; b=EPm20FpBzHFJOyRORpqjGlUPJainuxkW/DAuLL0vSyOfv1xb7NQH4EHZ9ElCw6Levk R51ohZg8hHOhBX5sLbD3XQFAJbV7ijM/TTpMeFKxHc8MpT6YTzSi4oixbFTkQIECNasT +aVwa0SJ7EHAEc1Mdm9WYOQ8Gq3wrVG1XwQZGtq8gnJJNbhvUJPw6PabYqCrP800bqcX NoBP8ZdU4cPa0Lf1Fm1CKcSAgrZkmb4hcssk4nqhdpr0XM0WO5WtQq6EYbG/gZkqmVgj rkbYcLE72OUNm+sgguMzRSi8gXfl7oiMOi/iXUjxDr9r61qwa+GNV2hgn838iPGViGLB RhBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=omiibvdaNgTQ+98s8Oouh98+tuQvDV0vjYBXjeSLqkg=; b=NeUvMnE9zhcQc1y6lBoTlLyy5SRgDrJtlCNCJUMPG9ja23eEBIPc5iJpOf9Ir0skUh Z9MmwfVoC97Ty0UHT9o6yVR99AcKVyRvu0Q0pPx7bRTz/FmRH4xT6Ac+9vs5TCw1Kzwb +WNyfOFEgMvfAlchbSoSc+JdAbS4D3nd0XsTGzfaG92uRotLaNTTcoIMc5p7KGPEv6uN DDiiv8g3M4CRsPhfexgslhKs1GHnAw4lGhYEd8D5/BUbYHd7ml5MKv3FLR8ykZRrHkrF 3aIN3r0RikHYYx677HgIzLvzmLHMO9ZTIXennMQB/ery2oI2Lv+BnK9JrMZhVRjrG8l0 seOg== 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 15si26079389ilz.158.2021.06.30.02.36.28; Wed, 30 Jun 2021 02:36:39 -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 S233867AbhF3Jhk (ORCPT + 99 others); Wed, 30 Jun 2021 05:37:40 -0400 Received: from outpost1.zedat.fu-berlin.de ([130.133.4.66]:51537 "EHLO outpost1.zedat.fu-berlin.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233653AbhF3Jhj (ORCPT ); Wed, 30 Jun 2021 05:37:39 -0400 Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost.zedat.fu-berlin.de (Exim 4.94) with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (envelope-from ) id 1lyWcg-001x23-39; Wed, 30 Jun 2021 11:35:10 +0200 Received: from p57bd964c.dip0.t-ipconnect.de ([87.189.150.76] helo=[192.168.178.81]) by inpost2.zedat.fu-berlin.de (Exim 4.94) with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (envelope-from ) id 1lyWcf-0013GZ-Sr; Wed, 30 Jun 2021 11:35:10 +0200 Subject: Re: [PATCH 2/3 v2] sh: define __BIG_ENDIAN for math-emu To: Randy Dunlap , linux-kernel@vger.kernel.org Cc: Yoshinori Sato , Rich Felker , linux-sh@vger.kernel.org, Geert Uytterhoeven References: <20210627220544.8757-1-rdunlap@infradead.org> <20210627220544.8757-3-rdunlap@infradead.org> From: John Paul Adrian Glaubitz Message-ID: <7126f059-baaa-0bd6-68ea-c4a24827592e@physik.fu-berlin.de> Date: Wed, 30 Jun 2021 11:35:09 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210627220544.8757-3-rdunlap@infradead.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Original-Sender: glaubitz@physik.fu-berlin.de X-Originating-IP: 87.189.150.76 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/28/21 12:05 AM, Randy Dunlap wrote: > Fix this by defining both ENDIAN macros in > so that they can be utilized in > according to the latter's comment: > /* Allow sfp-machine to have its own byte order definitions. */ > > (This is what is done in arch/nds32/include/asm/sfp-machine.h.) > > 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 > Cc: Yoshinori Sato > Cc: Rich Felker > Cc: linux-sh@vger.kernel.org > Cc: John Paul Adrian Glaubitz > Reviewed-by: Geert Uytterhoeven > --- > v2: use same preprocessor method that nds32 does; > add Geert's Reviewed-by; > renumber patches; > add more Cc's; > > arch/sh/include/asm/sfp-machine.h | 8 ++++++++ > 1 file changed, 8 insertions(+) > > --- linux-next-20210625.orig/arch/sh/include/asm/sfp-machine.h > +++ linux-next-20210625/arch/sh/include/asm/sfp-machine.h > @@ -13,6 +13,14 @@ > #ifndef _SFP_MACHINE_H > #define _SFP_MACHINE_H > > +#ifdef __BIG_ENDIAN__ > +#define __BYTE_ORDER __BIG_ENDIAN > +#define __LITTLE_ENDIAN 0 > +#else > +#define __BYTE_ORDER __LITTLE_ENDIAN > +#define __BIG_ENDIAN 0 > +#endif > + > #define _FP_W_TYPE_SIZE 32 > #define _FP_W_TYPE unsigned long > #define _FP_WS_TYPE signed long > Boot-tested on my SH-7785LCR without any issues. Tested-by: John Paul Adrian Glaubitz -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaubitz@debian.org `. `' Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913