diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 16:37:42 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 17:09:51 -0800 |
| commit | bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch) | |
| tree | 01fdd9d27f1b272bef0127966e08eac44d134d0a /drivers/soundwire | |
| parent | e19e1b480ac73c3e62ffebbca1174f0f511f43e7 (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 'drivers/soundwire')
| -rw-r--r-- | drivers/soundwire/amd_init.c | 2 | ||||
| -rw-r--r-- | drivers/soundwire/amd_manager.c | 2 | ||||
| -rw-r--r-- | drivers/soundwire/cadence_master.c | 2 | ||||
| -rw-r--r-- | drivers/soundwire/debugfs.c | 2 | ||||
| -rw-r--r-- | drivers/soundwire/generic_bandwidth_allocation.c | 2 | ||||
| -rw-r--r-- | drivers/soundwire/intel_ace2x.c | 2 | ||||
| -rw-r--r-- | drivers/soundwire/intel_init.c | 6 | ||||
| -rw-r--r-- | drivers/soundwire/master.c | 2 | ||||
| -rw-r--r-- | drivers/soundwire/slave.c | 2 | ||||
| -rw-r--r-- | drivers/soundwire/stream.c | 12 |
10 files changed, 17 insertions, 17 deletions
diff --git a/drivers/soundwire/amd_init.c b/drivers/soundwire/amd_init.c index e71cc23523e1..7db37f044850 100644 --- a/drivers/soundwire/amd_init.c +++ b/drivers/soundwire/amd_init.c @@ -98,7 +98,7 @@ static struct sdw_amd_ctx *sdw_amd_probe_controller(struct sdw_amd_res *res) * the parent .probe. * If devm_ was used, the memory might never be freed on errors. */ - ctx = kzalloc_obj(*ctx, GFP_KERNEL); + ctx = kzalloc_obj(*ctx); if (!ctx) return NULL; diff --git a/drivers/soundwire/amd_manager.c b/drivers/soundwire/amd_manager.c index 91dee9499df2..c2f405785c5f 100644 --- a/drivers/soundwire/amd_manager.c +++ b/drivers/soundwire/amd_manager.c @@ -764,7 +764,7 @@ static int amd_set_sdw_stream(struct snd_soc_dai *dai, void *stream, int directi } /* allocate and set dai_runtime info */ - dai_runtime = kzalloc_obj(*dai_runtime, GFP_KERNEL); + dai_runtime = kzalloc_obj(*dai_runtime); if (!dai_runtime) return -ENOMEM; diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c index dfdb591c6f6e..f245c3ffb9e9 100644 --- a/drivers/soundwire/cadence_master.c +++ b/drivers/soundwire/cadence_master.c @@ -1846,7 +1846,7 @@ int cdns_set_sdw_stream(struct snd_soc_dai *dai, } /* allocate and set dai_runtime info */ - dai_runtime = kzalloc_obj(*dai_runtime, GFP_KERNEL); + dai_runtime = kzalloc_obj(*dai_runtime); if (!dai_runtime) return -ENOMEM; diff --git a/drivers/soundwire/debugfs.c b/drivers/soundwire/debugfs.c index 0e9c48ca76e9..ccc9670ef77c 100644 --- a/drivers/soundwire/debugfs.c +++ b/drivers/soundwire/debugfs.c @@ -224,7 +224,7 @@ static int do_bpt_sequence(struct sdw_slave *slave, bool write, u8 *buffer) struct sdw_bpt_msg msg = {0}; struct sdw_bpt_section *sec; - sec = kzalloc_objs(*sec, 1, GFP_KERNEL); + sec = kzalloc_objs(*sec, 1); if (!sec) return -ENOMEM; msg.sections = 1; diff --git a/drivers/soundwire/generic_bandwidth_allocation.c b/drivers/soundwire/generic_bandwidth_allocation.c index f5a7f404aacb..fb3970e12dac 100644 --- a/drivers/soundwire/generic_bandwidth_allocation.c +++ b/drivers/soundwire/generic_bandwidth_allocation.c @@ -402,7 +402,7 @@ static int sdw_compute_port_params(struct sdw_bus *bus, struct sdw_stream_runtim if (group.count == 0) goto out; - params = kzalloc_objs(*params, group.count, GFP_KERNEL); + params = kzalloc_objs(*params, group.count); if (!params) { ret = -ENOMEM; goto out; diff --git a/drivers/soundwire/intel_ace2x.c b/drivers/soundwire/intel_ace2x.c index 8a37d185cbca..87bde136d234 100644 --- a/drivers/soundwire/intel_ace2x.c +++ b/drivers/soundwire/intel_ace2x.c @@ -127,7 +127,7 @@ static int intel_ace2x_bpt_open_stream(struct sdw_intel *sdw, struct sdw_slave * sconfig.bps = 32; /* this is required for BPT/BRA */ /* Port configuration */ - pconfig = kzalloc_objs(*pconfig, 2, GFP_KERNEL); + pconfig = kzalloc_objs(*pconfig, 2); if (!pconfig) { ret = -ENOMEM; goto remove_slave; diff --git a/drivers/soundwire/intel_init.c b/drivers/soundwire/intel_init.c index 982d25f92c7c..e180657ae231 100644 --- a/drivers/soundwire/intel_init.c +++ b/drivers/soundwire/intel_init.c @@ -40,7 +40,7 @@ static struct sdw_intel_link_dev *intel_link_dev_register(struct sdw_intel_res * struct auxiliary_device *auxdev; int ret; - ldev = kzalloc_obj(*ldev, GFP_KERNEL); + ldev = kzalloc_obj(*ldev); if (!ldev) return ERR_PTR(-ENOMEM); @@ -186,7 +186,7 @@ static struct sdw_intel_ctx * the parent .probe. * If devm_ was used, the memory might never be freed on errors. */ - ctx = kzalloc_obj(*ctx, GFP_KERNEL); + ctx = kzalloc_obj(*ctx); if (!ctx) return NULL; @@ -198,7 +198,7 @@ static struct sdw_intel_ctx * If some links are disabled, the link pointer will remain NULL. Given that the * number of links is small, this is simpler than using a list to keep track of links. */ - ctx->ldev = kzalloc_objs(*ctx->ldev, ctx->count, GFP_KERNEL); + ctx->ldev = kzalloc_objs(*ctx->ldev, ctx->count); if (!ctx->ldev) { kfree(ctx); return NULL; diff --git a/drivers/soundwire/master.c b/drivers/soundwire/master.c index a0f94877bc91..440bfc52ccba 100644 --- a/drivers/soundwire/master.c +++ b/drivers/soundwire/master.c @@ -133,7 +133,7 @@ int sdw_master_device_add(struct sdw_bus *bus, struct device *parent, if (!parent) return -EINVAL; - md = kzalloc_obj(*md, GFP_KERNEL); + md = kzalloc_obj(*md); if (!md) return -ENOMEM; diff --git a/drivers/soundwire/slave.c b/drivers/soundwire/slave.c index 45e80b9496f4..f5a3ca3b9dda 100644 --- a/drivers/soundwire/slave.c +++ b/drivers/soundwire/slave.c @@ -32,7 +32,7 @@ int sdw_slave_add(struct sdw_bus *bus, int ret; int i; - slave = kzalloc_obj(*slave, GFP_KERNEL); + slave = kzalloc_obj(*slave); if (!slave) return -ENOMEM; diff --git a/drivers/soundwire/stream.c b/drivers/soundwire/stream.c index c6e3f911371b..b6982f8dcf17 100644 --- a/drivers/soundwire/stream.c +++ b/drivers/soundwire/stream.c @@ -748,11 +748,11 @@ static int sdw_bank_switch(struct sdw_bus *bus, int m_rt_count) int ret; u16 addr; - wr_msg = kzalloc_obj(*wr_msg, GFP_KERNEL); + wr_msg = kzalloc_obj(*wr_msg); if (!wr_msg) return -ENOMEM; - wbuf = kzalloc_obj(*wbuf, GFP_KERNEL); + wbuf = kzalloc_obj(*wbuf); if (!wbuf) { ret = -ENOMEM; goto error_1; @@ -956,7 +956,7 @@ static struct sdw_port_runtime *sdw_port_alloc(struct list_head *port_list) { struct sdw_port_runtime *p_rt; - p_rt = kzalloc_obj(*p_rt, GFP_KERNEL); + p_rt = kzalloc_obj(*p_rt); if (!p_rt) return NULL; @@ -1131,7 +1131,7 @@ static struct sdw_slave_runtime { struct sdw_slave_runtime *s_rt; - s_rt = kzalloc_obj(*s_rt, GFP_KERNEL); + s_rt = kzalloc_obj(*s_rt); if (!s_rt) return NULL; @@ -1241,7 +1241,7 @@ static struct sdw_master_runtime } } - m_rt = kzalloc_obj(*m_rt, GFP_KERNEL); + m_rt = kzalloc_obj(*m_rt); if (!m_rt) return NULL; @@ -1875,7 +1875,7 @@ struct sdw_stream_runtime *sdw_alloc_stream(const char *stream_name, enum sdw_st { struct sdw_stream_runtime *stream; - stream = kzalloc_obj(*stream, GFP_KERNEL); + stream = kzalloc_obj(*stream); if (!stream) return NULL; |
