From patchwork Tue Dec 5 08:49:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 120627 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp5482110qgn; Tue, 5 Dec 2017 00:50:45 -0800 (PST) X-Google-Smtp-Source: AGs4zMbklHGh+CcxV1deUNf9Qt98xM7hz+0A+XX1SQyEbcN3m5XNcL/U5P++vrqMawA2hYwFCGhu X-Received: by 10.98.35.144 with SMTP id q16mr20722601pfj.13.1512463845815; Tue, 05 Dec 2017 00:50:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512463845; cv=none; d=google.com; s=arc-20160816; b=EyojRkEygav6cxGSVjGLrkAwiTvihWi0SJPo6bgJDBaMPkDFVlwxtiyeEsyv+w9oCt ceVBry3k/iQW7/BEZdnDy9i1teQTXigTaV+UMEkBgDX/37xLMBygOdKB45sWXsv2tMyN b2DkyPewG+bfN3Jq07OtEMv+UmDVLER+Lz5tFuGWmsZwBIP2t4a9MWsfLUT9688EQ+iw iMIgoeUWxFt6bre0wqHibRJYQVLPXbB0kPCz+qGGa4bxMV63BxDa1codBy1+ybB32A3f +ioWcAKZVc0+HFzYVv5QSgiCib+KJa2o7CoUD8vbzmvgayYLq8KqcZfdEnvnJeKUmEta xMkQ== 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:message-id:date:subject:to:from:dkim-signature :dkim-filter:dkim-signature:arc-authentication-results; bh=zc94oz14FStycUFMrQ1co1e88mDVU5xJy4iIaTcpwCc=; b=MsTe/G6k6AzLK41RGnOps1+j0Cni1wY8WYRASWHCN1nobmQdYdAICjTOk5OtMQZNqL bMNvBCwKpgyWVU1WPtofaN3hHuoxGP6/6DyscM/Z/ZP/By9fSqRJbaHdz98cSWe/uMqi HVeS+fw00mel7tgI3lbIZjwuCYboTjZaKD3dYgofyr6GQfLnDOPVFHSiEcVvJmVZsbei azTXBVKYSr6QZu+I4Iv3EJugEuP1vICQcNYOJ1yomqIU2BR8imsVJPBz4BkUpmuUAd/i +Dxjr+Ss9P78oaykYfMB5yi93RNFOCzvIXBNxJF0ckD3HMQo43pooMQEpnsFMZKrhYeh YO0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20170209 header.b=tg7UKe7f; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=fsb+vCPa; 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 m32si11059767pld.592.2017.12.05.00.50.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Dec 2017 00:50:45 -0800 (PST) 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=tg7UKe7f; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=fsb+vCPa; 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: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:In-Reply-To: References:List-Owner; bh=zc94oz14FStycUFMrQ1co1e88mDVU5xJy4iIaTcpwCc=; b=tg7 UKe7fg8ixhH2/KHLNBLniHlMbmrNKoT/68usAoqWGE1wXfwBzdlkcTwi+3yBD6LVqbXwfSHCNmGu+ Q4p2tIl0GqmFWcQYTpLuH+Vltc4vv73MKiO/oJuZtgzQVhuyasal0Gp+cXyBHe49cfaturgZ1Iytn i+SfNlJjnRB/KaxsrX/v+wS1Z+IKUcUNAoEhBiW/1EihDPfjnhPlYR9BuHrIJDkvOsLnMzSDuA/3D gmCjVIFAF5E+QNuEX8uXZUcFsL8qYsneK211Q1VP3Pbz/EfiI7YW4ShML7th9PsS923ZBeKuRVSmz vtDZSkJCe3my4bBdTD190ggI0e6Kvdg==; 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 1eM8w3-0006rr-KD; Tue, 05 Dec 2017 08:50:39 +0000 Received: from conuserg-07.nifty.com ([210.131.2.74]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eM8w0-0006pT-Qa for linux-mtd@lists.infradead.org; Tue, 05 Dec 2017 08:50:38 +0000 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-07.nifty.com with ESMTP id vB58nwKG015565; Tue, 5 Dec 2017 17:49:58 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com vB58nwKG015565 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1512463799; bh=TLvxsVw8la+lHLwZHnSxBssfQcBaaPxsRdrvdE7Ze+U=; h=From:To:Cc:Subject:Date:From; b=fsb+vCPamOdUCE1WZOsAXm3FNpTuxCiZF4h2lN2rR01KIIOQXyG5VE9pbROo5EFL+ qEXoa2otXXquZIqRn5gwjwSoPuOVrq0H9bcJgGIqK0Gn2nsgAUDcx+T8dTby8bHuwh xwl9hu/wc/C5sQ4yY1K3TQXkizyERjrU99hkhV405PO3mEvM5dBp1bO5Bl8XcpUVH5 VAVJAu44KCr7l7k13De/ZafscfHECmc5K87qh+t/CDCuHN3OxVCGuLKg4Yx/ZCWr8I T08lPfj9RhQAos0adkTs641lg3MGtsVF+1LsM553aJHAnZFJ//d1EDWGWFc2NwpRQY UFUQ3qr3+0qYg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-mtd@lists.infradead.org, Boris Brezillon Subject: [PATCH] mtd: nand: cafe: clean up DMA address setup Date: Tue, 5 Dec 2017 17:49:56 +0900 Message-Id: <1512463796-29174-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171205_005037_101170_85F0F3BF X-CRM114-Status: UNSURE ( 8.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: 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 Use macros from to make the code readable. The compiler warning will be kept suppressed. Signed-off-by: Masahiro Yamada --- drivers/mtd/nand/cafe_nand.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) -- 2.7.4 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ diff --git a/drivers/mtd/nand/cafe_nand.c b/drivers/mtd/nand/cafe_nand.c index add4613..2af5e35 100644 --- a/drivers/mtd/nand/cafe_nand.c +++ b/drivers/mtd/nand/cafe_nand.c @@ -737,12 +737,8 @@ static int cafe_nand_probe(struct pci_dev *pdev, } /* Set up DMA address */ - cafe_writel(cafe, cafe->dmaaddr & 0xffffffff, NAND_DMA_ADDR0); - if (sizeof(cafe->dmaaddr) > 4) - /* Shift in two parts to shut the compiler up */ - cafe_writel(cafe, (cafe->dmaaddr >> 16) >> 16, NAND_DMA_ADDR1); - else - cafe_writel(cafe, 0, NAND_DMA_ADDR1); + cafe_writel(cafe, lower_32_bits(cafe->dmaaddr), NAND_DMA_ADDR0); + cafe_writel(cafe, upper_32_bits(cafe->dmaaddr), NAND_DMA_ADDR1); cafe_dev_dbg(&cafe->pdev->dev, "Set DMA address to %x (virt %p)\n", cafe_readl(cafe, NAND_DMA_ADDR0), cafe->dmabuf);