summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 16:37:42 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 17:09:51 -0800
commitbf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch)
tree01fdd9d27f1b272bef0127966e08eac44d134d0a /include
parente19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff)
Convert 'alloc_obj' family to use the new default GFP_KERNEL argument
This was done entirely with mindless brute force, using git grep -l '\<k[vmz]*alloc_objs*(.*, GFP_KERNEL)' | xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/' to convert the new alloc_obj() users that had a simple GFP_KERNEL argument to just drop that argument. Note that due to the extreme simplicity of the scripting, any slightly more complex cases spread over multiple lines would not be triggered: they definitely exist, but this covers the vast bulk of the cases, and the resulting diff is also then easier to check automatically. For the same reason the 'flex' versions will be done as a separate conversion. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/acpi.h2
-rw-r--r--include/linux/crash_dump.h2
-rw-r--r--include/linux/dma-fence-chain.h2
-rw-r--r--include/linux/gameport.h2
-rw-r--r--include/linux/io-mapping.h2
-rw-r--r--include/net/act_api.h2
-rw-r--r--include/net/fq_impl.h2
7 files changed, 7 insertions, 7 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 8b1d8993793d..4d2f0bed7a06 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -66,7 +66,7 @@ static inline struct fwnode_handle *acpi_alloc_fwnode_static(void)
{
struct fwnode_handle *fwnode;
- fwnode = kzalloc_obj(struct fwnode_handle, GFP_KERNEL);
+ fwnode = kzalloc_obj(struct fwnode_handle);
if (!fwnode)
return NULL;
diff --git a/include/linux/crash_dump.h b/include/linux/crash_dump.h
index 2cb211617ecc..8315270e27b7 100644
--- a/include/linux/crash_dump.h
+++ b/include/linux/crash_dump.h
@@ -136,7 +136,7 @@ struct vmcore_range {
static inline int vmcore_alloc_add_range(struct list_head *list,
unsigned long long paddr, unsigned long long size)
{
- struct vmcore_range *m = kzalloc_obj(*m, GFP_KERNEL);
+ struct vmcore_range *m = kzalloc_obj(*m);
if (!m)
return -ENOMEM;
diff --git a/include/linux/dma-fence-chain.h b/include/linux/dma-fence-chain.h
index e5f4451a6375..5cd3ba53b4a1 100644
--- a/include/linux/dma-fence-chain.h
+++ b/include/linux/dma-fence-chain.h
@@ -91,7 +91,7 @@ dma_fence_chain_contained(struct dma_fence *fence)
* intentional to enforce typesafety.
*/
#define dma_fence_chain_alloc() \
- kmalloc_obj(struct dma_fence_chain, GFP_KERNEL)
+ kmalloc_obj(struct dma_fence_chain)
/**
* dma_fence_chain_free
diff --git a/include/linux/gameport.h b/include/linux/gameport.h
index 09a1a59034e0..9625347c7ac0 100644
--- a/include/linux/gameport.h
+++ b/include/linux/gameport.h
@@ -97,7 +97,7 @@ void gameport_set_phys(struct gameport *gameport, const char *fmt, ...)
static inline struct gameport *gameport_allocate_port(void)
{
- struct gameport *gameport = kzalloc_obj(struct gameport, GFP_KERNEL);
+ struct gameport *gameport = kzalloc_obj(struct gameport);
return gameport;
}
diff --git a/include/linux/io-mapping.h b/include/linux/io-mapping.h
index ff9012c6a93a..e5a884e72f29 100644
--- a/include/linux/io-mapping.h
+++ b/include/linux/io-mapping.h
@@ -206,7 +206,7 @@ io_mapping_create_wc(resource_size_t base,
{
struct io_mapping *iomap;
- iomap = kmalloc_obj(*iomap, GFP_KERNEL);
+ iomap = kmalloc_obj(*iomap);
if (!iomap)
return NULL;
diff --git a/include/net/act_api.h b/include/net/act_api.h
index 453d6e18851b..e1e8f0f7dacb 100644
--- a/include/net/act_api.h
+++ b/include/net/act_api.h
@@ -159,7 +159,7 @@ int tc_action_net_init(struct net *net, struct tc_action_net *tn,
{
int err = 0;
- tn->idrinfo = kmalloc_obj(*tn->idrinfo, GFP_KERNEL);
+ tn->idrinfo = kmalloc_obj(*tn->idrinfo);
if (!tn->idrinfo)
return -ENOMEM;
tn->ops = ops;
diff --git a/include/net/fq_impl.h b/include/net/fq_impl.h
index 171ee6f7aa83..8aca881937da 100644
--- a/include/net/fq_impl.h
+++ b/include/net/fq_impl.h
@@ -358,7 +358,7 @@ static int fq_init(struct fq *fq, int flows_cnt)
fq->limit = 8192;
fq->memory_limit = 16 << 20; /* 16 MBytes */
- fq->flows = kvzalloc_objs(fq->flows[0], fq->flows_cnt, GFP_KERNEL);
+ fq->flows = kvzalloc_objs(fq->flows[0], fq->flows_cnt);
if (!fq->flows)
return -ENOMEM;