[alsa-devel] dev_info() argument in sound/soc/soc_dapm.c
jhnikula at gmail.com
Wed Dec 22 15:42:01 CET 2010
On Wed, 22 Dec 2010 15:06:44 +0100
Takashi Iwai <tiwai at suse.de> wrote:
> my build tests caught a warning regarding the conversion to dev_info()
> in soc-dapm.c. dev_info() is printf style, thus you shouldn't pass
> the expanded string to the format argument.
> I applied the following patch to topic/asoc branch.
> --- a/sound/soc/soc-dapm.c
> +++ b/sound/soc/soc-dapm.c
> @@ -110,7 +110,7 @@ static void pop_dbg(struct device *dev, u32 pop_time, const char *fmt, ...)
> va_start(args, fmt);
> vsnprintf(buf, PAGE_SIZE, fmt, args);
> - dev_info(dev, buf);
> + dev_info(dev, "%s", buf);
Thanks! I guess this is safer as the buf here should contain only the
characters to be printed.
More information about the Alsa-devel