From: Takashi Iwai <tiwai@suse.de>
To: phucduc.bui@gmail.com
Cc: cassiogabrielcontato@gmail.com, Takashi Iwai <tiwai@suse.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Kees Cook <kees@kernel.org>,
Cezary Rojewski <cezary.rojewski@intel.com>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ALSA: core: Update snd_card_new() documentation
Date: Tue, 28 Jul 2026 10:37:07 +0200 [thread overview]
Message-ID: <87zezb7bnw.wl-tiwai@suse.de> (raw)
In-Reply-To: <20260728081251.23783-1-phucduc.bui@gmail.com>
On Tue, 28 Jul 2026 10:12:51 +0200,
phucduc.bui@gmail.com wrote:
>
> From: bui duc phuc <phucduc.bui@gmail.com>
>
> The implementation of snd_card_new() now uses kzalloc_flex() instead
> of kzalloc(). Update the kernel-doc to match the implementation and
> fix the function parameter indentation.
Well, from the API documentation POV, it doesn't matter which function
is used internally. The main point is that it does
zero-initialization.
thanks,
Takashi
>
> Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
> ---
> sound/core/init.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/sound/core/init.c b/sound/core/init.c
> index 56dde5bd73c4..f3fa795ab932 100644
> --- a/sound/core/init.c
> +++ b/sound/core/init.c
> @@ -162,15 +162,15 @@ static void release_card_device(struct device *dev)
> * @extra_size: allocate this extra size after the main soundcard structure
> * @card_ret: the pointer to store the created card instance
> *
> - * The function allocates snd_card instance via kzalloc with the given
> + * The function allocates snd_card instance via kzalloc_flex with the given
> * space for the driver to use freely. The allocated struct is stored
> * in the given card_ret pointer.
> *
> * Return: Zero if successful or a negative error code.
> */
> int snd_card_new(struct device *parent, int idx, const char *xid,
> - struct module *module, int extra_size,
> - struct snd_card **card_ret)
> + struct module *module, int extra_size,
> + struct snd_card **card_ret)
> {
> struct snd_card *card;
> int err;
> --
> 2.43.0
>
next prev parent reply other threads:[~2026-07-28 8:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-28 8:12 [PATCH] ALSA: core: Update snd_card_new() documentation phucduc.bui
2026-07-28 8:37 ` Takashi Iwai [this message]
2026-07-28 8:47 ` Bui Duc Phuc
2026-07-28 8:56 ` Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zezb7bnw.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=broonie@kernel.org \
--cc=cassiogabrielcontato@gmail.com \
--cc=cezary.rojewski@intel.com \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=phucduc.bui@gmail.com \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.