Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751512AbcCID5W (ORCPT ); Tue, 8 Mar 2016 22:57:22 -0500 Received: from mail113-249.mail.alibaba.com ([205.204.113.249]:34361 "EHLO us-alimail-mta2.hst.scl.en.alidc.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750932AbcCID5Q (ORCPT ); Tue, 8 Mar 2016 22:57:16 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R171e4;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e02c03310;MF=hillf.zj@alibaba-inc.com;NM=1;PH=DS;RN=15;SR=0;TI=SMTPD_----4atmcnW_1457495720; Reply-To: "Hillf Danton" From: "Hillf Danton" To: "'Michal Hocko'" , "'Andrew Morton'" Cc: "'Hugh Dickins'" , "'Sergey Senozhatsky'" , "'Vlastimil Babka'" , "'Linus Torvalds'" , "'Johannes Weiner'" , "'Mel Gorman'" , "'David Rientjes'" , "'Tetsuo Handa'" , "'KAMEZAWA Hiroyuki'" , "'Joonsoo Kim'" , , "'LKML'" , "'Michal Hocko'" References: <20160307160838.GB5028@dhcp22.suse.cz> <1457444565-10524-1-git-send-email-mhocko@kernel.org> <1457444565-10524-2-git-send-email-mhocko@kernel.org> In-Reply-To: <1457444565-10524-2-git-send-email-mhocko@kernel.org> Subject: Re: [PATCH 1/3] mm, compaction: change COMPACT_ constants into enum Date: Wed, 09 Mar 2016 11:55:20 +0800 Message-ID: <059d01d179b7$807f7db0$817e7910$@alibaba-inc.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQEsJDv3+1FHnSADFR0H56kaUO0LAQKbhTV4AcGp0lugeDxjAA== Content-Language: zh-cn Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 570 Lines: 18 > > 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 > 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: Hillf Danton