Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754169AbcCHOTh (ORCPT ); Tue, 8 Mar 2016 09:19:37 -0500 Received: from mx2.suse.de ([195.135.220.15]:51773 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932240AbcCHOTU (ORCPT ); Tue, 8 Mar 2016 09:19:20 -0500 Subject: Re: [PATCH 1/3] mm, compaction: change COMPACT_ constants into enum To: Michal Hocko , Andrew Morton References: <20160307160838.GB5028@dhcp22.suse.cz> <1457444565-10524-1-git-send-email-mhocko@kernel.org> <1457444565-10524-2-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: <56DEDF63.7010509@suse.cz> Date: Tue, 8 Mar 2016 15:19:15 +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-2-git-send-email-mhocko@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 782 Lines: 23 On 03/08/2016 02:42 PM, Michal Hocko wrote: > From: Michal Hocko > > compaction code is doing weird dances between > COMPACT_FOO -> int -> unsigned long > > but there doesn't seem to be any reason for that. All functions which I vaguely recall trying this once and running into header dependency hell. But maybe it was something a bit different and involved storing a value in struct compact_control. > return/use one of those constants are not expecting any other value > so it really makes sense to define an enum for them and make it clear > that no other values are expected. > > This is a pure cleanup and shouldn't introduce any functional changes. > > Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Thanks.