ANDROID: sched: fix duplicate sched_group_energy const specifiers
authorGreg Hackmann <ghackmann@google.com>
Tue, 7 Mar 2017 18:37:56 +0000 (10:37 -0800)
committerGreg Hackmann <ghackmann@google.com>
Fri, 17 Mar 2017 16:26:10 +0000 (16:26 +0000)
EAS uses "const struct sched_group_energy * const" fairly consistently.
But a couple of places swap the "*" and second "const", making the
pointer mutable.

In the case of struct sched_group, "* const" would have been an error,
since init_sched_energy() writes to sd->groups->sge.

Change-Id: Ic6a8fcf99e65c0f25d9cc55c32625ef3ca5c9aca
Signed-off-by: Greg Hackmann <ghackmann@google.com>
kernel/sched/fair.c
kernel/sched/sched.h

index 3331f453a17f00716ddb20366d535f2fafcb192c..83cfb72b2d95a0ad3f32f9331077ef63a1e96ba1 100644 (file)
@@ -4919,7 +4919,7 @@ long group_norm_util(struct energy_env *eenv, struct sched_group *sg)
 }
 
 static int find_new_capacity(struct energy_env *eenv,
-       const struct sched_group_energy const *sge)
+       const struct sched_group_energy * const sge)
 {
        int idx;
        unsigned long util = group_max_util(eenv);
index 2f2b959ad24485ca8eaf2907b2fc66d58e04bc33..780522c65cea170b640ede23dc977f60147c130f 100644 (file)
@@ -915,7 +915,7 @@ struct sched_group {
 
        unsigned int group_weight;
        struct sched_group_capacity *sgc;
-       const struct sched_group_energy const *sge;
+       const struct sched_group_energy *sge;
 
        /*
         * The CPUs this group covers.