linux-mips
[Top] [All Lists]

[PATCH 5/8] MIPS: ip32, ip27, jazz: Make static functions in dma-coheren

To: linux-mips@linux-mips.org, ralf@linux-mips.org
Subject: [PATCH 5/8] MIPS: ip32, ip27, jazz: Make static functions in dma-coherence.h inline.
From: David Daney <ddaney@caviumnetworks.com>
Date: Fri, 1 Oct 2010 13:27:31 -0700
Cc: David Daney <ddaney@caviumnetworks.com>
In-reply-to: <1285964854-28659-1-git-send-email-ddaney@caviumnetworks.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1285964854-28659-1-git-send-email-ddaney@caviumnetworks.com>
Sender: linux-mips-bounce@linux-mips.org
Any function defined in a header file should be inline.  This helps us
avoid 'unused' compiler warnings when we include the files in more
places in subsequent patches.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
---
 arch/mips/include/asm/mach-ip27/dma-coherence.h |    4 ++--
 arch/mips/include/asm/mach-ip32/dma-coherence.h |    4 ++--
 arch/mips/include/asm/mach-jazz/dma-coherence.h |    8 ++++----
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/arch/mips/include/asm/mach-ip27/dma-coherence.h 
b/arch/mips/include/asm/mach-ip27/dma-coherence.h
index d3d0401..7aa5ef9 100644
--- a/arch/mips/include/asm/mach-ip27/dma-coherence.h
+++ b/arch/mips/include/asm/mach-ip27/dma-coherence.h
@@ -26,14 +26,14 @@ static inline dma_addr_t plat_map_dma_mem(struct device 
*dev, void *addr,
        return pa;
 }
 
-static dma_addr_t plat_map_dma_mem_page(struct device *dev, struct page *page)
+static inline dma_addr_t plat_map_dma_mem_page(struct device *dev, struct page 
*page)
 {
        dma_addr_t pa = dev_to_baddr(dev, page_to_phys(page));
 
        return pa;
 }
 
-static unsigned long plat_dma_addr_to_phys(struct device *dev,
+static inline unsigned long plat_dma_addr_to_phys(struct device *dev,
        dma_addr_t dma_addr)
 {
        return dma_addr & ~(0xffUL << 56);
diff --git a/arch/mips/include/asm/mach-ip32/dma-coherence.h 
b/arch/mips/include/asm/mach-ip32/dma-coherence.h
index 3785595..55123fc 100644
--- a/arch/mips/include/asm/mach-ip32/dma-coherence.h
+++ b/arch/mips/include/asm/mach-ip32/dma-coherence.h
@@ -37,7 +37,7 @@ static inline dma_addr_t plat_map_dma_mem(struct device *dev, 
void *addr,
        return pa;
 }
 
-static dma_addr_t plat_map_dma_mem_page(struct device *dev, struct page *page)
+static inline dma_addr_t plat_map_dma_mem_page(struct device *dev, struct page 
*page)
 {
        dma_addr_t pa;
 
@@ -50,7 +50,7 @@ static dma_addr_t plat_map_dma_mem_page(struct device *dev, 
struct page *page)
 }
 
 /* This is almost certainly wrong but it's what dma-ip32.c used to use  */
-static unsigned long plat_dma_addr_to_phys(struct device *dev,
+static inline unsigned long plat_dma_addr_to_phys(struct device *dev,
        dma_addr_t dma_addr)
 {
        unsigned long addr = dma_addr & RAM_OFFSET_MASK;
diff --git a/arch/mips/include/asm/mach-jazz/dma-coherence.h 
b/arch/mips/include/asm/mach-jazz/dma-coherence.h
index f93aee5..2a10920 100644
--- a/arch/mips/include/asm/mach-jazz/dma-coherence.h
+++ b/arch/mips/include/asm/mach-jazz/dma-coherence.h
@@ -12,23 +12,23 @@
 
 struct device;
 
-static dma_addr_t plat_map_dma_mem(struct device *dev, void *addr, size_t size)
+static inline dma_addr_t plat_map_dma_mem(struct device *dev, void *addr, 
size_t size)
 {
        return vdma_alloc(virt_to_phys(addr), size);
 }
 
-static dma_addr_t plat_map_dma_mem_page(struct device *dev, struct page *page)
+static inline dma_addr_t plat_map_dma_mem_page(struct device *dev, struct page 
*page)
 {
        return vdma_alloc(page_to_phys(page), PAGE_SIZE);
 }
 
-static unsigned long plat_dma_addr_to_phys(struct device *dev,
+static inline unsigned long plat_dma_addr_to_phys(struct device *dev,
        dma_addr_t dma_addr)
 {
        return vdma_log2phys(dma_addr);
 }
 
-static void plat_unmap_dma_mem(struct device *dev, dma_addr_t dma_addr,
+static inline void plat_unmap_dma_mem(struct device *dev, dma_addr_t dma_addr,
        size_t size, enum dma_data_direction direction)
 {
        vdma_free(dma_addr);
-- 
1.7.2.2


<Prev in Thread] Current Thread [Next in Thread>