Thread (62 messages) flat view 62 messages, 8 authors, 2009-07-02

Re: [PATCH 02/10] x86: add data structures for DMA-API debugging

From: Ingo Molnar <hidden>
Date: 2008-11-21 16:43:44
Also in: lkml

* Joerg Roedel [off-list ref] wrote:
+#ifndef __ASM_X86_DMA_DEBUG
+#define __ASM_X86_DMA_DEBUG
+
+/* Allocation flags */
+#define DMA_DEBUG_SINGLE        0
+#define DMA_DEBUG_SG            1
+#define DMA_DEBUG_COHERENT      2
please use enum for such internal flags, not define.
+
+struct device;
+struct list_head;
+
+struct dma_debug_entry {
+	struct list_head list;
+	struct device *dev;
+	int type;
+	void *cpu_addr;
+	u64 dev_addr;
+	u64 size;
+	int direction;
+};
please align new x86/include structures vertically like this:
+struct dma_debug_entry {
+	struct list_head	list;
+	struct device		*dev;
+	int			type;
+	void			*cpu_addr;
+	u64			dev_addr;
+	u64			size;
+	int			direction;
+};
[ for the arts major students reading lkml ;-) ]

	Ingo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help