Skip to contentSkip to conversation

new kfifo API: undef temporary defines

PATCH New Stefani Seibold 1 participant 1 message Nov 26, 2009 Kfifo

lore
Share & tools
lore

Stefani Seibold

author maintainer
#0 lore raw

PATCH 1/1 new kfifo API: undef temporary defines

The following patch undef temporary used defines after the last usage.

The patch-set is against kfifo API v.07, which is currently included in the -mm tree

---
 kfifo.h |    5 +++++
 1 file changed, 5 insertions(+)
include/linux/kfifo.h +5 -0
diff -u -N -r -p kfifo7/include/linux/kfifo.h kfifo8/include/linux/kfifo.h
@@ -55,6 +55,7 @@ struct kfifo {
  * Macros for declaration and initialization of the kfifo datatype
  */
 
+/* helper macro */
 #define __kfifo_initializer(s, b) \
 	(struct kfifo) { \
 		.size	= s, \
@@ -102,6 +103,8 @@ union { \
 	unsigned char name##kfifo_buffer[size]; \
 	struct kfifo name = __kfifo_initializer(size, name##kfifo_buffer)
 
+#undef __kfifo_initializer
+
 extern void kfifo_init(struct kfifo *fifo, unsigned char *buffer,
 			unsigned int size);
 extern __must_check int kfifo_alloc(struct kfifo *fifo, unsigned int size,
@@ -293,6 +296,7 @@ static inline unsigned int __kfifo_peek_
 		l |= __KFIFO_GET(fifo, 1, 8);
 
 	return l;
+#undef	__KFIFO_GET
 }
 
 /**
@@ -312,6 +316,7 @@ static inline void __kfifo_poke_n(struct
 
 	if (--recsize)
 		__KFIFO_PUT(fifo, 1, n, 8);
+#undef	__KFIFO_PUT
 }
 
 /**