Skip to content

Commit 3f58ff6

Browse files
yaochunhungbroonie
authored andcommitted
ASoC: SOF: mediatek: mt8195: remove a redundant comparison of sram
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 <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 8a0eb06 commit 3f58ff6

File tree

2 files changed

+0
-7
lines changed

2 files changed

+0
-7
lines changed

sound/soc/sof/mediatek/mt8195/mt8195.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -215,11 +215,6 @@ static int platform_parse_resource(struct platform_device *pdev, void *data)
215215

216216
adsp->pa_sram = (phys_addr_t)mmio->start;
217217
adsp->sramsize = resource_size(mmio);
218-
if (adsp->sramsize < TOTAL_SIZE_SHARED_SRAM_FROM_TAIL) {
219-
dev_err(dev, "adsp SRAM(%#x) is not enough for share\n",
220-
adsp->sramsize);
221-
return -EINVAL;
222-
}
223218

224219
dev_dbg(dev, "sram pbase=%pa,%#x\n", &adsp->pa_sram, adsp->sramsize);
225220

sound/soc/sof/mediatek/mt8195/mt8195.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,6 @@ struct snd_sof_dev;
139139
#define DSP_MBOX1_BAR 6
140140
#define DSP_MBOX2_BAR 7
141141

142-
#define TOTAL_SIZE_SHARED_SRAM_FROM_TAIL 0x0
143-
144142
#define SIZE_SHARED_DRAM_DL 0x40000 /*Shared buffer for Downlink*/
145143
#define SIZE_SHARED_DRAM_UL 0x40000 /*Shared buffer for Uplink*/
146144

0 commit comments

Comments
 (0)