[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <059f01d179b7$bc811fd0$35835f70$@alibaba-inc.com>
Date: Wed, 09 Mar 2016 11:57:00 +0800
From: "Hillf Danton" <hillf.zj@...baba-inc.com>
To: "'Michal Hocko'" <mhocko@...nel.org>,
"'Andrew Morton'" <akpm@...ux-foundation.org>
Cc: "'Hugh Dickins'" <hughd@...gle.com>,
"'Sergey Senozhatsky'" <sergey.senozhatsky.work@...il.com>,
"'Vlastimil Babka'" <vbabka@...e.cz>,
"'Linus Torvalds'" <torvalds@...ux-foundation.org>,
"'Johannes Weiner'" <hannes@...xchg.org>,
"'Mel Gorman'" <mgorman@...e.de>,
"'David Rientjes'" <rientjes@...gle.com>,
"'Tetsuo Handa'" <penguin-kernel@...ove.SAKURA.ne.jp>,
"'KAMEZAWA Hiroyuki'" <kamezawa.hiroyu@...fujitsu.com>,
"'Joonsoo Kim'" <js1304@...il.com>, <linux-mm@...ck.org>,
"'LKML'" <linux-kernel@...r.kernel.org>,
"'Michal Hocko'" <mhocko@...e.com>
Subject: Re: [PATCH 2/3] mm, compaction: cover all compaction mode in compact_zone
>
> From: Michal Hocko <mhocko@...e.com>
>
> the compiler is complaining after "mm, compaction: change COMPACT_
> constants into enum"
>
> mm/compaction.c: In function ‘compact_zone’:
> mm/compaction.c:1350:2: warning: enumeration value ‘COMPACT_DEFERRED’ not handled in switch [-Wswitch]
> switch (ret) {
> ^
> mm/compaction.c:1350:2: warning: enumeration value ‘COMPACT_COMPLETE’ not handled in switch [-Wswitch]
> mm/compaction.c:1350:2: warning: enumeration value ‘COMPACT_NO_SUITABLE_PAGE’ not handled in switch [-Wswitch]
> mm/compaction.c:1350:2: warning: enumeration value ‘COMPACT_NOT_SUITABLE_ZONE’ not handled in switch [-Wswitch]
> mm/compaction.c:1350:2: warning: enumeration value ‘COMPACT_CONTENDED’ not handled in switch [-Wswitch]
>
> compaction_suitable is allowed to return only COMPACT_PARTIAL,
> COMPACT_SKIPPED and COMPACT_CONTINUE so other cases are simply
> impossible. Put a VM_BUG_ON to catch an impossible return value.
>
> Signed-off-by: Michal Hocko <mhocko@...e.com>
> ---
Acked-by: Hillf Danton <hillf.zj@...baba-inc.com>
Powered by blists - more mailing lists