Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754111AbcCHOWW (ORCPT ); Tue, 8 Mar 2016 09:22:22 -0500 Received: from mx2.suse.de ([195.135.220.15]:52371 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751441AbcCHOWO (ORCPT ); Tue, 8 Mar 2016 09:22:14 -0500 Subject: Re: [PATCH 2/3] mm, compaction: cover all compaction mode in compact_zone To: Michal Hocko , Andrew Morton References: <20160307160838.GB5028@dhcp22.suse.cz> <1457444565-10524-1-git-send-email-mhocko@kernel.org> <1457444565-10524-3-git-send-email-mhocko@kernel.org> Cc: Hugh Dickins , Sergey Senozhatsky , Linus Torvalds , Johannes Weiner , Mel Gorman , David Rientjes , Tetsuo Handa , Hillf Danton , KAMEZAWA Hiroyuki , Joonsoo Kim , linux-mm@kvack.org, LKML , Michal Hocko From: Vlastimil Babka Message-ID: <56DEE014.4050409@suse.cz> Date: Tue, 8 Mar 2016 15:22:12 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <1457444565-10524-3-git-send-email-mhocko@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1157 Lines: 24 On 03/08/2016 02:42 PM, Michal Hocko wrote: > From: Michal Hocko > > the compiler is complaining after "mm, compaction: change COMPACT_ > constants into enum" Potentially a squash into that patch then? > 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 Acked-by: Vlastimil Babka