Message ID | 20240117131817.3338146-2-arnaud.pouliquen@foss.st.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-29016-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:42cf:b0:101:a8e8:374 with SMTP id q15csp902785dye; Wed, 17 Jan 2024 05:19:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IExDN6hMzibod5GhJoDk0gsOESBOBm/L61Xq2SzSj/UpYhY0yH3YMUkvjIzpWfFhAtcMrPU X-Received: by 2002:a5b:c47:0:b0:dc2:2e5c:a21e with SMTP id d7-20020a5b0c47000000b00dc22e5ca21emr1791629ybr.105.1705497591213; Wed, 17 Jan 2024 05:19:51 -0800 (PST) Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id p12-20020a0c8c8c000000b0067f4f8cc986si11783672qvb.274.2024.01.17.05.19.51 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 05:19:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-29016-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=OYRHYEZC; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-29016-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29016-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 05BC81C21610 for <ouuuleilei@gmail.com>; Wed, 17 Jan 2024 13:19:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4CFBE208C5; Wed, 17 Jan 2024 13:18:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=foss.st.com header.i=@foss.st.com header.b="OYRHYEZC" Received: from mx08-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E590F20310; Wed, 17 Jan 2024 13:18:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.207.212.93 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705497519; cv=none; b=H4Tg8oNZ25yhb0BjUzThHJU1HqBukvdFKToZGBzQmTk2NSQcxs+lR+y47jbSz1c1akmxcSC/A+S9PqUfJfqeC/vGaj83W1+W26QFVXucgGe4U+GcKmmH3bnHFI0vDtPP8EiV1VGZVcrP58u3Z79QCUM5WfdpENaGyPMcQuSgW30= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705497519; c=relaxed/simple; bh=AypK8E09/Mzuxd5Srj0Lu/tNRobK+SoK76pawNCXbO4=; h=Received:DKIM-Signature:Received:Received:Received:Received:From: To:CC:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding:Content-Type: X-Originating-IP:X-ClientProxiedBy:X-Proofpoint-Virus-Version; b=n6022FoN0DjCyfAPhhhrCzoTh4N+uICgcsGF7+wfFr8JWxpuleiijCmuUYT+U3yDk8K0XQrDXoQ/Kjb8LrEtc3M2VzAilFWVvbXUfkoxL5+4cMmV5l2u7ELmdsO5Iy9MccjNsD8Wlm43B83Hqkfuu9cOmYsrZtthPqRxj/ah9Ms= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=foss.st.com; spf=pass smtp.mailfrom=foss.st.com; dkim=pass (2048-bit key) header.d=foss.st.com header.i=@foss.st.com header.b=OYRHYEZC; arc=none smtp.client-ip=91.207.212.93 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=foss.st.com Received: from pps.filterd (m0369457.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40HBoDgJ027246; Wed, 17 Jan 2024 14:18:28 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= selector1; bh=jvHYq2x6zb50rq4RigAEIEBXsievUeNuiAAuc8GiJqM=; b=OY RHYEZCNVoQ7HU7McWmCiUbs4GqU3JucuyjLL2fOdKG90TsXWxpJFTsZnpW3WUQf4 TZ6VyP7Q8nsr5Sbs9i456LyxdP4Yzw/pYgvTLdSNPbEejoSjw5H2IeQNGbv29rNi fkeO/Dwuev14DsAvHMgP36f73Q1rGp0Zbn7frkD96izxaq2TyGlVlaAFCfnCuyBm D7izK+HfDkUKy6zQGDNlWwp78GV7d9K8Uk+uX1HVJjvQm/V49auAODyXo93W532i czWPXMoSqgrEahYFqBnbydTVBjloVN6QVw+muZk+ZxOIp3Z7a7fPGXN1ikY21nNm m6a9TVPtNTJDi9J/t0PQ== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3vnbqc96b3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 17 Jan 2024 14:18:28 +0100 (CET) Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 2868C10007A; Wed, 17 Jan 2024 14:18:28 +0100 (CET) Received: from Webmail-eu.st.com (shfdag1node2.st.com [10.75.129.70]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 224E52085C4; Wed, 17 Jan 2024 14:18:28 +0100 (CET) Received: from localhost (10.252.22.63) by SHFDAG1NODE2.st.com (10.75.129.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Wed, 17 Jan 2024 14:18:27 +0100 From: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com> To: Bjorn Andersson <andersson@kernel.org>, Mathieu Poirier <mathieu.poirier@linaro.org> CC: <linux-remoteproc@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-stm32@st-md-mailman.stormreply.com>, <arnaud.pouliquen@foss.st.com> Subject: [PATCH 1/2] remoteproc: stm32: Fix incorrect type in assignment for va Date: Wed, 17 Jan 2024 14:18:16 +0100 Message-ID: <20240117131817.3338146-2-arnaud.pouliquen@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240117131817.3338146-1-arnaud.pouliquen@foss.st.com> References: <20240117131817.3338146-1-arnaud.pouliquen@foss.st.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SHFCAS1NODE2.st.com (10.75.129.73) To SHFDAG1NODE2.st.com (10.75.129.70) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-17_08,2024-01-17_01,2023-05-22_02 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788343841828985703 X-GMAIL-MSGID: 1788343841828985703 |
Series |
remoteproc: stm32: Fix sparse warnings
|
|
Commit Message
Arnaud POULIQUEN
Jan. 17, 2024, 1:18 p.m. UTC
The sparse tool complains about the attribute conversion between
a _iomem void * and a void *:
stm32_rproc.c:122:12: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *va @@ got void [noderef] __iomem * @@
stm32_rproc.c:122:12: sparse: expected void *va
stm32_rproc.c:122:12: sparse: got void [noderef] __iomem *
Add '__force' to explicitly specify that the cast is intentional.
This conversion is necessary to cast to virtual addresses pointer,used,
by the remoteproc core.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202312150052.HCiNKlqB-lkp@intel.com/
Fixes: 13140de09cc2 ("remoteproc: stm32: add an ST stm32_rproc driver")
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
---
drivers/remoteproc/stm32_rproc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/remoteproc/stm32_rproc.c b/drivers/remoteproc/stm32_rproc.c index 4f469f0bcf8b..2c28635219eb 100644 --- a/drivers/remoteproc/stm32_rproc.c +++ b/drivers/remoteproc/stm32_rproc.c @@ -120,7 +120,7 @@ static int stm32_rproc_mem_alloc(struct rproc *rproc, void *va; dev_dbg(dev, "map memory: %pad+%zx\n", &mem->dma, mem->len); - va = ioremap_wc(mem->dma, mem->len); + va = (__force void *)ioremap_wc(mem->dma, mem->len); if (IS_ERR_OR_NULL(va)) { dev_err(dev, "Unable to map memory region: %pad+0x%zx\n", &mem->dma, mem->len); @@ -137,7 +137,7 @@ static int stm32_rproc_mem_release(struct rproc *rproc, struct rproc_mem_entry *mem) { dev_dbg(rproc->dev.parent, "unmap memory: %pa\n", &mem->dma); - iounmap(mem->va); + iounmap((__force __iomem void *)mem->va); return 0; }