* [chrome-os:chromeos-5.10 23780/24038] sound/pci/hda/hda_codec.c:900:2: warning: function 'snd_hda_codec_device_init' might be a candidate for 'gnu_printf' format attribute
@ 2021-12-03 5:47 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-12-03 5:47 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2906 bytes --]
tree: https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.10
head: 854998d0d92a6bd14eb0e423dc5eccb3cf77e31a
commit: 7707f6aaf45ae60bb48e4621f1ee2bd79a787a7e [23780/24038] CHROMIUM: ALSA: hda: Update and expose snd_hda_codec_device_init()
config: x86_64-buildonly-randconfig-r006-20211203 (https://download.01.org/0day-ci/archive/20211203/202112031322.6vHexO2c-lkp(a)intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
git remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-5.10
git checkout 7707f6aaf45ae60bb48e4621f1ee2bd79a787a7e
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash sound/pci/hda/ tools/testing/nvdimm/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
sound/pci/hda/hda_codec.c: In function 'snd_hda_codec_device_init':
>> sound/pci/hda/hda_codec.c:900:2: warning: function 'snd_hda_codec_device_init' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
900 | vsprintf(name, fmt, vargs);
| ^~~~~~~~
vim +900 sound/pci/hda/hda_codec.c
871
872 /**
873 * snd_hda_codec_device_init - allocate HDA codec device
874 * @bus: codec's parent bus
875 * @codec_addr: the codec address on the parent bus
876 * @codecp: the pointer to store the generated codec
877 * @fmt: format string for the device's name
878 *
879 * Returns newly allocated codec device or ERR_PTR() on failure.
880 */
881 struct hda_codec *
882 snd_hda_codec_device_init(struct hda_bus *bus, unsigned int codec_addr,
883 const char *fmt, ...)
884 {
885 va_list vargs;
886 char name[DEV_NAME_LEN];
887 struct hda_codec *codec;
888 int err;
889
890 if (snd_BUG_ON(!bus))
891 return ERR_PTR(-EINVAL);
892 if (snd_BUG_ON(codec_addr > HDA_MAX_CODEC_ADDRESS))
893 return ERR_PTR(-EINVAL);
894
895 codec = kzalloc(sizeof(*codec), GFP_KERNEL);
896 if (!codec)
897 return ERR_PTR(-ENOMEM);
898
899 va_start(vargs, fmt);
> 900 vsprintf(name, fmt, vargs);
901 va_end(vargs);
902
903 err = snd_hdac_device_init(&codec->core, &bus->core, name, codec_addr);
904 if (err < 0) {
905 kfree(codec);
906 return ERR_PTR(err);
907 }
908
909 codec->bus = bus;
910 codec->core.type = HDA_DEV_LEGACY;
911
912 return codec;
913 }
914 EXPORT_SYMBOL_GPL(snd_hda_codec_device_init);
915
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-12-03 5:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-03 5:47 [chrome-os:chromeos-5.10 23780/24038] sound/pci/hda/hda_codec.c:900:2: warning: function 'snd_hda_codec_device_init' might be a candidate for 'gnu_printf' format attribute kernel test robot
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.