All of lore.kernel.org
 help / color / mirror / Atom feed
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: Mon, 07 Apr 2025 17:40:18 +0200	[thread overview]
Message-ID: <871pu4c74t.wl-tiwai@suse.de> (raw)
In-Reply-To: <tencent_7F01F2D14BF724692ECBF5346283DB9BCA05@qq.com>

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.


Takashi

  reply	other threads:[~2025-04-07 15:40 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 [this message]
2025-04-08  9:48   ` 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=871pu4c74t.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 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.