Skip to contentSkip to conversation

Add missing extern to heap_free declaration

PATCH In review Sebastien JAN 2 participants 3 messages May 26, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add missing extern to heap_free declaration

From: Sebastien Jan <[email protected]>

heap_free() function is defined in lib/prio_heap.c

---
 include/linux/prio_heap.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/linux/prio_heap.h +1 -1
index 0809435..fd67387 100644
@@ -36,7 +36,7 @@ extern int heap_init(struct ptr_heap *heap, size_t size, gfp_t gfp_mask,
  * heap_free - release a heap's storage
  * @heap: the heap structure whose data should be released
  */
-void heap_free(struct ptr_heap *heap);
+extern void heap_free(struct ptr_heap *heap);
 
 /**
  * heap_insert - insert a value into the heap and return any overflowed value
Signature · 1 line
1.6.3.3
#1 lore raw

include/linux/prio_heap.h extern int heap_init(struct ptr_heap *heap, size_t size, gfp_t gfp_mask, · line 39

Quoted 6 lines · Sebastien JAN

heap_free() function is defined in lib/prio_heap.c

include/linux/prio_heap.h +1 -1
-void heap_free(struct ptr_heap *heap);
+extern void heap_free(struct ptr_heap *heap);

This is totally unneeded.

In fact, externless prototypes are better.

#2 lore raw
Quoted 12 lines · On Wednesday 26 May 2010 20:35:01 Alexey Dobriyan wrote:

include/linux/prio_heap.h extern int heap_init(struct ptr_heap *heap, size_t size, gfp_t gfp_mask, · line 39

Quoted 6 lines · Sebastien JAN

heap_free() function is defined in lib/prio_heap.c

include/linux/prio_heap.h +1 -1
-void heap_free(struct ptr_heap *heap);
+extern void heap_free(struct ptr_heap *heap);

This is totally unneeded.

In fact, externless prototypes are better.

The attempt was to have a unified way of declaring the functions in this file since the other functions have the 'export'.