提交 b631c9c2 编写于 作者: T Thierry Reding

soc/tegra: fuse: Explicitly cast to/from __iomem

sparse is picky about casts between different address spaces. A cast to
plain void * needs to be accompanied by a __force modifier and casting
back to void __iomem * needs to be explicit to avoid warnings.
Reported-by: Nkernel test robot <lkp@intel.com>
Fixes: 88724b78 ("soc/tegra: fuse: Use resource-managed helpers")
Signed-off-by: NThierry Reding <treding@nvidia.com>
Reviewed-by: NDmitry Osipenko <dmitry.osipenko@collabora.com>
Signed-off-by: NThierry Reding <treding@nvidia.com>
上级 6f259bf1
...@@ -202,8 +202,8 @@ static const struct nvmem_cell_info tegra_fuse_cells[] = { ...@@ -202,8 +202,8 @@ static const struct nvmem_cell_info tegra_fuse_cells[] = {
static void tegra_fuse_restore(void *base) static void tegra_fuse_restore(void *base)
{ {
fuse->base = (void __iomem *)base;
fuse->clk = NULL; fuse->clk = NULL;
fuse->base = base;
} }
static int tegra_fuse_probe(struct platform_device *pdev) static int tegra_fuse_probe(struct platform_device *pdev)
...@@ -213,7 +213,7 @@ static int tegra_fuse_probe(struct platform_device *pdev) ...@@ -213,7 +213,7 @@ static int tegra_fuse_probe(struct platform_device *pdev)
struct resource *res; struct resource *res;
int err; int err;
err = devm_add_action(&pdev->dev, tegra_fuse_restore, base); err = devm_add_action(&pdev->dev, tegra_fuse_restore, (void __force *)base);
if (err) if (err)
return err; return err;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册