From patchwork Wed Aug 8 21:27:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10604 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 578AF23F00 for ; Wed, 8 Aug 2012 21:28:17 +0000 (UTC) Received: from mail-gh0-f180.google.com (mail-gh0-f180.google.com [209.85.160.180]) by fiordland.canonical.com (Postfix) with ESMTP id 220BDA1891D for ; Wed, 8 Aug 2012 21:28:17 +0000 (UTC) Received: by ghbg10 with SMTP id g10so1334605ghb.11 for ; Wed, 08 Aug 2012 14:28:16 -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=0YYlT90TCYyX9+PiT4vug/vperNjiQ3Oh8+7i22YKG8=; b=TGKHjUUSMCvGZ/2kn0qSjyG78J+AR/FKtMEFvO+ScmBh1pVWNttGF+BUSTzsiuKBvE OtZsew2JWHn500Ce9jme1q2H8JxB8wxVgEvYWtFzGwZbBmbvXX3WwEST4SDLI/FW9KLj m8iz4HZSIxPzGe5yuWH4Q3xIGf4vrOuwgR6Vbt+EyTTpp+6jqEDLSpgkFaIAl4te1EnS Lp6TKg/kPctmQrNsjRItQ+kHw6ywO8p+uqpOp1M6AvgEGwvNhNzIvKwZAWJa1Elv4co8 DOkkFuPOgozFK4sb3wLIRmHYrCMkOgQ5OEr9KPDUfx+3PyPGQ24gl8kOG7N5trL/cSlM 8JPQ== Received: by 10.50.95.230 with SMTP id dn6mr365015igb.16.1344461296226; Wed, 08 Aug 2012 14:28:16 -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.200 with SMTP id ew8csp628837igc; Wed, 8 Aug 2012 14:28:15 -0700 (PDT) Received: by 10.180.100.37 with SMTP id ev5mr980584wib.5.1344461295110; Wed, 08 Aug 2012 14:28:15 -0700 (PDT) Received: from moutng.kundenserver.de (moutng.kundenserver.de. [212.227.126.171]) by mx.google.com with ESMTP id b49si31494764wel.56.2012.08.08.14.28.14; Wed, 08 Aug 2012 14:28:15 -0700 (PDT) Received-SPF: neutral (google.com: 212.227.126.171 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) client-ip=212.227.126.171; Authentication-Results: mx.google.com; spf=neutral (google.com: 212.227.126.171 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=mreu2) with ESMTP (Nemesis) id 0MJHCg-1T0rgp1oHi-0032Gt; Wed, 08 Aug 2012 23:28:09 +0200 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: arm@kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann Subject: [PATCH 02/10] ARM: ks8695: __arch_virt_to_dma type handling Date: Wed, 8 Aug 2012 23:27:50 +0200 Message-Id: <1344461278-28245-3-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1344461278-28245-1-git-send-email-arnd@arndb.de> References: <1344461278-28245-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:3Fsq7q2b9FTgdaNQGjXUaA5Ldo5tpv4TJEmC8WDDLVu 9X6AcWOgeSsk664zEvXhZLx1jUqrFw6FFI2/M+eNwdM3sPq/t9 6QhJhDr6AxVrj4sgoV3nHqX43tAsCcGdrXBeOziwXt2X8J/+yX 082Lak86NWg32l/EzwjYC0+t4YPmdDXfN3JIplB4ecv8KDuxZF q/L3+7ySKhGJUSVEvmqaBTHS75T6cbyCRO6FbwDPKSP78scec0 QiGhWpx89+SZ+ljiAy56ow9zzIDoq8Phoy2s71Lwmm+GMDMRiz KKJhCoys/jVa1Eqcn06i7QEzW/9ojCDDYoZ+WrBJOA6IfujSDe q8qzN0G5mM8u+dSLuGR+jOs7H9FTldKpxrlw8Y/XX+XK5JrtkT Dd9azYEObmTcw== X-Gm-Message-State: ALoCoQkWYHV3c5MiF3vQjJkaihhgPqGQC3xOAZ9A+qVi/yblUViuqdhdy5FCey7zR9394kqvNJds __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 --- 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)) \