public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: broonie@kernel.org, alsa-devel@alsa-project.org,
	patches@opensource.wolfsonmicro.com, lgirdwood@gmail.com,
	nikesh@opensource.wolfsonmicro.com, linux-kernel@vger.kernel.org
Subject: Re: [alsa-devel] [PATCH] ASoC: DAPM: Fix build warning
Date: Wed, 25 Mar 2015 11:03:27 +0000	[thread overview]
Message-ID: <20150325110327.GN23705@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <s5htwx973h1.wl-tiwai@suse.de>

On Wed, Mar 25, 2015 at 11:53:30AM +0100, Takashi Iwai wrote:
> At Wed, 25 Mar 2015 10:13:28 +0000,
> Charles Keepax wrote:
> > 
> > commit c66150824b8a ("ASoC: dapm: add code to configure dai link
> > parameters") introduced the following build warning:
> > 
> > sound/soc/soc-dapm.c: In function 'snd_soc_dapm_new_pcm':
> > sound/soc/soc-dapm.c:3389:4: warning: passing argument 1 of 'snprintf'
> > discards 'const' qualifier from pointer target type
> >     snprintf(w_param_text[count], len,
> > 
> > This patch fixes this by adding a non-const temporary variable to hold
> > the value as it is created before assigning to the entry in
> > w_param_text.
> > 
> > Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
> 
> An easier fix would be to replace with devm_kasprintf().  Then you can
> do it all in a single line.
> 
> 	w_param_text[count] = devm_kasprintf(card->dev, GFP_KERNEL,
> 				"Anonymous Configuration %d", count);
> 
> 
> Takashi

Thanks wasn't aware of that one, I will respin.

Thanks,
Charles

      reply	other threads:[~2015-03-25 11:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-25 10:13 [PATCH] ASoC: DAPM: Fix build warning Charles Keepax
2015-03-25 10:53 ` [alsa-devel] " Takashi Iwai
2015-03-25 11:03   ` Charles Keepax [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=20150325110327.GN23705@opensource.wolfsonmicro.com \
    --to=ckeepax@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nikesh@opensource.wolfsonmicro.com \
    --cc=patches@opensource.wolfsonmicro.com \
    --cc=tiwai@suse.de \
    /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