[PATCH -tip] cpuset doesn't seem to be so const - Kernel

This is a discussion on [PATCH -tip] cpuset doesn't seem to be so const - Kernel ; This fixes a warning on last -tip: kernel/cpuset.c: Dans la fonction «scan_for_empty_cpusets» : kernel/cpuset.c:1932: attention : passing argument 1 of «list_add_tail» discards qualifiers from pointer target type Actually the struct cpuset *root passed in parameter to scan_for_empty_cpusets is not supposed ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: [PATCH -tip] cpuset doesn't seem to be so const

  1. [PATCH -tip] cpuset doesn't seem to be so const

    This fixes a warning on last -tip:

    kernel/cpuset.c: Dans la fonction «scan_for_empty_cpusets» :
    kernel/cpuset.c:1932: attention : passing argument 1 of «list_add_tail» discards qualifiers from pointer target type

    Actually the struct cpuset *root passed in parameter to scan_for_empty_cpusets
    is not supposed to be const since an entry is added on the tail of its list.
    Just correct the qualifier.

    Signed-off-by: Frederic Weisbecker
    ---
    kernel/cpuset.c | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)

    diff --git a/kernel/cpuset.c b/kernel/cpuset.c
    index 827cd9a..eab7bd6 100644
    --- a/kernel/cpuset.c
    +++ b/kernel/cpuset.c
    @@ -1921,7 +1921,7 @@ static void remove_tasks_in_empty_cpuset(struct cpuset *cs)
    * that has tasks along with an empty 'mems'. But if we did see such
    * a cpuset, we'd handle it just like we do if its 'cpus' was empty.
    */
    -static void scan_for_empty_cpusets(const struct cpuset *root)
    +static void scan_for_empty_cpusets(struct cpuset *root)
    {
    LIST_HEAD(queue);
    struct cpuset *cp; /* scans cpusets being updated */
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  2. Re: [PATCH -tip] cpuset doesn't seem to be so const


    * Frederic Weisbecker wrote:

    > This fixes a warning on last -tip:
    >
    > kernel/cpuset.c: Dans la fonction «scan_for_empty_cpusets» :
    > kernel/cpuset.c:1932: attention : passing argument 1 of «list_add_tail» discards qualifiers from pointer target type
    >
    > Actually the struct cpuset *root passed in parameter to scan_for_empty_cpusets
    > is not supposed to be const since an entry is added on the tail of its list.
    > Just correct the qualifier.
    >
    > Signed-off-by: Frederic Weisbecker


    applied to tip/sched/cpusets, thanks Frederic!

    Ingo
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

+ Reply to Thread