From patchwork Tue Oct 2 16:36:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 11963 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 9ECD323EFF for ; Tue, 2 Oct 2012 16:37:48 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 36E6EA1882F for ; Tue, 2 Oct 2012 16:37:48 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so14609099iej.11 for ; Tue, 02 Oct 2012 09:37:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-provags-id:x-gm-message-state; bh=0OviMyufMBiQVaqRiGM8w8VwyRITLvl5u1WoWV0xlAY=; b=ZsM9tMJdh92JzTCGxznH/S4l9O/Y5lWRE9ILF6gK7TJZJNUtAOqt9u9PcvLNGqHFbf BKASM2ekxHYSDG6WzTejkwduroMaCMVHyr0m3VcFh4/+6nCVTrK4xeKRCpv5O3dj6z4e MX8nl9FczUM2kZnXpPQQaXumcxReqiuvyV5NNMyEXSjSkTpGolJqWBC8egVRGib8R2A+ u/91Rti0uUFfNklovnadQsLEkrBBuvQrRqMAF3uQJcFxXh0W58wlcckj22gTL7yLI+CJ g3sWlNwnUGG5aQLduTuvvnKBbRNds9lxzKRNvcTb8zRFSVJbhvmS/aHxFELa13xTe3i9 rHVQ== Received: by 10.50.184.129 with SMTP id eu1mr9544851igc.0.1349195867988; Tue, 02 Oct 2012 09:37:47 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.232 with SMTP id ex8csp92132igc; Tue, 2 Oct 2012 09:37:47 -0700 (PDT) Received: by 10.216.119.6 with SMTP id m6mr9320736weh.215.1349195866708; Tue, 02 Oct 2012 09:37:46 -0700 (PDT) Received: from moutng.kundenserver.de (moutng.kundenserver.de. [212.227.17.9]) by mx.google.com with ESMTPS id d13si1714436wep.125.2012.10.02.09.37.46 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 02 Oct 2012 09:37:46 -0700 (PDT) Received-SPF: neutral (google.com: 212.227.17.9 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) client-ip=212.227.17.9; Authentication-Results: mx.google.com; spf=neutral (google.com: 212.227.17.9 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) smtp.mail=arnd@arndb.de Received: from localhost.localdomain (HSI-KBW-149-172-5-253.hsi13.kabel-badenwuerttemberg.de [149.172.5.253]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0M96Lt-1T8wa31edZ-00CHas; Tue, 02 Oct 2012 18:37:19 +0200 From: Arnd Bergmann To: linux-arm-kernel@infradead.org Cc: arm@kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann , Krzysztof Halasa , Daniel Silverstone , Ben Dooks Subject: [PATCH 16/17] ARM: ks8695: __arch_virt_to_dma type handling Date: Tue, 2 Oct 2012 18:36:55 +0200 Message-Id: <1349195816-2225-17-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1349195816-2225-1-git-send-email-arnd@arndb.de> References: <1349195816-2225-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:ePFyVg6pDwSeJiUdayjvUymbrAjbKv1IBGCeuv6WIOK v0OvWUCFTCOl08P14Avo/aJTSZst3xpMIuDz+TObrKl3R0BjSb cuWUDMiRL8rqblzaxXNbuxfQg3tIuthkXBE0Fk2PsWLiw12U4a 7/pUogjyPBVJzYtLjTHnO2lU7WyhO015/1SSuL5YFE7pRE6Y+X I7HWk+G9vjW1cp7/lmMiAuzOW4ASN+/hWKRGtMAFNbljQiZQHg 7nEn1jllxxlKfiRa6gwodamHq/juzs7MCmKQPBWAwxjKf0vMwF nQcE12606kIHEiqd6P2nwrpJRhhdCPereIcoGwymC0Q8DJI/zH iuDxvWdkGnV/a4dsTsVZgo6i+LC4STB2v9X6E4ts4gP8UfBVFt yUlb4CuaVNP+Q== X-Gm-Message-State: ALoCoQk7NqlMf2GHGCZQ4Bf0DRTH/ThB+WsjG/xt8eHYrBbSlMv7IzgXJ6X5eSlcrvfwoSjKr8yA __arch_virt_to_dma expects a virtual address pointer, but the ks8695 implementation of this macro treats it as an integer. Adding a type cast avoids hundreds of identical warning messages. Without this patch, building acs5k_defconfig results in: arch/arm/include/asm/dma-mapping.h: In function 'virt_to_dma': arch/arm/include/asm/dma-mapping.h:60:2: warning: passing argument 1 of '__virt_to_phys' makes integer from pointer without a cast [enabled by default] arch/arm/include/asm/memory.h:172:60: note: expected 'long unsigned int' but argument is of type 'void *' In file included from include/linux/dma-mapping.h:73:0, from include/linux/skbuff.h:33, from security/commoncap.c:21: Signed-off-by: Arnd Bergmann Cc: Krzysztof Halasa Cc: Daniel Silverstone Cc: Ben Dooks --- arch/arm/mach-ks8695/include/mach/memory.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-ks8695/include/mach/memory.h b/arch/arm/mach-ks8695/include/mach/memory.h index f7e1b9b..95e731a 100644 --- a/arch/arm/mach-ks8695/include/mach/memory.h +++ b/arch/arm/mach-ks8695/include/mach/memory.h @@ -34,7 +34,8 @@ extern struct bus_type platform_bus_type; #define __arch_dma_to_virt(dev, x) ({ (void *) (is_lbus_device(dev) ? \ __phys_to_virt(x) : __bus_to_virt(x)); }) #define __arch_virt_to_dma(dev, x) ({ is_lbus_device(dev) ? \ - (dma_addr_t)__virt_to_phys(x) : (dma_addr_t)__virt_to_bus(x); }) + (dma_addr_t)__virt_to_phys((unsigned long)x) \ + : (dma_addr_t)__virt_to_bus(x); }) #define __arch_pfn_to_dma(dev, pfn) \ ({ dma_addr_t __dma = __pfn_to_phys(pfn); \ if (!is_lbus_device(dev)) \