Received: by 2002:a05:7412:8d1c:b0:fa:4c10:6cad with SMTP id bj28csp408537rdb; Wed, 17 Jan 2024 05:56:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IE7/EgRWs1wilrVNHBtsOawJrXf2kh5aTEmRkMgszpjMtMDBScLNQR5rMJRAhBBqylgWJeP X-Received: by 2002:a05:6359:1b07:b0:175:c0d2:bae5 with SMTP id up7-20020a0563591b0700b00175c0d2bae5mr5440076rwb.38.1705499814812; Wed, 17 Jan 2024 05:56:54 -0800 (PST) Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id e20-20020a656794000000b005ce02d98991si796642pgr.875.2024.01.17.05.56.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 05:56:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-29038-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::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-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29038-linux.lists.archive=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 349A5B223F7 for ; Wed, 17 Jan 2024 13:54:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DCDD2200DD; Wed, 17 Jan 2024 13:54:41 +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 To: Bjorn Andersson , Mathieu Poirier CC: , , , 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: List-Subscribe: List-Unsubscribe: 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 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 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 --- 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; } -- 2.25.1