Message ID | 20240117135312.3381936-2-arnaud.pouliquen@foss.st.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-29038-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:42cf:b0:101:a8e8:374 with SMTP id q15csp921649dye; Wed, 17 Jan 2024 05:54:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IEX20JyZYlgaHq6UrzU0RgQqeKjAQfPkJKIJm1vs5rRrYBQ0WEJ98hQpRZjGPea9ltkHwjM X-Received: by 2002:a05:6359:2d4e:b0:175:b450:11bc with SMTP id rm14-20020a0563592d4e00b00175b45011bcmr5209594rwb.59.1705499694862; Wed, 17 Jan 2024 05:54:54 -0800 (PST) Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id l131-20020a633e89000000b005cd8dc9694dsi13980200pga.178.2024.01.17.05.54.54 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 05:54:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-29038-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=E4+PyAMs; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-29038-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29038-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 992DC28A657 for <ouuuleilei@gmail.com>; Wed, 17 Jan 2024 13:54:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AF75D20323; Wed, 17 Jan 2024 13:54:43 +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="E4+PyAMs" Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) (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 450BD1EA7A; Wed, 17 Jan 2024 13:54:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.132.182.106 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705499681; cv=none; b=jacxAvoZ+h8J1I0uDRbtPfDNQx35SDL66mRYM8qpDjxPiy/XpaPReRhq8fF/FIro1ihH8BRaw41zg8tadRc1GmxoFUH1OgVrrr1lBSCIBh+zZ9LZNutAGO+Cbr0850XWSpLz9I4C7HFAMUyKLX0ztc9TJxpmzfAZ+Vcubqgo+Ik= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705499681; 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=ksQCmbcZf/hzR3il6x7pw9ub06gQZJu/gF/QqhREsMMZZG1TBEzLSbTU3dxZHvSL9kIs8BK5vUmT/7qTBSxzHA1KdqySbASK/QSIbfBpZx1HGKSAdqVpJgLR1Nhbkb7xwZfZojPN0lgCELypm/mkqkScvlOujwHO70fDC5WDqbI= 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=E4+PyAMs; arc=none smtp.client-ip=185.132.182.106 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 (m0369458.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40HAKAxm021553; Wed, 17 Jan 2024 14:54:32 +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=E4 +PyAMsEQbMQZOxx9+rWKVqs54WNys23M4hU3APNaXxk2bpER3mbA1MD/sULO9TCE r3E5kK2awFE3j+Qku0h1nwS8cbwkiZUCbVLZqWJHNmAXIQ0AO0H5MZkLUDE1jW1F xAzQDyyQlc/lUB3Tz9bI/jC4EqmZcwDUujaHmQOJqoACyh35qer34LzWqE8vnrP7 u9BRJ2tgfTagaKl4vVn+xFoBPjAT23Lo4Q3bq3NtTwW2QkZ8qvKIHeuBLW9l6eAs g1QaRwkF8YKD4kmdDn1Qjtfz474/83iKkGLESCFSyEIFUg2ZXHVXbQJLdnEHVPT3 o5o+00VEN16LZhgUXQmw== 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 3vm4y51rt3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 17 Jan 2024 14:54:32 +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 1AD7B100079; Wed, 17 Jan 2024 14:54:32 +0100 (CET) Received: from Webmail-eu.st.com (shfdag1node2.st.com [10.75.129.70]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 0F87F209ED7; Wed, 17 Jan 2024 14:54:32 +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:54:31 +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:53:11 +0100 Message-ID: <20240117135312.3381936-2-arnaud.pouliquen@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240117135312.3381936-1-arnaud.pouliquen@foss.st.com> References: <20240117135312.3381936-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: 1788346047942989565 X-GMAIL-MSGID: 1788346047942989565 |
Series |
remoteproc: stm32: Fix sparse warnings
|
|
Commit Message
Arnaud POULIQUEN
Jan. 17, 2024, 1:53 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; }