Commit 3f58ff6b authored by YC Hung's avatar YC Hung Committed by Mark Brown

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: default avatarYC Hung <yc.hung@mediatek.com>
Reviewed-by: default avatarAngeloGioacchino Del Regno <angeloigoacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20221215061046.16934-1-yc.hung@mediatek.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 8a0eb06e
...@@ -215,11 +215,6 @@ static int platform_parse_resource(struct platform_device *pdev, void *data) ...@@ -215,11 +215,6 @@ static int platform_parse_resource(struct platform_device *pdev, void *data)
adsp->pa_sram = (phys_addr_t)mmio->start; adsp->pa_sram = (phys_addr_t)mmio->start;
adsp->sramsize = resource_size(mmio); 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); dev_dbg(dev, "sram pbase=%pa,%#x\n", &adsp->pa_sram, adsp->sramsize);
......
...@@ -139,8 +139,6 @@ struct snd_sof_dev; ...@@ -139,8 +139,6 @@ struct snd_sof_dev;
#define DSP_MBOX1_BAR 6 #define DSP_MBOX1_BAR 6
#define DSP_MBOX2_BAR 7 #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_DL 0x40000 /*Shared buffer for Downlink*/
#define SIZE_SHARED_DRAM_UL 0x40000 /*Shared buffer for Uplink*/ #define SIZE_SHARED_DRAM_UL 0x40000 /*Shared buffer for Uplink*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment