From patchwork Thu Feb 4 14:29:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 8222471 Return-Path: X-Original-To: patchwork-linux-renesas-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 3BACDBEEE5 for ; Thu, 4 Feb 2016 14:29:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 42FFC2039D for ; Thu, 4 Feb 2016 14:29:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0D9AF2039C for ; Thu, 4 Feb 2016 14:29:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756916AbcBDO3m (ORCPT ); Thu, 4 Feb 2016 09:29:42 -0500 Received: from kirsty.vergenet.net ([202.4.237.240]:49148 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756731AbcBDO3m (ORCPT ); Thu, 4 Feb 2016 09:29:42 -0500 Received: from penelope.kanocho.kobe.vergenet.net (d54c0ad22.access.telenet.be [84.192.173.34]) by kirsty.vergenet.net (Postfix) with ESMTPSA id 2556525B7A4; Fri, 5 Feb 2016 01:29:40 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=verge.net.au; s=mail; t=1454596180; bh=hSVQtAPg1XcSyE1TJaUDNRGumcO2GW5oSOhzJO9P+Xg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FFHEIRhcDaXybsIyP2nQPGtbyqMyx0NvXhYfU3W6aLsKZCkYrShiW4gtatvIFbRSR aZXqXdbhpNTai7LJr9ScoeJOuSv7u1niri/OgJitYYwMEltvL0ALQqsrFpEgTSturQ udnNiTO41rHoFV1QFxFMkMWznylCGXr38jzFDqBM= Received: by penelope.kanocho.kobe.vergenet.net (Postfix, from userid 7100) id A851C60355; Fri, 5 Feb 2016 01:29:36 +1100 (AEDT) From: Simon Horman To: linux-renesas-soc@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Magnus Damm , Geert Uytterhoeven , Simon Horman Subject: [PATCH 1/4] ARM: shmobile: rcar-gen2: Make rcar_gen2_dma_contiguous static Date: Thu, 4 Feb 2016 15:29:32 +0100 Message-Id: <0c1690705417ac1b33f01125552349e3cfc9766d.1454595116.git.horms+renesas@verge.net.au> X-Mailer: git-send-email 2.7.0.rc3.207.g0ac5344 In-Reply-To: References: Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Geert Uytterhoeven make C=1: arch/arm/mach-shmobile/setup-rcar-gen2.c:186:12: warning: symbol 'rcar_gen2_dma_contiguous' was not declared. Should it be static? Make it static, and move it inside the function to avoid a "defined but not used" warning if CONFIG_DMA_CMA=n. Signed-off-by: Geert Uytterhoeven Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/setup-rcar-gen2.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-shmobile/setup-rcar-gen2.c b/arch/arm/mach-shmobile/setup-rcar-gen2.c index 9eccde3c7b13..6d0ebdfb03a2 100644 --- a/arch/arm/mach-shmobile/setup-rcar-gen2.c +++ b/arch/arm/mach-shmobile/setup-rcar-gen2.c @@ -182,8 +182,6 @@ static int __init rcar_gen2_scan_mem(unsigned long node, const char *uname, return 0; } -struct cma *rcar_gen2_dma_contiguous; - void __init rcar_gen2_reserve(void) { struct memory_reserve_config mrc; @@ -194,8 +192,11 @@ void __init rcar_gen2_reserve(void) of_scan_flat_dt(rcar_gen2_scan_mem, &mrc); #ifdef CONFIG_DMA_CMA - if (mrc.size && memblock_is_region_memory(mrc.base, mrc.size)) + if (mrc.size && memblock_is_region_memory(mrc.base, mrc.size)) { + static struct cma *rcar_gen2_dma_contiguous; + dma_contiguous_reserve_area(mrc.size, mrc.base, 0, &rcar_gen2_dma_contiguous, true); + } #endif }