Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933409AbbHLOpt (ORCPT ); Wed, 12 Aug 2015 10:45:49 -0400 Received: from resqmta-ch2-01v.sys.comcast.net ([69.252.207.33]:38194 "EHLO resqmta-ch2-01v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753034AbbHLOpr (ORCPT ); Wed, 12 Aug 2015 10:45:47 -0400 Date: Wed, 12 Aug 2015 09:45:45 -0500 (CDT) From: Christoph Lameter X-X-Sender: cl@east.gentwo.org To: Mel Gorman cc: Linux-MM , Johannes Weiner , Rik van Riel , Vlastimil Babka , David Rientjes , Joonsoo Kim , Michal Hocko , LKML Subject: Re: [PATCH 05/10] mm, page_alloc: Use masks and shifts when converting GFP flags to migrate types In-Reply-To: <1439376335-17895-6-git-send-email-mgorman@techsingularity.net> Message-ID: References: <1439376335-17895-1-git-send-email-mgorman@techsingularity.net> <1439376335-17895-6-git-send-email-mgorman@techsingularity.net> Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 812 Lines: 18 On Wed, 12 Aug 2015, Mel Gorman wrote: > @@ -149,14 +150,15 @@ struct vm_area_struct; > /* Convert GFP flags to their corresponding migrate type */ > static inline int gfpflags_to_migratetype(const gfp_t gfp_flags) > { > - WARN_ON((gfp_flags & GFP_MOVABLE_MASK) == GFP_MOVABLE_MASK); > + VM_WARN_ON((gfp_flags & GFP_MOVABLE_MASK) == GFP_MOVABLE_MASK); > + BUILD_BUG_ON(1UL << GFP_MOVABLE_SHIFT != ___GFP_MOVABLE); > + BUILD_BUG_ON(___GFP_MOVABLE >> GFP_MOVABLE_SHIFT != MIGRATE_MOVABLE); Add some parenthesis here. Difficult to read. Compiler takes this as is? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/