From patchwork Thu Jan 7 11:17:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ionela Voinescu X-Patchwork-Id: 12003603 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2722FC43381 for ; Thu, 7 Jan 2021 11:19:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E0AC223142 for ; Thu, 7 Jan 2021 11:19:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727771AbhAGLTA (ORCPT ); Thu, 7 Jan 2021 06:19:00 -0500 Received: from foss.arm.com ([217.140.110.172]:58064 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726326AbhAGLTA (ORCPT ); Thu, 7 Jan 2021 06:19:00 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6698B106F; Thu, 7 Jan 2021 03:18:14 -0800 (PST) Received: from e108754-lin.cambridge.arm.com (unknown [10.1.198.32]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 17AAC3F719; Thu, 7 Jan 2021 03:18:12 -0800 (PST) From: Ionela Voinescu To: rjw@rjwysocki.net, lenb@kernel.org, robert.moore@intel.com Cc: viro@zeniv.linux.org.uk, catalin.marinas@arm.com, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, ionela.voinescu@arm.com, Erik Kaneda , "Rafael J. Wysocki" Subject: [PATCH 1/3] acpi: cppc_acpi: remove __iomem annotation for cpc_reg's address Date: Thu, 7 Jan 2021 11:17:15 +0000 Message-Id: <20210107111717.5571-2-ionela.voinescu@arm.com> X-Mailer: git-send-email 2.29.2.dirty In-Reply-To: <20210107111717.5571-1-ionela.voinescu@arm.com> References: <20210107111717.5571-1-ionela.voinescu@arm.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org The cpc_reg address does not represent either an I/O virtual address, nor a field located in iomem. This address is used as an address offset which eventually is given as physical address argument to ioremap or PCC space offset to GET_PCC_VADDR. Therefore, having the __iomem annotation does not make sense. Fix the following sparse warnings by removing the __iomem annotation for cpc_reg's address. drivers/acpi/cppc_acpi.c:762:37: warning: dereference of noderef expression drivers/acpi/cppc_acpi.c:765:48: warning: dereference of noderef expression drivers/acpi/cppc_acpi.c:948:25: warning: dereference of noderef expression drivers/acpi/cppc_acpi.c:954:67: warning: dereference of noderef expression drivers/acpi/cppc_acpi.c:987:25: warning: dereference of noderef expression drivers/acpi/cppc_acpi.c:993:68: warning: dereference of noderef expression drivers/acpi/cppc_acpi.c:1120:13: warning: dereference of noderef expression drivers/acpi/cppc_acpi.c:1134:13: warning: dereference of noderef expression drivers/acpi/cppc_acpi.c:1137:13: warning: dereference of noderef expression drivers/acpi/cppc_acpi.c:1182:14: warning: dereference of noderef expression drivers/acpi/cppc_acpi.c:1212:13: warning: dereference of noderef expression Suggested-by: Al Viro Signed-off-by: Ionela Voinescu Cc: Robert Moore Cc: Erik Kaneda Cc: "Rafael J. Wysocki" --- include/acpi/cppc_acpi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/acpi/cppc_acpi.h b/include/acpi/cppc_acpi.h index 232838d28f50..c7fc4524e151 100644 --- a/include/acpi/cppc_acpi.h +++ b/include/acpi/cppc_acpi.h @@ -39,7 +39,7 @@ struct cpc_reg { u8 bit_width; u8 bit_offset; u8 access_width; - u64 __iomem address; + u64 address; } __packed; /*