From patchwork Tue Jul 4 05:02:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhang, Rui" X-Patchwork-Id: 699172 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9EA04EB64D9 for ; Tue, 4 Jul 2023 05:02:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229722AbjGDFCy (ORCPT ); Tue, 4 Jul 2023 01:02:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229546AbjGDFCx (ORCPT ); Tue, 4 Jul 2023 01:02:53 -0400 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CE851B0; Mon, 3 Jul 2023 22:02:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1688446972; x=1719982972; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=MvQSWM3JXLJmmP7PlmgAPhDJ4YePLKBMLemgFv7W6HA=; b=iwTFMLngiIm6yBaVEIrKIn7RkbgBilVmXG7KFDC3XQ1q1wWi/eTnoEwT u8RHsrpM2zcZwooHEShO+n0hTqcg+BL44qdtnzc64/s37YsZH2kO10rvF b1/NErtRg36Na3X/Fcn7aaFfyoSVY+GVhr4WmkjYHWZe7u1jUWnt2R1nE 5GzO+Zpw9XoON/EMe2dlD8w/uaeRP2CSPPX6G2vsYLE3oSuLc9KYgnE5g 0bSnXfo6odr5r4/ssJ+6RMZFLAODrZaNG55SWh6svuLPpkqvyzcXIvgrV VHR6gtf+Vn0dIc2ZQOkrivN5H/28b1LXG+x+VLq0GFuUlAQnNSaoAcdkc A==; X-IronPort-AV: E=McAfee;i="6600,9927,10760"; a="360512747" X-IronPort-AV: E=Sophos;i="6.01,179,1684825200"; d="scan'208";a="360512747" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jul 2023 22:02:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10760"; a="832032966" X-IronPort-AV: E=Sophos;i="6.01,179,1684825200"; d="scan'208";a="832032966" Received: from rzhang1-mobl7.sh.intel.com ([10.238.6.118]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jul 2023 22:02:50 -0700 From: Zhang Rui To: linux-pm@vger.kernel.org, rafael.j.wysocki@intel.com Cc: daniel.lezcano@linaro.org, linux-kernel@vger.kernel.org, lkp@intel.com Subject: [PATCH] powercap: intel_rapl_tpmi: Fix a sparse warning Date: Tue, 4 Jul 2023 13:02:38 +0800 Message-Id: <20230704050238.712223-1-rui.zhang@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org 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 Closes: https://lore.kernel.org/oe-kbuild-all/202307031405.dy3druuy-lkp@intel.com/ Signed-off-by: Zhang Rui --- 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 */