From patchwork Thu Jun 22 08:58:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 106193 Delivered-To: patch@linaro.org Received: by 10.182.29.35 with SMTP id g3csp17618obh; Thu, 22 Jun 2017 01:59:06 -0700 (PDT) X-Received: by 10.80.153.69 with SMTP id l5mr464084edb.7.1498121945889; Thu, 22 Jun 2017 01:59:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498121945; cv=none; d=google.com; s=arc-20160816; b=PsJddAz9j1Ynf4b3vvjsNbHdWzMvd+mo3Ws9OUXughzQBPd/5sSBBQhGu4+99frixL KUlX1j9cSiOUnx31gcpBA2WVYwH7l90W72h0SOllRIGm47v4QgOmjm4psRW1PQGP8Se0 dhNLVZeXl42zWjDwNYtcqWwp3WQH+K5+2YaPWzWF/IZVyX5Dbz+iV6ISjLwdG4EpNmpi 93LhTWmkgRR0P7E4alWREH0oVvHOlSFQT4UylPN6oVRHZwc7DTkSlslvzeowA/nLYpdb zHw92XHxIpu2q2YJ/FZ4lw+jDoJ+Hq1GLuyjIFG51VU6RJpGYXEjhnPGWuKGWrzxlhNk XXZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :dkim-filter:arc-authentication-results; bh=AWHwRu5FvLXeP7jEJcN1xD0zLpMSAxp/MpzlVYG/zbo=; b=rrKjKIkB/E6BwRTLieyx1tDmqZbMLHep+KslRGtZlXx1xaz7xfFcL6wLul5Oy4sss9 XwvGNrwjIUrhsvAnhzaH/oBAg3uvzCtWNtabTqipQMaEibBIVqJr7pZ+lTNSwZP+f9Kz 911vggMdV/eq5bPO8m+cAfTPDMJzCRm2zdv6/66Wvk9Q0/12Vm4L02cHuQnHZFn9Gnyr Ydetr96jmEEc3ADWy7eDzt/SejtC4kuSX1CaFcEpMvxzJVhcdAUva6v70oISL3JnCXPN LgiTXDQOxVZUXsc+q1oAU/tiR88zVIeoKtVukre96HGHa53v7zLZqYAc2v6TwXHzI1Ns 07bQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.b=PABwBaTx; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id k38si1248667edd.288.2017.06.22.01.59.05; Thu, 22 Jun 2017 01:59:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.b=PABwBaTx; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by lists.denx.de (Postfix, from userid 105) id 65A30C21C4E; Thu, 22 Jun 2017 08:58:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id B803FC21CE8; Thu, 22 Jun 2017 08:58:39 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 5F363C21CEA; Thu, 22 Jun 2017 08:58:27 +0000 (UTC) Received: from conuserg-10.nifty.com (conuserg-10.nifty.com [210.131.2.77]) by lists.denx.de (Postfix) with ESMTPS id 44FD2C21C4E for ; Thu, 22 Jun 2017 08:58:23 +0000 (UTC) Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-10.nifty.com with ESMTP id v5M8wBbP019885; Thu, 22 Jun 2017 17:58:11 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com v5M8wBbP019885 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1498121892; bh=phC+RmFzWWiz0OymEOwtJjfxVPEop7HsCF2XdOGV0No=; h=From:To:Cc:Subject:Date:From; b=PABwBaTxBvnvaPvMkk/rKd+cUE+947UYaElnkGWmtnBLv8Y92myXNrry6nuTzDZkb nzbBCHTVQ2RCMpqRPQO70GWbx21TvXRG47zBTYPdgqN3vvqbMfjXcKbK5nM92UR6w+ 05QHsFtW2HiEq9j9O4/YCI914RINMH+sivHfNywkh/e8vmKLlJ6U5XKshZdXvrNlLm GOoDqnQSs6mih0O65n07OVb+ZBDAEN+R/l466bitD+1T+vtTa+z9lwTdsC7XSE3UVK XjI3Fnp2TF1WoTUN+mEyzDsRqWcIMFzF9OUKW8QUCmgXX9sNJBXRRnnWvSKbaqiMbC 4lQtRbqYArXFg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Thu, 22 Jun 2017 17:58:09 +0900 Message-Id: <1498121889-17168-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Subject: [U-Boot] [PATCH] mmc: cadence: use fdt32_t for DT property value to fix sparse warning X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" DTB is encoded in big endian. When we retrieve property values, we need to use fdt32_to_cpu (aka be32_to_cpu) for endian conversion. This is a bit error-prone, but sparse is useful to detect endian mismatch. We need to use (fdt32_t *) instead of (u32 *) for a pointer of a property value. Otherwise sparse warns "cast to restricted __be32". Signed-off-by: Masahiro Yamada --- drivers/mmc/sdhci-cadence.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/sdhci-cadence.c b/drivers/mmc/sdhci-cadence.c index 4bd2623eaef9..f83c1d724108 100644 --- a/drivers/mmc/sdhci-cadence.c +++ b/drivers/mmc/sdhci-cadence.c @@ -92,7 +92,7 @@ static int sdhci_cdns_write_phy_reg(struct sdhci_cdns_plat *plat, static int sdhci_cdns_phy_init(struct sdhci_cdns_plat *plat, const void *fdt, int nodeoffset) { - const u32 *prop; + const fdt32_t *prop; int ret, i; for (i = 0; i < ARRAY_SIZE(sdhci_cdns_phy_cfgs); i++) {