Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp2979893pxv; Sun, 27 Jun 2021 15:09:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDnjv9ovwoPkkx2FxQF/rnhGq7w2S08K3Ih2xcG1ba85PSJD+1luU8LvZzYueEc30rJSAB X-Received: by 2002:a17:906:1951:: with SMTP id b17mr21603339eje.468.1624831779715; Sun, 27 Jun 2021 15:09:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624831779; cv=none; d=google.com; s=arc-20160816; b=pQNoZpvRvPnDALyBzIksfnFX2WZmCYX5CAIGzRXxqQrbAQAceBMQRFvQpoBGMr6qCe Zn1HbRIkWWS5JYbJU4WzFrrYbgjZPNWEbzO3g+VNZ/SpnnF9Ncxo+2IELjJ1ouqwcKRZ JLeiiPwtmzOxBpyje/B/hSyPz4Pinm1QdLBkmLiXQ7htXaaLCHQruIePd3CE/N6OJ3yC 19X15RuoY3h1B1coKDlEY18LxbGUVtMpmn/yIvdwebWOMlDiUoFEIKx75TULFaURJBWW gBGeelp1bIRH4nZsMi7ZwNOwCPdAzzT+mllp0zN6i9zRyyyyj9pW5I53P1oz2NTqjGbH GmNw== 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=Vu/ndYQMOJqJecFoLuEz9EoLGp5oGErVJi8DQQBuTNw=; b=ZdSof0wcYlvBD4RQREFx/PgRJzwyj202Ekp/580Or1asXnPIjB51/OrDee4xos6Jwe XxRPmsrYaVIyZvyHGTzuINf5oEkqi7UJM4kZst+xJkO3le1lqfOY1mGP4XBhVbrzvmit PRgZUw/ANO6fhPKKWq12gbQgLOLrDoKfSdRVXUUd+J4nWQW5d+9i5LY8qmz9jWRRLttH UG2S+5n2u46ufrKIxdfj2zXFhr6qT7cOzJvaV8VhDXKWGFyLCpJEfBmKRvu6QmVAMRLB /XpZQL5a5KUSjOldyrKRj2em8ZiHz+7tXEkzVutkwMtTdTWiZkRUs1bAvg4qZ74/B2At M9CQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b="eTM90/y9"; 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 ci20si11826335ejc.182.2021.06.27.15.09.17; Sun, 27 Jun 2021 15:09: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; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b="eTM90/y9"; 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 S231737AbhF0WIM (ORCPT + 99 others); Sun, 27 Jun 2021 18:08:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231700AbhF0WIM (ORCPT ); Sun, 27 Jun 2021 18:08:12 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 845FBC061574; Sun, 27 Jun 2021 15:05:47 -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=Vu/ndYQMOJqJecFoLuEz9EoLGp5oGErVJi8DQQBuTNw=; b=eTM90/y9eLAQstZ+ed1mUhE905 nPD8zjgzD1UX37bqcMnh70jmXq+itKiLNVI4iFoU1//cUBY/OYy0XjJ3ClL3NqQLxVuB1d0LjxtKQ 4gk9xX02RFenHUpA4MI3IGov/VuVpHp4B/y4JNPlod8q/RJkJ/005oFsRKorgTmO91QNZ+Zuji63J SBBLTHtHpHg/rV3UyIdKKvwAOHiWlvZsvk/G8YN94hbbamqsEbWL28q3oK/x5dl+xMtr/CXIUYkDW 2tzPWY3ORhSpyxMnj4Kv9TC0hPvFc0driWSehkACcMeX3/LkB4dD2sDimQyUDnStAZQFmg7D/Vmaz REMPRfCw==; Received: from [2601:1c0:6280:3f0::aefb] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1lxcuQ-006CHh-BY; Sun, 27 Jun 2021 22:05:46 +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 2/3 v2] sh: define __BIG_ENDIAN for math-emu Date: Sun, 27 Jun 2021 15:05:43 -0700 Message-Id: <20210627220544.8757-3-rdunlap@infradead.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210627220544.8757-1-rdunlap@infradead.org> References: <20210627220544.8757-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 --- 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