[ewg] [PATCH] OFED/kernel_addons - add for_each_sg() macro
Ralph Campbell
ralph.campbell at qlogic.com
Thu Nov 1 18:46:49 PDT 2007
The ib_ipath driver calls the for_each_sg() macro so define it in the
kernel_addons include directory for 2.6.23 and earlier kernels.
This can be pulled from git://git.openfabrics.org/~ralphc/linux-2.6/.git
Signed-off-by: Ralph Campbell <ralph.campbell at qlogic.com>
diff --git a/kernel_addons/backport/2.6.23/include/linux/scatterlist.h b/kernel_addons/backport/2.6.23/include/linux/scatterlist.h
index 6e1fbf5..2bdbb18 100644
--- a/kernel_addons/backport/2.6.23/include/linux/scatterlist.h
+++ b/kernel_addons/backport/2.6.23/include/linux/scatterlist.h
@@ -6,4 +6,7 @@
#define sg_init_table(a, b)
#define sg_set_page(a, b) ((a)->page) = (b)
+#define for_each_sg(sglist, sg, nr, __i) \
+ for (__i = 0, sg = (sglist); __i < (nr); __i++, sg++)
+
#endif
More information about the ewg
mailing list