From: Coiby Xu <coiby.xu@gmail.com> To: devel@driverdev.osuosl.org Cc: Vaibhav Agarwal <vaibhav.sr@gmail.com>, Mark Greer <mgreer@animalcreek.com>, Johan Hovold <johan@kernel.org>, Alex Elder <elder@kernel.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, greybus-dev@lists.linaro.org (moderated list:GREYBUS SUBSYSTEM), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 2/3] staging: greybus: codecs: use SNDRV_PCM_FMTBIT_S16_LE for format bitmask Date: Thu, 24 Sep 2020 18:20:38 +0800 [thread overview] Message-ID: <20200924102039.43895-2-coiby.xu@gmail.com> (raw) In-Reply-To: <20200924102039.43895-1-coiby.xu@gmail.com> snd_soc_pcm_stream.formats should use the bitmask SNDRV_PCM_FMTBIT_* instead of the sequential integers SNDRV_PCM_FORMAT_* as explained by commit e712bfca1ac1f63f622f87c2f33b57608f2a4d19 ("ASoC: codecs: use SNDRV_PCM_FMTBIT_* for format bitmask"). Found by sparse, $ make C=2 drivers/staging/greybus/ drivers/staging/greybus/audio_codec.c:691:36: warning: incorrect type in initializer (different base types) drivers/staging/greybus/audio_codec.c:691:36: expected unsigned long long [usertype] formats drivers/staging/greybus/audio_codec.c:691:36: got restricted snd_pcm_format_t [usertype] drivers/staging/greybus/audio_codec.c:701:36: warning: incorrect type in initializer (different base types) drivers/staging/greybus/audio_codec.c:701:36: expected unsigned long long [usertype] formats drivers/staging/greybus/audio_codec.c:701:36: got restricted snd_pcm_format_t [usertype] Signed-off-by: Coiby Xu <coiby.xu@gmail.com> --- drivers/staging/greybus/audio_codec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/greybus/audio_codec.c b/drivers/staging/greybus/audio_codec.c index 74538f8c5fa4..494aa823e998 100644 --- a/drivers/staging/greybus/audio_codec.c +++ b/drivers/staging/greybus/audio_codec.c @@ -688,7 +688,7 @@ static struct snd_soc_dai_driver gbaudio_dai[] = { .playback = { .stream_name = "I2S 0 Playback", .rates = SNDRV_PCM_RATE_48000, - .formats = SNDRV_PCM_FORMAT_S16_LE, + .formats = SNDRV_PCM_FMTBIT_S16_LE, .rate_max = 48000, .rate_min = 48000, .channels_min = 1, @@ -698,7 +698,7 @@ static struct snd_soc_dai_driver gbaudio_dai[] = { .capture = { .stream_name = "I2S 0 Capture", .rates = SNDRV_PCM_RATE_48000, - .formats = SNDRV_PCM_FORMAT_S16_LE, + .formats = SNDRV_PCM_FMTBIT_S16_LE, .rate_max = 48000, .rate_min = 48000, .channels_min = 1, -- 2.28.0
WARNING: multiple messages have this Message-ID (diff)
From: Coiby Xu <coiby.xu@gmail.com> To: devel@driverdev.osuosl.org Cc: Alex Elder <elder@kernel.org>, Vaibhav Agarwal <vaibhav.sr@gmail.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Johan Hovold <johan@kernel.org>, Mark Greer <mgreer@animalcreek.com>, "moderated list:GREYBUS SUBSYSTEM" <greybus-dev@lists.linaro.org>, open list <linux-kernel@vger.kernel.org> Subject: [PATCH 2/3] staging: greybus: codecs: use SNDRV_PCM_FMTBIT_S16_LE for format bitmask Date: Thu, 24 Sep 2020 18:20:38 +0800 [thread overview] Message-ID: <20200924102039.43895-2-coiby.xu@gmail.com> (raw) In-Reply-To: <20200924102039.43895-1-coiby.xu@gmail.com> snd_soc_pcm_stream.formats should use the bitmask SNDRV_PCM_FMTBIT_* instead of the sequential integers SNDRV_PCM_FORMAT_* as explained by commit e712bfca1ac1f63f622f87c2f33b57608f2a4d19 ("ASoC: codecs: use SNDRV_PCM_FMTBIT_* for format bitmask"). Found by sparse, $ make C=2 drivers/staging/greybus/ drivers/staging/greybus/audio_codec.c:691:36: warning: incorrect type in initializer (different base types) drivers/staging/greybus/audio_codec.c:691:36: expected unsigned long long [usertype] formats drivers/staging/greybus/audio_codec.c:691:36: got restricted snd_pcm_format_t [usertype] drivers/staging/greybus/audio_codec.c:701:36: warning: incorrect type in initializer (different base types) drivers/staging/greybus/audio_codec.c:701:36: expected unsigned long long [usertype] formats drivers/staging/greybus/audio_codec.c:701:36: got restricted snd_pcm_format_t [usertype] Signed-off-by: Coiby Xu <coiby.xu@gmail.com> --- drivers/staging/greybus/audio_codec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/greybus/audio_codec.c b/drivers/staging/greybus/audio_codec.c index 74538f8c5fa4..494aa823e998 100644 --- a/drivers/staging/greybus/audio_codec.c +++ b/drivers/staging/greybus/audio_codec.c @@ -688,7 +688,7 @@ static struct snd_soc_dai_driver gbaudio_dai[] = { .playback = { .stream_name = "I2S 0 Playback", .rates = SNDRV_PCM_RATE_48000, - .formats = SNDRV_PCM_FORMAT_S16_LE, + .formats = SNDRV_PCM_FMTBIT_S16_LE, .rate_max = 48000, .rate_min = 48000, .channels_min = 1, @@ -698,7 +698,7 @@ static struct snd_soc_dai_driver gbaudio_dai[] = { .capture = { .stream_name = "I2S 0 Capture", .rates = SNDRV_PCM_RATE_48000, - .formats = SNDRV_PCM_FORMAT_S16_LE, + .formats = SNDRV_PCM_FMTBIT_S16_LE, .rate_max = 48000, .rate_min = 48000, .channels_min = 1, -- 2.28.0 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
next prev parent reply other threads:[~2020-09-24 10:20 UTC|newest] Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-09-24 10:20 [PATCH 1/3] [PATCH] staging: greybus: fix warnings about endianness detected by sparse Coiby Xu 2020-09-24 10:20 ` Coiby Xu 2020-09-24 10:20 ` Coiby Xu [this message] 2020-09-24 10:20 ` [PATCH 2/3] staging: greybus: codecs: use SNDRV_PCM_FMTBIT_S16_LE for format bitmask Coiby Xu 2020-09-24 12:54 ` [greybus-dev] " Alex Elder 2020-09-24 12:54 ` Alex Elder 2020-09-24 10:20 ` [PATCH 3/3] [PATCH] staging: greybus: __u8 is sufficient for snd_ctl_elem_type_t and snd_ctl_elem_iface_t Coiby Xu 2020-09-24 10:20 ` Coiby Xu 2020-09-24 10:54 ` David Laight 2020-09-24 10:54 ` David Laight 2020-09-24 10:54 ` David Laight 2020-09-25 14:11 ` Coiby Xu 2020-09-25 14:11 ` Coiby Xu 2020-09-25 16:02 ` [greybus-dev] " Alex Elder 2020-09-25 16:02 ` Alex Elder 2020-09-25 16:02 ` Alex Elder 2020-09-26 4:01 ` Coiby Xu 2020-09-26 4:01 ` Coiby Xu 2020-09-26 10:11 ` David Laight 2020-09-26 10:11 ` David Laight 2020-09-26 10:11 ` David Laight 2020-09-24 11:00 ` Greg Kroah-Hartman 2020-09-24 11:00 ` Greg Kroah-Hartman 2020-09-24 11:00 ` Greg Kroah-Hartman 2020-09-25 14:07 ` Coiby Xu 2020-09-25 14:07 ` Coiby Xu 2020-09-25 15:57 ` Alex Elder 2020-09-25 15:57 ` Alex Elder 2020-09-25 15:57 ` Alex Elder 2020-09-26 5:09 ` Coiby Xu 2020-09-26 5:09 ` Coiby Xu 2020-09-24 13:01 ` [greybus-dev] " Alex Elder 2020-09-24 13:01 ` Alex Elder 2020-09-24 13:01 ` Alex Elder 2020-09-24 12:50 ` [greybus-dev] [PATCH 1/3] [PATCH] staging: greybus: fix warnings about endianness detected by sparse Alex Elder 2020-09-24 12:50 ` Alex Elder 2020-09-25 14:09 ` Coiby Xu 2020-09-25 14:09 ` Coiby Xu
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=20200924102039.43895-2-coiby.xu@gmail.com \ --to=coiby.xu@gmail.com \ --cc=devel@driverdev.osuosl.org \ --cc=elder@kernel.org \ --cc=gregkh@linuxfoundation.org \ --cc=greybus-dev@lists.linaro.org \ --cc=johan@kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=mgreer@animalcreek.com \ --cc=vaibhav.sr@gmail.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: linkBe 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.