From: "Amadeusz Sławiński" <amade@asmblr.net>
To: linux-sound@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, "Mark Brown" <broonie@kernel.org>,
"Jaroslav Kysela" <perex@perex.cz>,
"Takashi Iwai" <tiwai@suse.com>,
"Liam Girdwood" <lgirdwood@gmail.com>,
"Amadeusz Sławiński" <amade@asmblr.net>
Subject: [PATCH 7/8] ASoC: soc-component: Fix return type of snd_soc_pcm_component_pointer()
Date: Wed, 14 Oct 2026 22:06:07 +0200 [thread overview]
Message-ID: <20261014200608.118770-8-amade@asmblr.net> (raw)
In-Reply-To: <20261014200608.118770-1-amade@asmblr.net>
Both caller and pointer callback expect the return value to be
snd_pcm_uframes_t, however it was defined incorrectly leading to
potential truncation of returned value.
Fixes: 0035e2565b93 ("ASoC: soc-component: add snd_soc_pcm_component_pointer()")
Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
---
include/sound/soc-component.h | 2 +-
sound/soc/soc-component.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h
index ac5e9412582e..ba860e28eec1 100644
--- a/include/sound/soc-component.h
+++ b/include/sound/soc-component.h
@@ -432,7 +432,7 @@ int snd_soc_component_compr_set_metadata(struct snd_compr_stream *cstream,
int snd_soc_component_compr_get_metadata(struct snd_compr_stream *cstream,
struct snd_compr_metadata *metadata);
-int snd_soc_pcm_component_pointer(struct snd_pcm_substream *substream);
+snd_pcm_uframes_t snd_soc_pcm_component_pointer(struct snd_pcm_substream *substream);
int snd_soc_pcm_component_ioctl(struct snd_pcm_substream *substream,
unsigned int cmd, void *arg);
int snd_soc_pcm_component_sync_stop(struct snd_pcm_substream *substream);
diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c
index 34efb270ce29..746fa4f54450 100644
--- a/sound/soc/soc-component.c
+++ b/sound/soc/soc-component.c
@@ -920,7 +920,7 @@ int snd_soc_component_test_bits(struct snd_soc_component *component,
}
EXPORT_SYMBOL_GPL(snd_soc_component_test_bits);
-int snd_soc_pcm_component_pointer(struct snd_pcm_substream *substream)
+snd_pcm_uframes_t snd_soc_pcm_component_pointer(struct snd_pcm_substream *substream)
{
struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
struct snd_soc_component *component;
--
2.56.0
next prev parent reply other threads:[~2026-10-14 20:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-14 20:06 [PATCH 0/8] ASoC: Series of loose fixes Amadeusz Sławiński
2026-10-14 20:06 ` [PATCH 1/8] ASoC: soc-link: Correct stream stop operations in snd_soc_link_trigger Amadeusz Sławiński
2026-10-14 20:06 ` [PATCH 2/8] ASoC: ops: Fix return value in snd_soc_limit_volume() Amadeusz Sławiński
2026-10-14 20:06 ` [PATCH 3/8] ASoC: soc-topology-test: Check return value of kunit_device_register() Amadeusz Sławiński
2026-10-14 20:06 ` [PATCH 4/8] ASoC: soc-card-test: " Amadeusz Sławiński
2026-10-14 20:06 ` [PATCH 5/8] ASoC: soc-ac97: Fix error handling in snd_soc_new_ac97_component() Amadeusz Sławiński
2026-10-14 20:06 ` [PATCH 6/8] ASoC: soc-ac97: Fix debug message Amadeusz Sławiński
2026-10-14 20:06 ` Amadeusz Sławiński [this message]
2026-10-14 20:06 ` [PATCH 8/8] ASoC: soc-dapm: Remove widget from cache on removal Amadeusz Sławiński
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=20261014200608.118770-8-amade@asmblr.net \
--to=amade@asmblr.net \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®