* [PATCH] ASoC: SOF: mediatek: mt8195: remove a redundant comparison of sram
@ 2022-12-15 6:10 YC Hung
2022-12-15 10:31 ` AngeloGioacchino Del Regno
2022-12-27 11:57 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: YC Hung @ 2022-12-15 6:10 UTC (permalink / raw)
Cc: Pierre-Louis Bossart, Liam Girdwood, Peter Ujfalusi, Bard Liao,
Ranjani Sridharan, Kai Vehmanen, Daniel Baluta, Mark Brown,
Jaroslav Kysela, Takashi Iwai, Matthias Brugger, YC Hung,
AngeloGioacchino Del Regno, Chunxu Li, Allen-KH Cheng,
sound-open-firmware, alsa-devel, linux-arm-kernel,
linux-mediatek, linux-kernel, Curtis Malainey
DSP SRAM is not used for audio shared buffer between host and DSP so
TOTAL_SIZE_SHARED_SRAM_FROM_TAIL is zero. Remove the definition and
redundant comparison to fix coverity "unsigned compared against 0".
Signed-off-by: YC Hung <yc.hung@mediatek.com>
---
sound/soc/sof/mediatek/mt8195/mt8195.c | 5 -----
sound/soc/sof/mediatek/mt8195/mt8195.h | 2 --
2 files changed, 7 deletions(-)
diff --git a/sound/soc/sof/mediatek/mt8195/mt8195.c b/sound/soc/sof/mediatek/mt8195/mt8195.c
index 3c81e84fcecf..7c831e18483c 100644
--- a/sound/soc/sof/mediatek/mt8195/mt8195.c
+++ b/sound/soc/sof/mediatek/mt8195/mt8195.c
@@ -215,11 +215,6 @@ static int platform_parse_resource(struct platform_device *pdev, void *data)
adsp->pa_sram = (phys_addr_t)mmio->start;
adsp->sramsize = resource_size(mmio);
- if (adsp->sramsize < TOTAL_SIZE_SHARED_SRAM_FROM_TAIL) {
- dev_err(dev, "adsp SRAM(%#x) is not enough for share\n",
- adsp->sramsize);
- return -EINVAL;
- }
dev_dbg(dev, "sram pbase=%pa,%#x\n", &adsp->pa_sram, adsp->sramsize);
diff --git a/sound/soc/sof/mediatek/mt8195/mt8195.h b/sound/soc/sof/mediatek/mt8195/mt8195.h
index 7ffd523f936c..b4229170049f 100644
--- a/sound/soc/sof/mediatek/mt8195/mt8195.h
+++ b/sound/soc/sof/mediatek/mt8195/mt8195.h
@@ -139,8 +139,6 @@ struct snd_sof_dev;
#define DSP_MBOX1_BAR 6
#define DSP_MBOX2_BAR 7
-#define TOTAL_SIZE_SHARED_SRAM_FROM_TAIL 0x0
-
#define SIZE_SHARED_DRAM_DL 0x40000 /*Shared buffer for Downlink*/
#define SIZE_SHARED_DRAM_UL 0x40000 /*Shared buffer for Uplink*/
--
2.18.0
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] ASoC: SOF: mediatek: mt8195: remove a redundant comparison of sram
2022-12-15 6:10 [PATCH] ASoC: SOF: mediatek: mt8195: remove a redundant comparison of sram YC Hung
@ 2022-12-15 10:31 ` AngeloGioacchino Del Regno
2022-12-27 11:57 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-12-15 10:31 UTC (permalink / raw)
To: YC Hung
Cc: Pierre-Louis Bossart, Liam Girdwood, Peter Ujfalusi, Bard Liao,
Ranjani Sridharan, Kai Vehmanen, Daniel Baluta, Mark Brown,
Jaroslav Kysela, Takashi Iwai, Matthias Brugger, Chunxu Li,
Allen-KH Cheng, sound-open-firmware, alsa-devel,
linux-arm-kernel, linux-mediatek, linux-kernel, Curtis Malainey
Il 15/12/22 07:10, YC Hung ha scritto:
> DSP SRAM is not used for audio shared buffer between host and DSP so
> TOTAL_SIZE_SHARED_SRAM_FROM_TAIL is zero. Remove the definition and
> redundant comparison to fix coverity "unsigned compared against 0".
>
> Signed-off-by: YC Hung <yc.hung@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angeloigoacchino.delregno@collabora.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: SOF: mediatek: mt8195: remove a redundant comparison of sram
2022-12-15 6:10 [PATCH] ASoC: SOF: mediatek: mt8195: remove a redundant comparison of sram YC Hung
2022-12-15 10:31 ` AngeloGioacchino Del Regno
@ 2022-12-27 11:57 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2022-12-27 11:57 UTC (permalink / raw)
To: YC Hung
Cc: Pierre-Louis Bossart, Liam Girdwood, Peter Ujfalusi, Bard Liao,
Ranjani Sridharan, Kai Vehmanen, Daniel Baluta, Jaroslav Kysela,
Takashi Iwai, Matthias Brugger, AngeloGioacchino Del Regno,
Chunxu Li, Allen-KH Cheng, sound-open-firmware, alsa-devel,
linux-arm-kernel, linux-mediatek, linux-kernel, Curtis Malainey
On Thu, 15 Dec 2022 14:10:46 +0800, YC Hung wrote:
> DSP SRAM is not used for audio shared buffer between host and DSP so
> TOTAL_SIZE_SHARED_SRAM_FROM_TAIL is zero. Remove the definition and
> redundant comparison to fix coverity "unsigned compared against 0".
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: SOF: mediatek: mt8195: remove a redundant comparison of sram
commit: 3f58ff6b53c11773b1bd564082fae37d48e0cc40
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-12-27 11:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-15 6:10 [PATCH] ASoC: SOF: mediatek: mt8195: remove a redundant comparison of sram YC Hung
2022-12-15 10:31 ` AngeloGioacchino Del Regno
2022-12-27 11:57 ` Mark Brown
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®