From: Thierry Reding <thierry.reding@gmail.com>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: Jon Hunter <jonathanh@nvidia.com>,
Dmitry Osipenko <digetx@gmail.com>,
linux-tegra@vger.kernel.org, kernel test robot <lkp@intel.com>
Subject: [PATCH] soc/tegra: fuse: Explicitly cast to/from __iomem
Date: Thu, 24 Feb 2022 13:27:28 +0100 [thread overview]
Message-ID: <20220224122728.459608-1-thierry.reding@gmail.com> (raw)
From: Thierry Reding <treding@nvidia.com>
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: kernel test robot <lkp@intel.com>
Fixes: 88724b78a84c ("soc/tegra: fuse: Use resource-managed helpers")
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
drivers/soc/tegra/fuse/fuse-tegra.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/soc/tegra/fuse/fuse-tegra.c b/drivers/soc/tegra/fuse/fuse-tegra.c
index 10d2ae99babd..aa94fda282f4 100644
--- a/drivers/soc/tegra/fuse/fuse-tegra.c
+++ b/drivers/soc/tegra/fuse/fuse-tegra.c
@@ -202,8 +202,8 @@ static const struct nvmem_cell_info tegra_fuse_cells[] = {
static void tegra_fuse_restore(void *base)
{
+ fuse->base = (void __iomem *)base;
fuse->clk = NULL;
- fuse->base = base;
}
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;
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)
return err;
--
2.35.1
next reply other threads:[~2022-02-24 12:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-24 12:27 Thierry Reding [this message]
2022-02-24 14:37 ` [PATCH] soc/tegra: fuse: Explicitly cast to/from __iomem Dmitry Osipenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220224122728.459608-1-thierry.reding@gmail.com \
--to=thierry.reding@gmail.com \
--cc=digetx@gmail.com \
--cc=jonathanh@nvidia.com \
--cc=linux-tegra@vger.kernel.org \
--cc=lkp@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox