linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: linuxppc-dev@ozlabs.org
Subject: [PATCH] Replace a few #defines with empty inline functions
Date: Wed,  1 Aug 2007 17:41:15 +0200	[thread overview]
Message-ID: <11859828792347-git-send-email-segher@kernel.crashing.org> (raw)
Message-ID: <4533e849af9996f5f9ce038e37bf67c4c9012a87.1185982410.git.segher@kernel.crashing.org> (raw)
In-Reply-To: <11859828781513-git-send-email-segher@kernel.crashing.org>

...so that GCC doesn't complain about unused variables in the
callers of these.

Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org>
---
 include/asm-powerpc/dma-mapping.h |   24 ++++++++++++++++++------
 1 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/include/asm-powerpc/dma-mapping.h b/include/asm-powerpc/dma-mapping.h
index f6bd804..22b3c40 100644
--- a/include/asm-powerpc/dma-mapping.h
+++ b/include/asm-powerpc/dma-mapping.h
@@ -249,8 +249,12 @@ dma_map_single(struct device *dev, void *ptr, size_t size,
 	return virt_to_bus(ptr);
 }
 
-/* We do nothing. */
-#define dma_unmap_single(dev, addr, size, dir)	((void)0)
+static inline void dma_unmap_single(struct device *dev, dma_addr_t dma_addr,
+				    size_t size,
+				    enum dma_data_direction direction)
+{
+	/* We do nothing. */
+}
 
 static inline dma_addr_t
 dma_map_page(struct device *dev, struct page *page,
@@ -264,8 +268,12 @@ dma_map_page(struct device *dev, struct page *page,
 	return page_to_bus(page) + offset;
 }
 
-/* We do nothing. */
-#define dma_unmap_page(dev, handle, size, dir)	((void)0)
+static inline void dma_unmap_page(struct device *dev, dma_addr_t dma_address,
+				  size_t size,
+				  enum dma_data_direction direction)
+{
+	/* We do nothing. */
+}
 
 static inline int
 dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
@@ -284,8 +292,12 @@ dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
 	return nents;
 }
 
-/* We don't do anything here. */
-#define dma_unmap_sg(dev, sg, nents, dir)	((void)0)
+static inline void dma_unmap_sg(struct device *dev, struct scatterlist *sg,
+				int nhwentries,
+				enum dma_data_direction direction)
+{
+	/* We don't do anything here. */
+}
 
 #endif /* CONFIG_PPC64 */
 
-- 
1.5.2.1.144.gabc40-dirty

  reply	other threads:[~2007-08-01 15:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <576c3a210d014003c9d4b26f02a95099346f6716.1185982433.git.segher@kernel.crashing.org>
2007-08-01 15:41 ` [PATCH] Fix a compile warning in pci_32.c Segher Boessenkool
     [not found]   ` <e774fa79388836788a57b8722999effa0392a536.1185982428.git.segher@kernel.crashing.org>
2007-08-01 15:41     ` [PATCH] Fix a compile warning in powermac/feature.c Segher Boessenkool
     [not found]       ` <4533e849af9996f5f9ce038e37bf67c4c9012a87.1185982410.git.segher@kernel.crashing.org>
2007-08-01 15:41         ` Segher Boessenkool [this message]
     [not found]           ` <a2e1409163c00627f53c305f28b6d5feb530d96c.1185982424.git.segher@kernel.crashing.org>
2007-08-01 15:41             ` [PATCH] ide/ppc/pmac: Remove a few unused variables Segher Boessenkool

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11859828792347-git-send-email-segher@kernel.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).