diff options
| author | Linus Torvalds | 2026-02-21 20:03:00 -0800 |
|---|---|---|
| committer | Linus Torvalds | 2026-02-21 20:03:00 -0800 |
| commit | 32a92f8c89326985e05dce8b22d3f0aa07a3e1bd (patch) | |
| tree | 65f84985b9ed2d5cf3c5243aca78d9428e25c312 /sound/hda | |
| parent | 323bbfcf1ef8836d0d2ad9e2c1f1c684f0e3b5b3 (diff) | |
Convert more 'alloc_obj' cases to default GFP_KERNEL arguments
This converts some of the visually simpler cases that have been split
over multiple lines. I only did the ones that are easy to verify the
resulting diff by having just that final GFP_KERNEL argument on the next
line.
Somebody should probably do a proper coccinelle script for this, but for
me the trivial script actually resulted in an assertion failure in the
middle of the script. I probably had made it a bit _too_ trivial.
So after fighting that far a while I decided to just do some of the
syntactically simpler cases with variations of the previous 'sed'
scripts.
The more syntactically complex multi-line cases would mostly really want
whitespace cleanup anyway.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'sound/hda')
| -rw-r--r-- | sound/hda/codecs/ca0132.c | 3 | ||||
| -rw-r--r-- | sound/hda/common/proc.c | 3 | ||||
| -rw-r--r-- | sound/hda/core/ext/stream.c | 3 | ||||
| -rw-r--r-- | sound/hda/core/sysfs.c | 3 |
4 files changed, 4 insertions, 8 deletions
diff --git a/sound/hda/codecs/ca0132.c b/sound/hda/codecs/ca0132.c index e4f174d0ebb1..bf342a76807c 100644 --- a/sound/hda/codecs/ca0132.c +++ b/sound/hda/codecs/ca0132.c @@ -9831,8 +9831,7 @@ static int ca0132_prepare_verbs(struct hda_codec *codec) */ if (ca0132_use_pci_mmio(spec)) spec->desktop_init_verbs = ca0132_init_verbs1; - spec->spec_init_verbs = kzalloc_objs(struct hda_verb, NUM_SPEC_VERBS, - GFP_KERNEL); + spec->spec_init_verbs = kzalloc_objs(struct hda_verb, NUM_SPEC_VERBS); if (!spec->spec_init_verbs) return -ENOMEM; diff --git a/sound/hda/common/proc.c b/sound/hda/common/proc.c index ce76b8190b9f..3bc33c5617b2 100644 --- a/sound/hda/common/proc.c +++ b/sound/hda/common/proc.c @@ -845,8 +845,7 @@ static void print_codec_info(struct snd_info_entry *entry, if (wid_caps & AC_WCAP_CONN_LIST) { conn_len = snd_hda_get_num_raw_conns(codec, nid); if (conn_len > 0) { - conn = kmalloc_objs(hda_nid_t, conn_len, - GFP_KERNEL); + conn = kmalloc_objs(hda_nid_t, conn_len); if (!conn) return; if (snd_hda_get_raw_connections(codec, nid, conn, diff --git a/sound/hda/core/ext/stream.c b/sound/hda/core/ext/stream.c index a213e5b06bdb..4c7506d49f55 100644 --- a/sound/hda/core/ext/stream.c +++ b/sound/hda/core/ext/stream.c @@ -101,8 +101,7 @@ int snd_hdac_ext_stream_init_all(struct hdac_bus *bus, int start_idx, setup_op = snd_hdac_stream_setup; for (i = 0; i < num_stream; i++) { - struct hdac_ext_stream *hext_stream = kzalloc_obj(*hext_stream, - GFP_KERNEL); + struct hdac_ext_stream *hext_stream = kzalloc_obj(*hext_stream); if (!hext_stream) return -ENOMEM; tag = ++stream_tag; diff --git a/sound/hda/core/sysfs.c b/sound/hda/core/sysfs.c index 09d88f22957a..3e102538e058 100644 --- a/sound/hda/core/sysfs.c +++ b/sound/hda/core/sysfs.c @@ -374,8 +374,7 @@ static int widget_tree_create(struct hdac_device *codec) if (!tree->root) return -ENOMEM; - tree->nodes = kzalloc_objs(*tree->nodes, codec->num_nodes + 1, - GFP_KERNEL); + tree->nodes = kzalloc_objs(*tree->nodes, codec->num_nodes + 1); if (!tree->nodes) return -ENOMEM; |
