Skip to contentSkip to conversation

dma: add dma_flags_set_dmaflush() to dma interface

PATCH In review [email protected] 2 participants 3 messages Sep 26, 2007 – Sep 28, 2007 DMA mapping helpers

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 dma: add dma_flags_set_dmaflush() to dma interface

Introduce the dma_flags_set_dmaflush() interface and give it a default no-op implementation.

Signature · 2 lines
 dma-mapping.h |    7 +++++++
 1 file changed, 7 insertions(+)
include/linux/dma-mapping.h +7 -0
index 2dc21cb..a0f27b9 100644
@@ -99,4 +99,11 @@ static inline void dmam_release_declared_memory(struct device *dev)
 }
 #endif /* ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY */
 
+#ifndef ARCH_CAN_REORDER_DMA
+static inline int
+dma_flags_set_dmaflush(int dir) {
+	return (dir);
+}
+#endif /* ARCH_CAN_REORDER_DMA */
+
 #endif
#1 lore raw

On Tue, 25 Sep 2007 17:00:57 -0700 [email protected] wrote:

[adding James Bottomley to cc: since I think he's interested in all of these patches]

Quoted 15 lines

Introduce the dma_flags_set_dmaflush() interface and give it a default no-op implementation.

Signature · 2 lines
 dma-mapping.h |    7 +++++++
 1 file changed, 7 insertions(+)
include/linux/dma-mapping.h +0 -0
index 2dc21cb..a0f27b9 100644
@@ -99,4 +99,11 @@ static inline void dmam_release_declared_memory(struct device *dev)
 }

include/linux/dma-mapping.h static inline void dmam_release_declared_memory(struct device *dev) · line 109

Quoted 10 lines
include/linux/dma-mapping.h +7 -0
 #endif /* ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY */
 
+#ifndef ARCH_CAN_REORDER_DMA
+static inline int
+dma_flags_set_dmaflush(int dir) {
+	return (dir);
+}
+#endif /* ARCH_CAN_REORDER_DMA */
+
 #endif

1. Function signature should be on one line if possible (and it is). Aw crud, I looked at dma-mapping.h and it uses this format sometimes. Well, it's undesirable, so please don't propagate it.

2. No parens on return: it's not a function.

static inline int dma_flags_set_dmaflush(int dir)

{
	return dir;
}

Similar comments for patch 2/4: sn-ia64.

---
~Randy
Phaedrus says that Quality is about caring.

#2 lore raw
Quoted 8 lines · Randy Dunlap

On Tue, 25 Sep 2007 17:00:57 -0700 [email protected] wrote:
......
1. Function signature should be on one line if possible (and it is). Aw crud, I looked at dma-mapping.h and it uses this format sometimes. Well, it's undesirable, so please don't propagate it.

2. No parens on return: it's not a function.

Quoted 8 lines

static inline int dma_flags_set_dmaflush(int dir)

{
	return dir;
}

Similar comments for patch 2/4: sn-ia64.

Both fixed in next version. Thanks, Randy.

Signature · 1 line
Arthur