All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: jack.yu@realtek.com, broonie@kernel.org, lgirdwood@gmail.com
Cc: alsa-devel@alsa-project.org, lars@metafoo.de,
	kent_chen@realtek.com, kenny_chen@realtek.com,
	mingjane_hsieh@realtek.com, flove@realtek.com
Subject: Re: [alsa-devel] [PATCH] ASoC: rt1015: add rt1015 amplifier driver
Date: Tue, 25 Feb 2020 16:08:52 -0600	[thread overview]
Message-ID: <754ef0d7-d265-00a2-218a-072f086c3e02@linux.intel.com> (raw)
In-Reply-To: <20200114025628.4241-1-jack.yu@realtek.com>

Now that we have a machine driver based on this rt1015 amplifier, our 
sparse checks report two minor issues with this driver:

> +struct snd_soc_dai_ops rt1015_aif_dai_ops = {
> +	.hw_params = rt1015_hw_params,
> +	.set_fmt = rt1015_set_dai_fmt,
> +};

This structure is not defined so could be static, but doing so shows 
it's not used either?

> +struct snd_soc_dai_driver rt1015_dai[] = {
> +	{
> +		.name = "rt1015-aif",
> +		.id = 0,
> +		.playback = {
> +			.stream_name = "AIF Playback",
> +			.channels_min = 1,
> +			.channels_max = 4,
> +			.rates = RT1015_STEREO_RATES,
> +			.formats = RT1015_FORMATS,
> +		},
> +	}
> +};

This should be declared as static.

see logs below for reference.

  CHECK   sound/soc/codecs/rt1015.c
/soc/codecs/rt1015.c:844:24: warning: symbol 'rt1015_aif_dai_ops' was 
not declared. Should it be static?
sound/soc/codecs/rt1015.c:849:27: warning: symbol 'rt1015_dai' was not 
declared. Should it be static?

  CC [M]  sound/soc/codecs/rt1015.o
sound/soc/codecs/rt1015.c:844:31: warning: ‘rt1015_aif_dai_ops’ defined 
but not used [-Wunused-variable]
   844 | static struct snd_soc_dai_ops rt1015_aif_dai_ops = {
       |

Thanks!

      parent reply	other threads:[~2020-02-25 22:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-14  2:56 [alsa-devel] [PATCH] ASoC: rt1015: add rt1015 amplifier driver jack.yu
2020-01-14 16:55 ` Mark Brown
2020-02-25 22:08 ` Pierre-Louis Bossart [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=754ef0d7-d265-00a2-218a-072f086c3e02@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=flove@realtek.com \
    --cc=jack.yu@realtek.com \
    --cc=kenny_chen@realtek.com \
    --cc=kent_chen@realtek.com \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.com \
    --cc=mingjane_hsieh@realtek.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.