All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Osipenko <dmitry.osipenko@collabora.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: Re: [PATCH] soc/tegra: fuse: Explicitly cast to/from __iomem
Date: Thu, 24 Feb 2022 17:37:40 +0300	[thread overview]
Message-ID: <d9b9f39a-2605-b634-a8ca-627be8274d9e@collabora.com> (raw)
In-Reply-To: <20220224122728.459608-1-thierry.reding@gmail.com>


On 2/24/22 15:27, Thierry Reding wrote:
> 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;
>  

Thank you, I had the same change on my mind.

Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>

      reply	other threads:[~2022-02-24 14:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-24 12:27 [PATCH] soc/tegra: fuse: Explicitly cast to/from __iomem Thierry Reding
2022-02-24 14:37 ` Dmitry Osipenko [this message]

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=d9b9f39a-2605-b634-a8ca-627be8274d9e@collabora.com \
    --to=dmitry.osipenko@collabora.com \
    --cc=digetx@gmail.com \
    --cc=jonathanh@nvidia.com \
    --cc=linux-tegra@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=thierry.reding@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.