Skip to contentSkip to conversation

make marker_debug static

PATCH In review Adrian Bunk 2 participants 2 messages Feb 14, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 make marker_debug static

With the needlessly global marker_debug being static gcc can optimize the unused code away.

---
91577cc8ac60bf9003d0dd037a231db363003740 diff --git a/kernel/marker.c b/kernel/marker.c index c4c2cd8..133bdbb 100644

kernel/marker.c +1 -1
@@ -28,7 +28,7 @@ extern struct marker __start___markers[];
 extern struct marker __stop___markers[];
 
 /* Set to 1 to enable marker debug output */
-const int marker_debug;
+static const int marker_debug;
 
 /*
  * markers_mutex nests inside module_mutex. Markers mutex protects the builtin
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · * Adrian Bunk ([email protected]) wrote:

With the needlessly global marker_debug being static gcc can optimize the unused code away.

Thanks,

Quoted 15 lines

---
91577cc8ac60bf9003d0dd037a231db363003740 diff --git a/kernel/marker.c b/kernel/marker.c index c4c2cd8..133bdbb 100644

kernel/marker.c +1 -1
@@ -28,7 +28,7 @@ extern struct marker __start___markers[];
 extern struct marker __stop___markers[];
 
 /* Set to 1 to enable marker debug output */
-const int marker_debug;
+static const int marker_debug;
 
 /*
  * markers_mutex nests inside module_mutex. Markers mutex protects the builtin
Signature · 3 lines
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68