Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2513082imm; Mon, 28 May 2018 09:29:57 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoWsl5bZnNqaPd89gtT4ljIep19/PEBkzMRdJW5w2SBqKwwrb10uINZ03e5S5/atVX9YxDc X-Received: by 2002:a17:902:b205:: with SMTP id t5-v6mr14286212plr.343.1527524997624; Mon, 28 May 2018 09:29:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527524997; cv=none; d=google.com; s=arc-20160816; b=rGYUayDXox6MLlKXKslHjPryOAdDgTgAP2gimsF9YFjhVeI1EgO0lbX5khq9j61GzM DnREqoGR6xWOe8VjL88VMlrvRjoxW2ze2IlxaABv8MxlHY4nxqSQoEPHIuhwIh7b2Nuq odFOL8brxpmt2uOoCRkq/UkCLnxBT4m/jvaOc8Y+Zls1dEujPKXh2KNZxJYLQNS3l5ss 7ulu/RDmsKE1JhNedLFzM6C+yWSLzv0DX7dqIeEDGGLc/u1/Pntn78yfzeC6E3tpLRa1 gONafp3HqIiatlTk3YLGsCi1vGQPDSSm3XRFStZleTDm92m5oprQy/QfBk+r/G5Giixt EFnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=y0pBKsUAoFO/lXkob2kG7ObxZqQbPMEMOmfP+bod0i4=; b=CWd+lnQyv+8n8Uv8bFrkJRlrYP5ImIcx3B8DCorbqV91lIPJIzR4N9uOoUNarOtSiZ OSVnzj+Urlitn98jnMPH3pkKUUQS2ZctsSw0bwN+41cSGTckirNStokyoKnXFGMlhsQH 1BRLy6csMFZw2GdIpnOS5NelqQvjqMMSzeYwza23sYL22EnUlm3AZSc0R+8I288meSGn DOatyWhSo3O9ieJrIkzZV9xsQy15uWGy7bBMc1x+SA6aLF3xtY1tOrLz0jArx37ZNak4 6FD99doL7Wo/nS+hM3a5BgjpsQRXIvxYaH2VbJAeOj298UaEpvjXuflJXSj37kmXghf9 m/BQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=W/7AwoBw; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l1-v6si7443397pga.589.2018.05.28.09.29.42; Mon, 28 May 2018 09:29:57 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=W/7AwoBw; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1425406AbeE1Q3R (ORCPT + 99 others); Mon, 28 May 2018 12:29:17 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:53941 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1425368AbeE1Q3K (ORCPT ); Mon, 28 May 2018 12:29:10 -0400 Received: by mail-wm0-f67.google.com with SMTP id a67-v6so33359277wmf.3 for ; Mon, 28 May 2018 09:29:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=y0pBKsUAoFO/lXkob2kG7ObxZqQbPMEMOmfP+bod0i4=; b=W/7AwoBwFG79akUhSefOT+n5xPx5NdLqfuDNch9lV0LS6lsMUxeFVKWFxZVkDgaPQ4 H9wVgxu+4lkI4rtkqziOJeUV4ehd/q7NR9SP5JNi4XqszlzkL+QG3ZlUzrrU1wboR1ZO KDt/K5ZywzUZHfLvVKMpOfzd3lhPZ8zJIniaCqauRmzBlQVam0ydPH5ZDpMHMy9TxwSG 7TgfLRZo3BzGZvEZRgCkO08Qowyw5Qj5fFLd2nPLupysX2st8yY8rswaMRkU6FpNPWWI TafIS3ks0FYMrXXKcdflHghJ0/4Og6USQJRKxSuc8RqLmz2CHEYBm5zRg5CImj+wI/+m nmHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=y0pBKsUAoFO/lXkob2kG7ObxZqQbPMEMOmfP+bod0i4=; b=JuFAkI0PEC7KNWm+sTqMfbGx+quHREND6Nus3+Y8yOQPCCjcgpTede7jYjq3ikj9ue sWcwqDMPbIUuM9smtz7MwcX0TwAVQY3MN5T1/dpyOPKUQA3HF6tRHYaMa4xKmzsDOpja 6Qa6FlA/EOfhC2OzkQ+u0mr4mvMi1iGvlOIjU1MP/XPUlTzS8JH1w+yTwwQZfjopHBfa ew1WWIQCQ41E23CDiL2WQxaSUtP2XBdV346QD8MOfmWlhypZIx0b1WSrwd1Kc8iROE9n HaGNHWl1LUuNbZplkRtlAaYH34Mhp/hjBAVUpOiD2087ZEs1Bnr4wpaOPW4UUz+jK+NF O4qA== X-Gm-Message-State: ALKqPwcQ2tz3naiNfv69hnOQPam0EzDa3JUmz9uX+3uc66Tdrtr0gkt/ N6MkjRYknilyWWSkpP1+licU2E+6 X-Received: by 2002:a50:85c6:: with SMTP id q6-v6mr15429661edh.86.1527524949080; Mon, 28 May 2018 09:29:09 -0700 (PDT) Received: from localhost.localdomain ([2a02:a03f:40cd:8c00:54f4:f1a8:ec83:5053]) by smtp.gmail.com with ESMTPSA id c15-v6sm16334690edr.78.2018.05.28.09.29.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 May 2018 09:29:08 -0700 (PDT) From: Luc Van Oostenryck To: linux-kernel@vger.kernel.org, Greentime Hu , Vincent Chen Cc: Luc Van Oostenryck Subject: [PATCH] nds32: define __NDS32_E[BL]__ for sparse Date: Mon, 28 May 2018 18:29:02 +0200 Message-Id: <20180528162902.15358-1-luc.vanoostenryck@gmail.com> X-Mailer: git-send-email 2.17.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org nds32 depends on the macros '__NDS32_E[BL]__' to correctly select or define endian-specific macros, structures or pieces of code. These macros are predefined by the compiler but sparse knows nothing about them and thus may pre-process files differently from what GCC would. Fix this by adding '-D__NDS32_E[BL]__' to CHECKFLAGS. Signed-off-by: Luc Van Oostenryck --- arch/nds32/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/nds32/Makefile b/arch/nds32/Makefile index 513bb2e9b..031c67682 100644 --- a/arch/nds32/Makefile +++ b/arch/nds32/Makefile @@ -34,10 +34,12 @@ ifdef CONFIG_CPU_LITTLE_ENDIAN KBUILD_CFLAGS += $(call cc-option, -EL) KBUILD_AFLAGS += $(call cc-option, -EL) LDFLAGS += $(call cc-option, -EL) +CHECKFLAGS += -D__NDS32_EL__ else KBUILD_CFLAGS += $(call cc-option, -EB) KBUILD_AFLAGS += $(call cc-option, -EB) LDFLAGS += $(call cc-option, -EB) +CHECKFLAGS += -D__NDS32_EB__ endif boot := arch/nds32/boot -- 2.17.0