Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1206178

Re: [PATCH 05/10] mm, page_alloc: Use masks and shifts when converting GFP flags to migrate types

From Christoph Lameter <cl@linux.com>
Newsgroups linux.kernel
Subject Re: [PATCH 05/10] mm, page_alloc: Use masks and shifts when converting GFP flags to migrate types
Date 2015-08-12 16:50 +0200
Message-ID <pWFvQ-7mW-17@gated-at.bofh.it> (permalink)
References <pWBLz-1Xg-7@gated-at.bofh.it> <pWBLA-1Xg-35@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 05/10] mm, page_alloc: Use masks and shifts when converting GFP flags to migrate types Mel Gorman <mgorman@techsingularity.net> - 2015-08-12 12:50 +0200
  Re: [PATCH 05/10] mm, page_alloc: Use masks and shifts when converting  GFP flags to migrate types Christoph Lameter <cl@linux.com> - 2015-08-12 16:50 +0200

csiph-web