ASoC: simple-card-utils: add __printf attribute
authorNicolas Iooss <nicolas.iooss_linux@m4x.org>
Tue, 23 Aug 2016 08:51:22 +0000 (10:51 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 24 Aug 2016 15:27:04 +0000 (16:27 +0100)
asoc_simple_card_set_dailink_name() uses devm_kvasprintf() to format
some of its arguments.  Adding a __printf attribute to this function
makes it possible to detect at compile-time errors related to format
strings.

Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/simple_card_utils.h

index 403ec92164fc388e3726f0a7a8fb010fb20d07a8..fd6412551145a8df0c003c6b4b190b5c34b0f91f 100644 (file)
@@ -27,6 +27,7 @@ int asoc_simple_card_parse_daifmt(struct device *dev,
                                  struct device_node *codec,
                                  char *prefix,
                                  unsigned int *retfmt);
+__printf(3, 4)
 int asoc_simple_card_set_dailink_name(struct device *dev,
                                      struct snd_soc_dai_link *dai_link,
                                      const char *fmt, ...);
This page took 0.027745 seconds and 5 git commands to generate.