* + dma-mappingh-add-the-dma_unmap-state-api-fix.patch added to -mm tree
@ 2010-03-03 23:05 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2010-03-03 23:05 UTC (permalink / raw)
To: mm-commits; +Cc: fujita.tomonori, James.Bottomley, arnd, davem, jbarnes
The patch titled
dma-mappingh-add-the-dma_unmap-state-api-fix
has been added to the -mm tree. Its filename is
dma-mappingh-add-the-dma_unmap-state-api-fix.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
Subject: dma-mappingh-add-the-dma_unmap-state-api-fix
From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
- adding the semicolons at the end of DECLARE_DMA_UNMAP_{ADDR|LEN}
confuses people.
- they are "definitions", not "declarations".
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: James Bottomley <James.Bottomley@suse.de>
Cc: David S. Miller <davem@davemloft.net>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
Documentation/DMA-API.txt | 8 +++-----
include/linux/dma-mapping.h | 8 ++++----
include/linux/pci-dma.h | 12 ++++++------
3 files changed, 13 insertions(+), 15 deletions(-)
diff -puN Documentation/DMA-API.txt~dma-mappingh-add-the-dma_unmap-state-api-fix Documentation/DMA-API.txt
--- a/Documentation/DMA-API.txt~dma-mappingh-add-the-dma_unmap-state-api-fix
+++ a/Documentation/DMA-API.txt
@@ -484,7 +484,7 @@ portable API) the following facilities a
Actually, instead of describing the macros one by one, we'll
transform some example code.
-1) Use DECLARE_DMA_UNMAP_{ADDR,LEN} in state saving structures.
+1) Use DEFINE_DMA_UNMAP_{ADDR,LEN} in state saving structures.
Example, before:
struct ring_state {
@@ -497,12 +497,10 @@ transform some example code.
struct ring_state {
struct sk_buff *skb;
- DECLARE_DMA_UNMAP_ADDR(mapping)
- DECLARE_DMA_UNMAP_LEN(len)
+ DEFINE_DMA_UNMAP_ADDR(mapping);
+ DEFINE_DMA_UNMAP_LEN(len);
};
-NOTE: DO NOT put a semicolon at the end of the DECLARE_*() macro.
-
2) Use dma_unmap_{addr,len}_set to set these values.
Example, before:
diff -puN include/linux/dma-mapping.h~dma-mappingh-add-the-dma_unmap-state-api-fix include/linux/dma-mapping.h
--- a/include/linux/dma-mapping.h~dma-mappingh-add-the-dma_unmap-state-api-fix
+++ a/include/linux/dma-mapping.h
@@ -233,15 +233,15 @@ struct dma_attrs;
#endif /* CONFIG_HAVE_DMA_ATTRS */
#ifdef CONFIG_NEED_DMA_MAP_STATE
-#define DECLARE_DMA_UNMAP_ADDR(ADDR_NAME) dma_addr_t ADDR_NAME;
-#define DECLARE_DMA_UNMAP_LEN(LEN_NAME) __u32 LEN_NAME;
+#define DEFINE_DMA_UNMAP_ADDR(ADDR_NAME) dma_addr_t ADDR_NAME
+#define DEFINE_DMA_UNMAP_LEN(LEN_NAME) __u32 LEN_NAME
#define dma_unmap_addr(PTR, ADDR_NAME) ((PTR)->ADDR_NAME)
#define dma_unmap_addr_set(PTR, ADDR_NAME, VAL) (((PTR)->ADDR_NAME) = (VAL))
#define dma_unmap_len(PTR, LEN_NAME) ((PTR)->LEN_NAME)
#define dma_unmap_len_set(PTR, LEN_NAME, VAL) (((PTR)->LEN_NAME) = (VAL))
#else
-#define DECLARE_DMA_MAP_ADDR(ADDR_NAME)
-#define DECLARE_DMA_UNMAP_LEN(LEN_NAME)
+#define DEFINE_DMA_MAP_ADDR(ADDR_NAME)
+#define DEFINE_DMA_UNMAP_LEN(LEN_NAME)
#define dma_unmap_addr(PTR, ADDR_NAME) (0)
#define dma_unmap_addr_set(PTR, ADDR_NAME, VAL) do { } while (0)
#define dma_unmap_len(PTR, LEN_NAME) (0)
diff -puN include/linux/pci-dma.h~dma-mappingh-add-the-dma_unmap-state-api-fix include/linux/pci-dma.h
--- a/include/linux/pci-dma.h~dma-mappingh-add-the-dma_unmap-state-api-fix
+++ a/include/linux/pci-dma.h
@@ -1,11 +1,11 @@
#ifndef _LINUX_PCI_DMA_H
#define _LINUX_PCI_DMA_H
-#define DECLARE_PCI_UNMAP_ADDR DECLARE_DMA_UNMAP_ADDR
-#define DECLARE_PCI_UNMAP_LEN DECLARE_DMA_UNMAP_LEN
-#define pci_unmap_addr dma_unmap_addr
-#define pci_unmap_addr_set dma_unmap_addr_set
-#define pci_unmap_len dma_unmap_len
-#define pci_unmap_len_set dma_unmap_len_set
+#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) DEFINE_DMA_UNMAP_ADDR(ADDR_NAME);
+#define DECLARE_PCI_UNMAP_LEN(LEN_NAME) DEFINE_DMA_UNMAP_LEN(LEN_NAME);
+#define pci_unmap_addr dma_unmap_addr
+#define pci_unmap_addr_set dma_unmap_addr_set
+#define pci_unmap_len dma_unmap_len
+#define pci_unmap_len_set dma_unmap_len_set
#endif
_
Patches currently in -mm which might be from fujita.tomonori@lab.ntt.co.jp are
origin.patch
linux-next.patch
scsi-add-__init-__exit-macros-to-ibmvstgtc.patch
frv-remove-pci_dma_sync_single-and-pci_dma_sync_sg.patch
documentation-dma-apitxt-remove-deprecated-function-descriptions.patch
dma-apitxt-add-dma_sync_single-sg-api-description.patch
dma-apitxt-remove-dma_sync_single_range-description.patch
alpha-remove-dma_sync_single_range.patch
um-remove-dma_sync_single_range.patch
pci-dma-add-include-linux-pci-dmah.patch
pci-dma-x86-use-include-linux-pci-dmah.patch
pci-dma-alpha-use-include-linux-pci-dmah.patch
pci-dma-arm-use-include-linux-pci-dmah.patch
pci-dma-frv-use-include-linux-pci-dmah.patch
pci-dma-ia64-use-include-linux-pci-dmah.patch
pci-dma-mips-use-include-linux-pci-dmah.patch
pci-dma-parisc-use-include-linux-pci-dmah.patch
pci-dma-powerpc-use-include-linux-pci-dmah.patch
pci-dma-sh-use-include-linux-pci-dmah.patch
pci-dma-sparc-use-include-linux-pci-dmah.patch
pci-dma-xtensa-use-include-linux-pci-dmah.patch
pci-dma-cris-use-include-linux-pci-dmah.patch
pci-dma-add-linux-pci-dmah-to-linux-pcih.patch
dma-mappingh-add-the-dma_unmap-state-api.patch
dma-mappingh-add-the-dma_unmap-state-api-fix.patch
frv-remove-the-obsolete-and-unnecessary-dma-api-comments.patch
frv-remove-the-obsolete-and-unnecessary-dma-api-comments-fix.patch
blackfin-remove-the-obsolete-and-unnecessary-dma-api-comments.patch
mn10300-remove-the-obsolete-and-unnecessary-dma-api-comments.patch
mn10300-remove-the-obsolete-and-unnecessary-dma-api-comments-fix.patch
dma-mapping-sparc-unify-32bit-and-64bit-dma_set_mask.patch
dma-mapping-alpha-use-include-linux-pci-dma-compath.patch
dma-mapping-pci-convert-pci_set_dma_mask-to-call-dma_set_mask.patch
dma-mapping-dma-mappingh-add-dma_set_coherent_mask.patch
dma-mapping-powerpc-use-generic-pci_set_dma_mask-and-pci_set_consistent_dma_mask.patch
dma-mapping-arm-use-generic-pci_set_dma_mask-and-pci_set_consistent_dma_mask.patch
dma-mapping-pci-move-pci_set_dma_mask-and-pci_set_consistent_dma_mask-to-pci-dma-compath.patch
dma-mapping-pci-move-pci_set_dma_mask-and-pci_set_consistent_dma_mask-to-pci-dma-compath-fix.patch
ssb-add-dma_dev-to-ssb_device-structure.patch
b43legacy-replace-the-ssb_dma-api-with-the-generic-dma-api.patch
b43-replace-the-ssb_dma-api-with-the-generic-dma-api.patch
b44-replace-the-ssb_dma-api-with-the-generic-dma-api.patch
ssb-remove-the-ssb-dma-api.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-03-03 23:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-03 23:05 + dma-mappingh-add-the-dma_unmap-state-api-fix.patch added to -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.