From: Takashi Iwai <tiwai@suse.de>
To: xiaopeitux@foxmail.com
Cc: ivan.orlov0322@gmail.com, perex@perex.cz, tiwai@suse.com,
linux-sound@vger.kernel.org, Pei Xiao <xiaopei01@kylinos.cn>,
kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] ALSA: kunit: fix build warning in test_card_set_id
Date: Tue, 08 Apr 2025 11:48:12 +0200 [thread overview]
Message-ID: <87bjt7asrn.wl-tiwai@suse.de> (raw)
In-Reply-To: <871pu4c74t.wl-tiwai@suse.de>
On Mon, 07 Apr 2025 17:40:18 +0200,
Takashi Iwai wrote:
>
> On Mon, 07 Apr 2025 11:21:36 +0200,
> xiaopeitux@foxmail.com wrote:
> >
> > From: Pei Xiao <xiaopei01@kylinos.cn>
> >
> > build W=1 warning:
> > sound/core/sound_kunit.c: In function 'test_card_set_id':
> > include/linux/printk.h:455:44: warning: '%s' directive argument is null [-Wformat-overflow=]
> >
> > Fix -Wformat-overflow warning when card->id could be NULL.
> > The kunit_info() call with "%s" format specifier may receive a NULL
> > pointer from card->id. Add a ternary conditional to safely handle
> > potential NULL values by substituting "(null)" when card->id is NULL.
> >
> > Reported-by: kernel test robot <lkp@intel.com>
> > Closes: https://lore.kernel.org/oe-kbuild-all/202504050922.ZzbkiojG-lkp@intel.com/
> > Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn>
>
> Thanks, applied now. I added Fixes tag manually
> (Fixes: 3e39acf56ede ("ALSA: core: Add sound core KUnit test"))
>
> But at the next time, please try to put the proper Fixes tag.
... and as 0day bot spotted out, this fix is bogus.
snd_card.id is an embedded array, and can be never NULL.
I drop the patch now.
Takashi
prev parent reply other threads:[~2025-04-08 9:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-07 9:21 [PATCH] ALSA: kunit: fix build warning in test_card_set_id xiaopeitux
2025-04-07 15:40 ` Takashi Iwai
2025-04-08 9:48 ` Takashi Iwai [this message]
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=87bjt7asrn.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=ivan.orlov0322@gmail.com \
--cc=linux-sound@vger.kernel.org \
--cc=lkp@intel.com \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
--cc=xiaopei01@kylinos.cn \
--cc=xiaopeitux@foxmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox