From patchwork Fri Apr 7 16:14:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 13205040 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 864F8C77B61 for ; Fri, 7 Apr 2023 16:15:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=UORYdurJLoiwS6+EM3xw29pq5Mh2IanmiYfjNPk5yeg=; b=vQjFUuRHam8XLz tGqZMQa0SJJdtzTr8T8Xlg2X/oGCWYwQ+2eTw8YDLq3aD++2Z1sXjZLeIDLhuMiRq3/qwUxQwe9JP PkKIZBWl7GTFOMTqPNrQkfbEkQwfQKKYjWLfmZeDPyFhvfLYVnLWBeLJ3YqZypxk60A1sESyG3vN2 WU4mGr84hFtl9bsPViCyz3JmrQIBaBmPzfvqZj+WlaSXkstBmlwBRIFkTFn42sTUvKh2hoVHMitHQ S+2RNx6RNx6eadbnXIlJUxj6G1NQO+faRS3IUtoJl1ndwlLkVJu97+QydoeUrDzzzsza+PQZ+wLTx GYth+IDY77+0ohfbthRQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pkojX-00Agt5-0m; Fri, 07 Apr 2023 16:14:39 +0000 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pkojT-00Agrg-0t for linux-arm-kernel@lists.infradead.org; Fri, 07 Apr 2023 16:14:36 +0000 Received: by mail-pj1-x102a.google.com with SMTP id r7-20020a17090b050700b002404be7920aso41916335pjz.5 for ; Fri, 07 Apr 2023 09:14:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680884071; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=va/SV6E2+ud/jti2qYlNsmAiizf5dXOpYvfXoBKZhWU=; b=tmQXIDq93SdrLxctIy/NUHVgpSL3ppxF6Ir29BQVL+Y/2ykQd1PhMENFj/gK1ITS4G GQf6+EbQmFyPoESHGoEv5rNkjE6yMGY3Ymaa5FUAlEsGsiulTy8Wlxv1Sc+/6KIiSJoc 6J36gjmUQyqjS/GRf66ztU9QQ57ZHnf32oMyFfA84vVNVKdY/ciU5Lt/zhn2bIDJpiBM /qKZlWuFtx4Ku61jRrS/Aiq4+dSiy10bbzgA6ZfbBNLITeuXw6S+R1VOrW7x2E/dYcSw unVoyGLyRhfd5sK2XJdz5nILht8f3XT93DGk+ibup971sApa9/WEpJ8nsyMKo6iRZVg3 s+HA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680884071; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=va/SV6E2+ud/jti2qYlNsmAiizf5dXOpYvfXoBKZhWU=; b=lM89lhkCZx4VM0I2DCp4UYA+PyAZD5/bOW9WZj86CC11zAsNEVfE5qAD5PKf2vs0sI YfonIVhldvQr9fUHgDtCsBmUdn7vjjasXIs054Cy1nsXJLkqvfFAR/Ri7KCs79qZGi7B Bf3dyUpJeEl6faR93e2r1El3M9diqa8jGLQ622xa/USoMUy8M7VnGjYnzzzIRAm4/NXQ QYP5XNzPpldyKt0U/a8w6pfkQCHbeN9Mvj1G0fp4cs0Rpm5k3ZEY2NRmhOmiOr+ptzzj sxCJi3D1LdjoiiobFIej1HpdmweiZrWS7ag2Gg0bLBzH/IMYYEFk4qc3ZHG//I4Z0NFv 2eGQ== X-Gm-Message-State: AAQBX9expzXPqG1R4MNLvlfR6Wm4BkCwQcgGlVStqc7TEeW3wOSZV0xN opemaiDiQBnvIQjXKJE1WQMzMg== X-Google-Smtp-Source: AKy350atjMY/kis0Ii/ZkRXNjB42cq9O4CbNOs67ggofFXNiFSoQApkLnrEZ46mrdLQ/A52BxMeDrw== X-Received: by 2002:a17:902:ec8b:b0:1a2:940c:e452 with SMTP id x11-20020a170902ec8b00b001a2940ce452mr2779756plg.9.1680884071643; Fri, 07 Apr 2023 09:14:31 -0700 (PDT) Received: from p14s.cg.shawcable.net ([2604:3d09:148c:c800:f97d:e249:15ae:2498]) by smtp.gmail.com with ESMTPSA id e11-20020a170902ed8b00b001a1ea1d6d65sm3112165plj.272.2023.04.07.09.14.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Apr 2023 09:14:31 -0700 (PDT) From: Mathieu Poirier To: iuliana.prodan@nxp.com, andersson@kernel.org Cc: linux-remoteproc@vger.kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] remoteproc: imx_dsp_rproc: Fix kernel test robot sparse warning Date: Fri, 7 Apr 2023 10:14:29 -0600 Message-Id: <20230407161429.3973177-1-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230407_091435_506896_A9BF3516 X-CRM114-Status: GOOD ( 12.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This patch fixes the kernel test robot warning reported here: https://lore.kernel.org/bpf/642f916b.pPIKZ%2Fl%2F%2Fbw8tvIH%25lkp@intel.com/T/ Fixes: 408ec1ff0caa ("remoteproc: imx_dsp_rproc: Add custom memory copy implementation for i.MX DSP Cores") Signed-off-by: Mathieu Poirier Tested-by: Iuliana Prodan Reviewed-by: Iuliana Prodan --- Iuliana - please thest this on your side --- drivers/remoteproc/imx_dsp_rproc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/remoteproc/imx_dsp_rproc.c b/drivers/remoteproc/imx_dsp_rproc.c index 21759d9e5b7b..c805cb83cacc 100644 --- a/drivers/remoteproc/imx_dsp_rproc.c +++ b/drivers/remoteproc/imx_dsp_rproc.c @@ -750,12 +750,12 @@ static void imx_dsp_rproc_kick(struct rproc *rproc, int vqid) * The IRAM is part of the HiFi DSP. * According to hw specs only 32-bits writes are allowed. */ -static int imx_dsp_rproc_memcpy(void *dest, const void *src, size_t size) +static int imx_dsp_rproc_memcpy(void *dst, const void *src, size_t size) { + void __iomem *dest = (void __iomem *)dst; const u8 *src_byte = src; const u32 *source = src; u32 affected_mask; - u32 *dst = dest; int i, q, r; u32 tmp; @@ -768,7 +768,7 @@ static int imx_dsp_rproc_memcpy(void *dest, const void *src, size_t size) /* copy data in units of 32 bits at a time */ for (i = 0; i < q; i++) - writel(source[i], &dst[i]); + writel(source[i], dest + i * 4); if (r) { affected_mask = GENMASK(8 * r, 0); @@ -799,8 +799,8 @@ static int imx_dsp_rproc_memcpy(void *dest, const void *src, size_t size) */ static int imx_dsp_rproc_memset(void *addr, u8 value, size_t size) { + void __iomem *tmp_dst = (void __iomem *)addr; u32 tmp_val = value; - u32 *tmp_dst = addr; u32 affected_mask; int q, r; u32 tmp;