Commit afd842c031408f9eaf689ff417071eed15afa05e
Committed by
Mark Brown
1 parent
39473c2cbd
ASoC: SOF: imx: use resource_size
Use resource_size rather than a verbose computation on the end and start fields. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) <smpl> @@ struct resource ptr; @@ - (ptr.end - ptr.start + 1) + resource_size(&ptr) </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr> Link: https://lore.kernel.org/r/1595751933-4952-1-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Mark Brown <broonie@kernel.org>
Showing 1 changed file with 1 additions and 2 deletions Side-by-side Diff
sound/soc/sof/imx/imx8m.c
... | ... | @@ -188,8 +188,7 @@ |
188 | 188 | } |
189 | 189 | |
190 | 190 | sdev->bar[SOF_FW_BLK_TYPE_SRAM] = devm_ioremap_wc(sdev->dev, res.start, |
191 | - res.end - res.start + | |
192 | - 1); | |
191 | + resource_size(&res)); | |
193 | 192 | if (!sdev->bar[SOF_FW_BLK_TYPE_SRAM]) { |
194 | 193 | dev_err(sdev->dev, "failed to ioremap mem 0x%x size 0x%x\n", |
195 | 194 | base, size); |