Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp225955pxu; Thu, 7 Jan 2021 03:21:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJwZbBK/jzl27vUV2WOud9F5K4uwvuMpzuwphbgj0rjRNfk+/cDA/ZITsuY+8I467kgOJZc9 X-Received: by 2002:a17:906:3999:: with SMTP id h25mr6084197eje.146.1610018474414; Thu, 07 Jan 2021 03:21:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610018474; cv=none; d=google.com; s=arc-20160816; b=J8o1lYVhW6suRgC78UqmQtSauVJmlKKSorxgWeEnzhJFPAdpqPOiJxsTt0veKaI13t jyg/TjdiMs8ogv+zBwUTsnkjtQ5Wy/2BppD+oyTw5On02aFIsk38NT/P7e+Fq6ru55Zl SIxtV0pVLG3jULgxdtfaTdGSNNtlAW3gDNqY3lkvJ61Y7VuMMZSBpUNsGFpZjzF9zK0w YCFX+17KjkEbza+4nmCemqqgJvJaOUeocMCzjLPEEiJI6TDLlDpLsVZzA2w6uYQobkUN imb07/fV7mQPWXKCr5VA+aoFhYCk91kaFeBLzQgAdD9iHeojOw1D3q/UYWZ+kE91tE43 xGMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=a5USd1Z2jp89xtfhaLELvl2c76o0B82YmU0irXS67zI=; b=WnCD8gmEcPH0HLvVKuTuKPH/VmI28cSX6jllgAY+WyUVE1+ycIIRYgPqNBsCn9oJ6Y zTdHCBWEzm//n2qNAue18xrDSpsPuUr+wsj8Lus5zgbzJTnWvmGm97NLmkoEpdf9Q2oc V6nn+/kPNoSVezKLHBRUlhaYSrtLpDCmzomSeIH/erjZHRM+0zJQG+GorxisYrzozqzU HAiUhcjgQXY1gPFs34Fo4oZoBXoL0hMVM3sInyvLbKBMumrTtRYXXfPOclGAeXiB8a9S FqS3bHSy7p2Lm056utidim/bti/MW1GYKTMGZHNjaIT8C5X4i1mUSRy4G4zWGfu0T3/q 9VuQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v21si2086232edt.309.2021.01.07.03.20.50; Thu, 07 Jan 2021 03:21:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727865AbhAGLTF (ORCPT + 99 others); Thu, 7 Jan 2021 06:19:05 -0500 Received: from foss.arm.com ([217.140.110.172]:58076 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726326AbhAGLTD (ORCPT ); Thu, 7 Jan 2021 06:19:03 -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 8F39711B3; Thu, 7 Jan 2021 03:18:17 -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 752223F719; Thu, 7 Jan 2021 03:18:16 -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 Subject: [PATCH 2/3] acpi: cppc_acpi: add __iomem annotation to generic_comm_base pointer Date: Thu, 7 Jan 2021 11:17:16 +0000 Message-Id: <20210107111717.5571-3-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 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ppc_comm_addr is a virtual address to the PCC space and it's annotated with __iomem. Therefore, generic_comm_base which gets assigned the value of pcc_comm_address should be annotated as well. This already happens in check_pcc_chan(), but not in send_pcc_cmd(), which results in the following sparse warnings: drivers/acpi/cppc_acpi.c:237:18: warning: cast removes address space '__iomem' of expression drivers/acpi/cppc_acpi.c:299:9: warning: incorrect type in argument 2 (different address spaces) drivers/acpi/cppc_acpi.c:299:9: expected void volatile [noderef] __iomem *addr drivers/acpi/cppc_acpi.c:299:9: got unsigned short * drivers/acpi/cppc_acpi.c:302:9: warning: incorrect type in argument 2 (different address spaces) drivers/acpi/cppc_acpi.c:302:9: expected void volatile [noderef] __iomem *addr drivers/acpi/cppc_acpi.c:302:9: got unsigned short * Signed-off-by: Ionela Voinescu Cc: "Rafael J. Wysocki" Cc: Len Brown --- drivers/acpi/cppc_acpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c index 75aaf94ae0a9..fd71020f5d5f 100644 --- a/drivers/acpi/cppc_acpi.c +++ b/drivers/acpi/cppc_acpi.c @@ -233,8 +233,8 @@ static int send_pcc_cmd(int pcc_ss_id, u16 cmd) { int ret = -EIO, i; struct cppc_pcc_data *pcc_ss_data = pcc_data[pcc_ss_id]; - struct acpi_pcct_shared_memory *generic_comm_base = - (struct acpi_pcct_shared_memory *)pcc_ss_data->pcc_comm_addr; + struct acpi_pcct_shared_memory __iomem *generic_comm_base = + pcc_ss_data->pcc_comm_addr; unsigned int time_delta; /* -- 2.29.2.dirty