From patchwork Fri Sep 22 03:46:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 113945 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp2797475qgf; Thu, 21 Sep 2017 20:48:25 -0700 (PDT) X-Google-Smtp-Source: AOwi7QBxzuAbGzvNFOfdEgaAmIV0oc+XGQ+aXTDXjlVr9wWSF0DOcjKm+jGk8BCKEi1RLftwj2CM X-Received: by 10.98.31.155 with SMTP id l27mr7935405pfj.14.1506052105153; Thu, 21 Sep 2017 20:48:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506052105; cv=none; d=google.com; s=arc-20160816; b=RIGfUxmAU2YlzAYZKolwJSRDsPdlluajb57ATU6e2BcqZtHAn6Yj/KCzUGlYfu/b10 S/qyoIA6pyKTvz/Aqejhf//w+MLxHysLFZ39E4keUdk41l7zjFdNtDQWC/cGLQdFh6AI ogU2q72+mqzw7y9Z2C1CKs3Bj8Dh2D0/eytHyCcSAVYHLe0G9PvPreg3zfnHfe2TSiOY dLNfTWJDChBm4FZ0AKc6jqqRcPZ7Vokz1+3wQj6iQS/CW7EOfOJa9gROCK3COZ5AunBD i/BdYrPfP/oYHC4Ci7YE8tZR4lR6VqzT1+8xkBu7amkCUxhwQcFtME5MmSzVNIROXJ4n RJOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:references:in-reply-to:message-id:date:subject :to:from:dkim-signature:dkim-filter:dkim-signature :arc-authentication-results; bh=6s2Y3HjJQPnJrFK+WVE1QYk4raUPUqyYFpcrOtGmMKU=; b=XNx83m7rv8XcBuMrMW/m4rw8JKzn3/kEdaWJRJjX+U8RJIQYnoKavGGrwtkWpaET/n Ht1VbOWA4LYmexQFt9MfiCsf0CPl0Fvg3oh0Z7d9FESniEjvriu3Tl76M5ieoHcPAFhB m4UhATOwEDkcEWzYoW4FyEVbcDnWAikz3w/s+n7AE2Jmy4A3TMsV1f+wcoB8qogHFKv6 TX6EGG2FIui/w+akYginhKHVFkoQ0csZKzxrKgiAJF1JFQOg0rkBhta9EPnBy1+7LpLw k2Q9fjHMUfbzDmrFdHyBCuhvHwfmZ50EJyoGL3e0r8YMH9ccKtMrPTPwvuFb6Of8tE5y AWaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20170209 header.b=O4i1clAs; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=gK8ttR9e; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) smtp.mailfrom=linux-mtd-bounces+patch=linaro.org@lists.infradead.org Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [65.50.211.133]) by mx.google.com with ESMTPS id k27si1686824pgn.441.2017.09.21.20.48.25 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Sep 2017 20:48:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) client-ip=65.50.211.133; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20170209 header.b=O4i1clAs; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=gK8ttR9e; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 65.50.211.133 as permitted sender) smtp.mailfrom=linux-mtd-bounces+patch=linaro.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=6s2Y3HjJQPnJrFK+WVE1QYk4raUPUqyYFpcrOtGmMKU=; b=O4i1clAsgU7fig7idhAyIjzfIq x6bUNGSvwmJDXl4W3bSl3FNb3dBEWRlWtGl+B8TS+zbWtZ3xtqNJI4PEHx0vQ/e+1sC+D58kbsVm1 RfoM4Ot6fxQud0jqRQ4Q4lw/zWtyXqdEEX3EryOU013sB+s8oj6ayeTW7DqDqelcbEabE632fEVBz xNH+WKdeYvqz/bFRai6YWG8rXITuq9sNI9CgaDVrsvCr9WrvuEuaRYTPC9YzX163wRek5SgywLd2K lpr3oEBMO2RFtkWM8DiJ5TgJTmF3iJ99Nty/mcLJp/L/A7rdl5nb0oSCn3QGUEUGYMnHpWqgNTmdd WqFUwfOg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dvEws-0004fB-0Q; Fri, 22 Sep 2017 03:48:18 +0000 Received: from conuserg-09.nifty.com ([210.131.2.76]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dvEwJ-0004Fa-3K for linux-mtd@lists.infradead.org; Fri, 22 Sep 2017 03:47:45 +0000 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id v8M3kwAS029389; Fri, 22 Sep 2017 12:47:06 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com v8M3kwAS029389 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1506052027; bh=wmbV0VGRYDYqlpq9k7TR5Yr0qy0FTTPJUWitri53kgY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gK8ttR9egls/zULl3y2X/bVDtiymTRV/4SVTAZ6r9XhYPGeqvEBGPnpzvl49GFuyi BuUdxKxXGRxNTdKRSVuWQqH+MzkfaqHDkdJmme63nruKi3r1jqRJyWzUImAyFjrdxw l0x5SfIqkxvvk7tvxyzIg60jQ5Mx74FX439dXnmyvpazVZ0eRC4HkcbySoqHx1jwGd k9zbtUVaQguYuQz3nF+Wz7oXjsuBzryBjVJGmqCZjAeyG8oQSpj5a3+4NF+7f67YU7 NZGcMTQ60+XsBmgO7oP/jCdzedIv0vyMHncJU6gK35kSLsU6vvotIS9pMnr16/Wc2Q vVch/QI7mNEyg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-mtd@lists.infradead.org Subject: [PATCH v2 09/12] mtd: nand: denali: use upper/lower_32_bits() macro for clean-up Date: Fri, 22 Sep 2017 12:46:46 +0900 Message-Id: <1506052009-8285-10-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506052009-8285-1-git-send-email-yamada.masahiro@socionext.com> References: <1506052009-8285-1-git-send-email-yamada.masahiro@socionext.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170921_204743_466869_F61B486B X-CRM114-Status: UNSURE ( 9.72 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.2 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Boris Brezillon , Marek Vasut , Richard Weinberger , linux-kernel@vger.kernel.org, Masahiro Yamada , Cyrille Pitchen , Brian Norris , David Woodhouse MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+patch=linaro.org@lists.infradead.org I used (uint64_t) cast to avoid "right shift count >= width of type" warning. provides nice helpers to cater to it. The code will be cleaner, and easier to understand. Signed-off-by: Masahiro Yamada --- Changes in v2: - Newly added drivers/mtd/nand/denali.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.7.4 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c index 02ce310..e567ad9 100644 --- a/drivers/mtd/nand/denali.c +++ b/drivers/mtd/nand/denali.c @@ -469,10 +469,10 @@ static void denali_setup_dma64(struct denali_nand_info *denali, 0x01002000 | (64 << 16) | (write << 8) | page_count); /* 2. set memory low address */ - denali_host_write(denali, mode, dma_addr); + denali_host_write(denali, mode, lower_32_bits(dma_addr)); /* 3. set memory high address */ - denali_host_write(denali, mode, (uint64_t)dma_addr >> 32); + denali_host_write(denali, mode, upper_32_bits(dma_addr)); } static void denali_setup_dma32(struct denali_nand_info *denali,