[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZ5v0gZz1RCqp=Do0RTOCwPvWW9E_SQSyFjuRVuBkR9jxCJjw@mail.gmail.com>
Date: Tue, 11 Jul 2023 20:14:23 +0200
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Zhang Rui <rui.zhang@...el.com>
Cc: linux-pm@...r.kernel.org, rafael.j.wysocki@...el.com,
daniel.lezcano@...aro.org, linux-kernel@...r.kernel.org,
lkp@...el.com
Subject: Re: [PATCH] powercap: intel_rapl_tpmi: Fix a sparse warning
On Tue, Jul 4, 2023 at 7:02 AM Zhang Rui <rui.zhang@...el.com> wrote:
>
> Fix a sparse warning in intel_rapl_tpmi driver.
>
> ../drivers/powercap/intel_rapl_tpmi.c:141:41: sparse: warning: incorrect type in initializer (different address spaces)
> ../drivers/powercap/intel_rapl_tpmi.c:141:41: sparse: expected unsigned long long [usertype] *tpmi_rapl_regs
> ../drivers/powercap/intel_rapl_tpmi.c:141:41: sparse: got void [noderef] __iomem *
>
> Fixes: 9eef7f9da928 ("powercap: intel_rapl: Introduce RAPL TPMI interface driver")
> Reported-by: kernel test robot <lkp@...el.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202307031405.dy3druuy-lkp@intel.com/
> Signed-off-by: Zhang Rui <rui.zhang@...el.com>
> ---
> drivers/powercap/intel_rapl_tpmi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/powercap/intel_rapl_tpmi.c b/drivers/powercap/intel_rapl_tpmi.c
> index 4f4f13ded225..05f664a096ab 100644
> --- a/drivers/powercap/intel_rapl_tpmi.c
> +++ b/drivers/powercap/intel_rapl_tpmi.c
> @@ -138,7 +138,7 @@ static int parse_one_domain(struct tpmi_rapl_package *trp, u32 offset)
> enum tpmi_rapl_register reg_index;
> enum rapl_domain_reg_id reg_id;
> int tpmi_domain_size, tpmi_domain_flags;
> - u64 *tpmi_rapl_regs = trp->base + offset;
> + u64 *tpmi_rapl_regs = (u64 *)(trp->base + offset);
> u64 tpmi_domain_header = readq((void __iomem *)tpmi_rapl_regs);
>
> /* Domain Parent bits are ignored for now */
> --
Applied as 6.5-rc material, thanks!
Powered by blists - more mailing lists