lkml.org 
[lkml]   [2022]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/1] include: linux: slab: rename gfpflags to flags
Date
In the slab header the general naming convention for the gfp flags is
`flags` except in a few locations. This refactors all `gfpflags` variable
names to the common `flags` name.

Signed-off-by: Ian Cowan <ian@linux.cowan.aero>
---
include/linux/slab.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/linux/slab.h b/include/linux/slab.h
index 90877fcde70b..bb5231cf6859 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -443,7 +443,7 @@ static_assert(PAGE_SHIFT <= 20);
void *__kmalloc(size_t size, gfp_t flags) __assume_kmalloc_alignment __alloc_size(1);
void *kmem_cache_alloc(struct kmem_cache *s, gfp_t flags) __assume_slab_alignment __malloc;
void *kmem_cache_alloc_lru(struct kmem_cache *s, struct list_lru *lru,
- gfp_t gfpflags) __assume_slab_alignment __malloc;
+ gfp_t flags) __assume_slab_alignment __malloc;
void kmem_cache_free(struct kmem_cache *s, void *objp);

/*
@@ -474,7 +474,7 @@ void *kmem_cache_alloc_node(struct kmem_cache *s, gfp_t flags, int node) __assum
void *kmalloc_trace(struct kmem_cache *s, gfp_t flags, size_t size)
__assume_kmalloc_alignment __alloc_size(3);

-void *kmalloc_node_trace(struct kmem_cache *s, gfp_t gfpflags,
+void *kmalloc_node_trace(struct kmem_cache *s, gfp_t flags,
int node, size_t size) __assume_kmalloc_alignment
__alloc_size(4);
#else /* CONFIG_TRACING */
@@ -489,12 +489,12 @@ void *kmalloc_trace(struct kmem_cache *s, gfp_t flags, size_t size)
}

static __always_inline __alloc_size(4)
-void *kmalloc_node_trace(struct kmem_cache *s, gfp_t gfpflags,
+void *kmalloc_node_trace(struct kmem_cache *s, gfp_t flags,
int node, size_t size)
{
- void *ret = kmem_cache_alloc_node(s, gfpflags, node);
+ void *ret = kmem_cache_alloc_node(s, flags, node);

- ret = kasan_kmalloc(s, ret, size, gfpflags);
+ ret = kasan_kmalloc(s, ret, size, flags);
return ret;
}
#endif /* CONFIG_TRACING */
--
2.38.1
\
 
 \ /
  Last update: 2022-11-12 17:24    [W:0.029 / U:1.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site