]> xenbits.xensource.com Git - people/sstabellini/xen-unstable.git/.git/commitdiff
xen/sched: Constify name and opt_name in struct scheduler
authorJulien Grall <jgrall@amazon.com>
Tue, 6 Apr 2021 18:34:08 +0000 (19:34 +0100)
committerJulien Grall <jgrall@amazon.com>
Tue, 6 Apr 2021 19:03:10 +0000 (20:03 +0100)
Both name and opt_name are pointing to literal string. So mark both of
the fields as const.

Signed-off-by: Julien Grall <jgrall@amazon.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: George Dunlap <george.dunlap@citrix.com>
xen/common/sched/private.h

index 92d0d4961063f917f9de33c6bbb0a5c6e5e4841f..a870320146ef39ab171e59e67029cf048260db25 100644 (file)
@@ -272,8 +272,8 @@ static inline spinlock_t *pcpu_schedule_trylock(unsigned int cpu)
 }
 
 struct scheduler {
-    char *name;             /* full name for this scheduler      */
-    char *opt_name;         /* option name for this scheduler    */
+    const char *name;       /* full name for this scheduler      */
+    const char *opt_name;   /* option name for this scheduler    */
     unsigned int sched_id;  /* ID for this scheduler             */
     void *sched_data;       /* global data pointer               */
     struct cpupool *cpupool;/* points to this scheduler's pool   */