Skip to contentSkip to conversation

static and __initdata symbols in credit2

PATCH In review Uma Sharma 2 participants 2 messages Jan 14, 2015

lore
Share & tools
lore

Uma Sharma

author
#0 lore raw

PATCH 1/1 static and __initdata symbols in credit2

Changing param varibales in sched_credit2.c as static and marking them as __initdata where required.

---

xen/common/sched_credit2.c +4 -4
index 1ca521b..581493d 100644
@@ -163,7 +163,7 @@
 #define CSFLAG_runq_migrate_request (1<<__CSFLAG_runq_migrate_request)
 
 
-int opt_migrate_resist=500;
+static int __initdata opt_migrate_resist=500;
 integer_param("sched_credit2_migrate_resist", opt_migrate_resist);
 
 /*
@@ -186,12 +186,12 @@ integer_param("sched_credit2_migrate_resist", opt_migrate_resist);
  *   to a load of 1.
  */
 #define LOADAVG_GRANULARITY_SHIFT (10)
-int opt_load_window_shift=18;
+static int __initdata opt_load_window_shift=18;
 #define  LOADAVG_WINDOW_SHIFT_MIN 4
 integer_param("credit2_load_window_shift", opt_load_window_shift);
-int opt_underload_balance_tolerance=0;
+static int __initdata opt_underload_balance_tolerance=0;
 integer_param("credit2_balance_under", opt_underload_balance_tolerance);
-int opt_overload_balance_tolerance=-3;
+static int __initdata opt_overload_balance_tolerance=-3;
 integer_param("credit2_balance_over", opt_overload_balance_tolerance);
 
 /*
#1 lore raw
Quoted 16 lines
Quoted 1 line
Quoted 1 line · On 14.01.15 at 16:11, <[email protected]> wrote:
xen/common/sched_credit2.c +1 -1
@@ -163,7 +163,7 @@
 #define CSFLAG_runq_migrate_request (1<<__CSFLAG_runq_migrate_request)
 
 
-int opt_migrate_resist=500;
+static int __initdata opt_migrate_resist=500;
 integer_param("sched_credit2_migrate_resist", opt_migrate_resist);
 
 /*
@@ -186,12 +186,12 @@ integer_param("sched_credit2_migrate_resist", opt_migrate_resist);
  *   to a load of 1.
  */
 #define LOADAVG_GRANULARITY_SHIFT (10)

xen/common/sched_credit2.c integer_param("sched_credit2_migrate_resist", opt_migrate_resist); · line 195

Quoted 10 lines
xen/common/sched_credit2.c +3 -3
-int opt_load_window_shift=18;
+static int __initdata opt_load_window_shift=18;
 #define  LOADAVG_WINDOW_SHIFT_MIN 4
 integer_param("credit2_load_window_shift", opt_load_window_shift);
-int opt_underload_balance_tolerance=0;
+static int __initdata opt_underload_balance_tolerance=0;
 integer_param("credit2_balance_under", opt_underload_balance_tolerance);
-int opt_overload_balance_tolerance=-3;
+static int __initdata opt_overload_balance_tolerance=-3;
 integer_param("credit2_balance_over", opt_overload_balance_tolerance);

All of them are being referenced by non-__init code, so can (and should) become static, but not __initdata.

And while you touch these, please also add the missing blanks around the =.

Jan