From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758599AbaD2VWx (ORCPT ); Tue, 29 Apr 2014 17:22:53 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:51305 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756456AbaD2VVh (ORCPT ); Tue, 29 Apr 2014 17:21:37 -0400 From: John Stultz To: LKML Cc: John Stultz , Andrew Morton , Android Kernel Team , Johannes Weiner , Robert Love , Mel Gorman , Hugh Dickins , Dave Hansen , Rik van Riel , Dmitry Adamushko , Neil Brown , Andrea Arcangeli , Mike Hommey , Taras Glek , Jan Kara , KOSAKI Motohiro , Michel Lespinasse , Minchan Kim , Keith Packard , "linux-mm@kvack.org" Subject: [PATCH 1/4] swap: Cleanup how special swap file numbers are defined Date: Tue, 29 Apr 2014 14:21:20 -0700 Message-Id: <1398806483-19122-2-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1398806483-19122-1-git-send-email-john.stultz@linaro.org> References: <1398806483-19122-1-git-send-email-john.stultz@linaro.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The SWP_HWPOISON and SWP_MIGRATION numbers are defined in a fairly awkward way. Since they are stolen from the top few values of the 1<). As long as the enum values are added to the top of the enum instead of the bottom, the values for the types will be preserved. Cc: Andrew Morton Cc: Android Kernel Team Cc: Johannes Weiner Cc: Robert Love Cc: Mel Gorman Cc: Hugh Dickins Cc: Dave Hansen Cc: Rik van Riel Cc: Dmitry Adamushko Cc: Neil Brown Cc: Andrea Arcangeli Cc: Mike Hommey Cc: Taras Glek Cc: Jan Kara Cc: KOSAKI Motohiro Cc: Michel Lespinasse Cc: Minchan Kim Cc: Keith Packard Cc: linux-mm@kvack.org Signed-off-by: John Stultz --- include/linux/swap.h | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/include/linux/swap.h b/include/linux/swap.h index 3507115..a32c3da 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -49,29 +49,38 @@ static inline int current_is_kswapd(void) * actions on faults. */ +enum { + /* + * NOTE: We use the high bits here (subtracting from + * 1< Received: from mail-pa0-f51.google.com (mail-pa0-f51.google.com [209.85.220.51]) by kanga.kvack.org (Postfix) with ESMTP id 636346B0039 for ; Tue, 29 Apr 2014 17:21:38 -0400 (EDT) Received: by mail-pa0-f51.google.com with SMTP id fb1so836365pad.10 for ; Tue, 29 Apr 2014 14:21:37 -0700 (PDT) Received: from mail-pa0-f53.google.com (mail-pa0-f53.google.com [209.85.220.53]) by mx.google.com with ESMTPS id ci3si14300700pad.332.2014.04.29.14.21.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 29 Apr 2014 14:21:37 -0700 (PDT) Received: by mail-pa0-f53.google.com with SMTP id ld10so829261pab.12 for ; Tue, 29 Apr 2014 14:21:37 -0700 (PDT) From: John Stultz Subject: [PATCH 1/4] swap: Cleanup how special swap file numbers are defined Date: Tue, 29 Apr 2014 14:21:20 -0700 Message-Id: <1398806483-19122-2-git-send-email-john.stultz@linaro.org> In-Reply-To: <1398806483-19122-1-git-send-email-john.stultz@linaro.org> References: <1398806483-19122-1-git-send-email-john.stultz@linaro.org> Sender: owner-linux-mm@kvack.org List-ID: To: LKML Cc: John Stultz , Andrew Morton , Android Kernel Team , Johannes Weiner , Robert Love , Mel Gorman , Hugh Dickins , Dave Hansen , Rik van Riel , Dmitry Adamushko , Neil Brown , Andrea Arcangeli , Mike Hommey , Taras Glek , Jan Kara , KOSAKI Motohiro , Michel Lespinasse , Minchan Kim , Keith Packard , "linux-mm@kvack.org" The SWP_HWPOISON and SWP_MIGRATION numbers are defined in a fairly awkward way. Since they are stolen from the top few values of the 1<). As long as the enum values are added to the top of the enum instead of the bottom, the values for the types will be preserved. Cc: Andrew Morton Cc: Android Kernel Team Cc: Johannes Weiner Cc: Robert Love Cc: Mel Gorman Cc: Hugh Dickins Cc: Dave Hansen Cc: Rik van Riel Cc: Dmitry Adamushko Cc: Neil Brown Cc: Andrea Arcangeli Cc: Mike Hommey Cc: Taras Glek Cc: Jan Kara Cc: KOSAKI Motohiro Cc: Michel Lespinasse Cc: Minchan Kim Cc: Keith Packard Cc: linux-mm@kvack.org Signed-off-by: John Stultz --- include/linux/swap.h | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/include/linux/swap.h b/include/linux/swap.h index 3507115..a32c3da 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -49,29 +49,38 @@ static inline int current_is_kswapd(void) * actions on faults. */ +enum { + /* + * NOTE: We use the high bits here (subtracting from + * 1< email@kvack.org