Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp4093681pxb; Mon, 4 Oct 2021 17:22:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyB96Iu+A9/xeQzUd6oAvHcqMOavobhtJo7aD+6mGG96Z+Xc4sd7F2r5Fyqye92x2y8E9tM X-Received: by 2002:a17:906:d196:: with SMTP id c22mr20439295ejz.231.1633393325299; Mon, 04 Oct 2021 17:22:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633393325; cv=none; d=google.com; s=arc-20160816; b=GS7Bxcii4ZIqNnwkFLK5YV1KIQQzKf/YaQbTGr6jPiX6qM1uf1VlUHvW5iKSnfaX8w 4g33lCUmGB8el/B1Uqut5L34WedtKlhWzXyw7SDbLJa1Rv2gbnpkoZ2D0ttGFHR9N+1G 0GNqSAfUmdEqhiRiE6IMzlI1S2GEhUHXQ3mPWRsmDgLNfpV5M03z0aL2ZS+GBCLSbXU7 icbr+D8pTXSZoFs4yXTtxNLDfN2ehkx+EbyeFPiqhJGeKympVpvlgkL7rqffAUgd2c67 dyf0WcfhZbDwOwIH1qlWPZ3OVXCK6uNgYxj4KGQtUMCCswg5607/HXWUjqLh1bE5EEku jf3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=UGnZuFAcpMUOmEXXyT7AcnFvYR5lLxeczg5QY3FKNLY=; b=g37XDsaZkMH0fA4mrhvKXy01DRSm9u8MLt8vjcqep+ROi4hHdqXw1UM1jbeL0zlUQ8 jo+GnJ3nW+UGp1rlczdTmR0I8BPdDs7Fo2fwbsPJc5SefDMsXvm605UnGZAWaUIq4lnd B9J2X8lMiOugeDzHaDFMCSrvgruo04vI6N1UM4Ah/fLDjVBwtX0CvRJmRSKqPsOB20Ab n5q0YV54htnBgfNXENO1vVGXpXskPOOCHB8b4iguPqovfIY6Dd8uSlW8JGFI2tOCQR7n QHufOZycBCXQtgkSfDhFOzvmYLBYXhg0nyrLTAtWCHmEyZiVAtiXwgrrZqAYdRtw6Den Amgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=xDuLagZa; 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 nc14si32075808ejc.445.2021.10.04.17.21.41; Mon, 04 Oct 2021 17:22:05 -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; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=xDuLagZa; 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 S230256AbhJEAVM (ORCPT + 99 others); Mon, 4 Oct 2021 20:21:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230109AbhJEAVH (ORCPT ); Mon, 4 Oct 2021 20:21:07 -0400 Received: from bombadil.infradead.org (unknown [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83591C061749; Mon, 4 Oct 2021 17:19:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=UGnZuFAcpMUOmEXXyT7AcnFvYR5lLxeczg5QY3FKNLY=; b=xDuLagZaSCnZjjWpsOiriywC9q g+u74sCgC9CoPdFGVR0t42o4iAhCEdnEvihJKNkIu2EL9QrE1QTjl8AyvhD8AldymGBa1cJeSoR8N eLYSl+pNq9KgPCL6mVJ0tvZhvBbMuqfAdOciUzHwzIXOdcdmkaaytVKnP4qb02eI2dvzDSOGA0Utv 393asZkp1N9cxRMsDvvvzkxfdThCLTQfkiHX8LHJe+lLJpk8lxCT4ICvBNzNLj5Fz+XCfFeQYUxcY et+h6Y6rzbz1/KYQZVGnPAKi2dsJ7w/9MXWdTO02aOszs1qp81fhFZghpkwH3nhTz2sz0/VCZRWmm o3UlF5nQ==; Received: from [2601:1c0:6280:3f0::aa0b] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXYAv-008SGi-35; Tue, 05 Oct 2021 00:19:17 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Yoshinori Sato , Rich Felker , linux-sh@vger.kernel.org, John Paul Adrian Glaubitz , Geert Uytterhoeven Subject: [PATCH 4/5 v3] sh: define __BIG_ENDIAN for math-emu Date: Mon, 4 Oct 2021 17:19:13 -0700 Message-Id: <20211005001914.28574-5-rdunlap@infradead.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211005001914.28574-1-rdunlap@infradead.org> References: <20211005001914.28574-1-rdunlap@infradead.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Tested-by: John Paul Adrian Glaubitz --- v2: use same preprocessor method that nds32 does; add Geert's Reviewed-by; renumber patches; add more Cc's; v3: renumber, rebase, and resend; add Tested-by: JPAG; arch/sh/include/asm/sfp-machine.h | 8 ++++++++ 1 file changed, 8 insertions(+) --- linux-next-20211001.orig/arch/sh/include/asm/sfp-machine.h +++ linux-next-20211001/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