summaryrefslogtreecommitdiff
path: root/include/linux/gfp.h
diff options
context:
space:
mode:
authorVasily Averin <vvs@openvz.org>2022-05-12 20:23:08 -0700
committerAndrew Morton <akpm@linux-foundation.org>2022-05-13 07:20:18 -0700
commitfe573327ffb1deba802c91dd1d4ff41dafa97a0e (patch)
tree1bc1eaf3f2a2e4319a1dea4f5fb49f3fb498977b /include/linux/gfp.h
parente7be8d1dd983156bbdd22c0319b71119a8fbb697 (diff)
tracing: incorrect gfp_t conversion
Fixes the following sparse warnings: include/trace/events/*: sparse: cast to restricted gfp_t include/trace/events/*: sparse: restricted gfp_t degrades to integer gfp_t type is bitwise and requires __force attributes for any casts. Link: https://lkml.kernel.org/r/331d88fe-f4f7-657c-02a2-d977f15fbff6@openvz.org Signed-off-by: Vasily Averin <vvs@openvz.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Ingo Molnar <mingo@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux/gfp.h')
-rw-r--r--include/linux/gfp.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/gfp.h b/include/linux/gfp.h
index 2a08a3c4ba95..2d2ccae933c2 100644
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -367,7 +367,7 @@ static inline int gfp_migratetype(const gfp_t gfp_flags)
return MIGRATE_UNMOVABLE;
/* Group based on mobility */
- return (gfp_flags & GFP_MOVABLE_MASK) >> GFP_MOVABLE_SHIFT;
+ return (__force unsigned long)(gfp_flags & GFP_MOVABLE_MASK) >> GFP_MOVABLE_SHIFT;
}
#undef GFP_MOVABLE_MASK
#undef GFP_MOVABLE_SHIFT