From patchwork Wed Mar 10 22:45:17 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 84723 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2AMkEo8006464 for ; Wed, 10 Mar 2010 22:46:54 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E3CEF9F65D; Wed, 10 Mar 2010 14:46:42 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from orsmga101.jf.intel.com (mga06.intel.com [134.134.136.21]) by gabe.freedesktop.org (Postfix) with ESMTP id 72E8B9F64E for ; Wed, 10 Mar 2010 14:46:23 -0800 (PST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 10 Mar 2010 14:43:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.49,616,1262592000"; d="scan'208";a="499618603" Received: from unknown (HELO localhost.localdomain) ([10.255.13.214]) by orsmga002.jf.intel.com with ESMTP; 10 Mar 2010 14:45:26 -0800 From: Chris Wilson To: intel-gfx@lists.freedesktop.org Date: Wed, 10 Mar 2010 22:45:17 +0000 Message-Id: <1268261124-13653-31-git-send-email-chris@chris-wilson.co.uk> X-Mailer: git-send-email 1.7.0 In-Reply-To: <1268261124-13653-1-git-send-email-chris@chris-wilson.co.uk> References: <1268261124-13653-1-git-send-email-chris@chris-wilson.co.uk> Subject: [Intel-gfx] [PATCH 30/37] io-mapping.h: Sparse __iomem annotations X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 10 Mar 2010 22:46:54 +0000 (UTC) diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h index bcee636..de638a3 100644 --- a/include/asm-generic/io.h +++ b/include/asm-generic/io.h @@ -258,7 +258,7 @@ static inline void __iomem *ioremap(phys_addr_t offset, unsigned long size) #define ioremap_wc ioremap_nocache #endif -static inline void iounmap(void *addr) +static inline void iounmap(void __iomem *addr) { } diff --git a/include/linux/io-mapping.h b/include/linux/io-mapping.h index 97eb928..08efda1 100644 --- a/include/linux/io-mapping.h +++ b/include/linux/io-mapping.h @@ -77,7 +77,7 @@ io_mapping_free(struct io_mapping *mapping) } /* Atomic map/unmap */ -static inline void * +static inline void __iomem * io_mapping_map_atomic_wc(struct io_mapping *mapping, unsigned long offset) { resource_size_t phys_addr; @@ -90,12 +90,12 @@ io_mapping_map_atomic_wc(struct io_mapping *mapping, unsigned long offset) } static inline void -io_mapping_unmap_atomic(void *vaddr) +io_mapping_unmap_atomic(void __iomem *vaddr) { iounmap_atomic(vaddr, KM_USER0); } -static inline void * +static inline void __iomem * io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset) { resource_size_t phys_addr; @@ -107,7 +107,7 @@ io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset) } static inline void -io_mapping_unmap(void *vaddr) +io_mapping_unmap(void __iomem *vaddr) { iounmap(vaddr); } @@ -118,39 +118,39 @@ io_mapping_unmap(void *vaddr) struct io_mapping; /* Create the io_mapping object*/ -static inline struct io_mapping * +static inline struct io_mapping __iomem * io_mapping_create_wc(resource_size_t base, unsigned long size) { - return (struct io_mapping *) ioremap_wc(base, size); + return (struct io_mapping __iomem *) ioremap_wc(base, size); } static inline void -io_mapping_free(struct io_mapping *mapping) +io_mapping_free(struct io_mapping __iomem *mapping) { iounmap(mapping); } /* Atomic map/unmap */ -static inline void * -io_mapping_map_atomic_wc(struct io_mapping *mapping, unsigned long offset) +static inline void __iomem * +io_mapping_map_atomic_wc(struct io_mapping __iomem *mapping, unsigned long offset) { - return ((char *) mapping) + offset; + return ((u8 __iomem *) mapping) + offset; } static inline void -io_mapping_unmap_atomic(void *vaddr) +io_mapping_unmap_atomic(void __iomem *vaddr) { } /* Non-atomic map/unmap */ -static inline void * -io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset) +static inline void __iomem * +io_mapping_map_wc(struct io_mapping __iomem *mapping, unsigned long offset) { - return ((char *) mapping) + offset; + return ((u8 __iomem *) mapping) + offset; } static inline void -io_mapping_unmap(void *vaddr) +io_mapping_unmap(void __iomem *vaddr) { }