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: 80906 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp399936vqo; Fri, 7 Apr 2023 09:33:07 -0700 (PDT) X-Google-Smtp-Source: AKy350YtfxMUSAPPcZg7/gIUnBW95QjAUkRWDGWyOLx25uj8jllreU1FKlXJqQG9lXa+exf4YkYm X-Received: by 2002:a17:90b:4d0f:b0:241:c25:14bb with SMTP id mw15-20020a17090b4d0f00b002410c2514bbmr2054782pjb.24.1680885186935; Fri, 07 Apr 2023 09:33:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680885186; cv=none; d=google.com; s=arc-20160816; b=LqsjthWi39EsfU4HD15Q9YkMOQE78fjcGWRJA0ksMyqLjrT98RbBvoKYrLYQ/4M37o Rb4NHC7cJiARK1Xd5OsuPXLRa3ZR+kjOs/3avFwIti5jlOW8GvQK8Jqox5QrgDDYwkvD UBeOWCu93R+GMaXVuF4Tpiv8RwXya8j7cLCKlUSgTDwsXreU+su0HlCCtLa1YqrpULpF ZbNfVjOOl+ej2IIUCy2XEeYcmwHaSCExqcuDsqiuyNL/sllNMI5/AxW8aOJWH8xuO9c6 hpKTXjtdoK6Ve4IZcW5ttFkUOJ/eAaLp/QL9qzmyP5p70jr+a9zCTvkkBvD8hVwxxxJA gqzg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=va/SV6E2+ud/jti2qYlNsmAiizf5dXOpYvfXoBKZhWU=; b=J6toOFsXIJg5R7sIzYSyHjvZn9LrEE2EX3lWUMscY2ZByUWbtPQz7dMhWjCSRHdEz2 1wOzaUBCX29Wx6kP9q1qAJmLDKyg739FManRFyLE/a6c64240IQFq4JrqKkgADkhcxJf RzawiK+0ibFkfWc5ypCgIVIhFxyhSgMrgEteNbTSw4C/DQeygBOWrdIhE/tWNeT5ovtq ikRUShr41E16HnAOrGKjOIQ2vZDrj1Klcamtd2fFy3wZhB3zafmmgHjRygMf4EyLuB9W kR6qZCEL8ISV2teTEcGynczqmHiTf3pTU5LsTwYou670E1A9TT/vG55DE/SJKTunBrzt 9WWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tmQXIDq9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y10-20020a17090a474a00b0023f254b442asi3766385pjg.78.2023.04.07.09.32.52; Fri, 07 Apr 2023 09:33:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tmQXIDq9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231343AbjDGQOf (ORCPT + 99 others); Fri, 7 Apr 2023 12:14:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230303AbjDGQOd (ORCPT ); Fri, 7 Apr 2023 12:14:33 -0400 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EE4D11D for ; Fri, 7 Apr 2023 09:14:32 -0700 (PDT) Received: by mail-pj1-x1033.google.com with SMTP id h12-20020a17090aea8c00b0023d1311fab3so43697159pjz.1 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=ciPnE83eBSXIQmiQMj/ZzKtP5l+1XsS3Z5cG7GugIa8rBZl2zQjyp8snL9C7loNks+ yT+FjQhqpPhjUru/9IT6SG9gXrWkWNtoxasWUK+6msdN19loDRbPT4GDk3u4OHzdTSS5 Ht5A6g/Z+XPYLkJFTdKjUsQy/MrsbMWSaQpqjSelJba3BlVaktxVYuWlj9H6O7/LrVlj 58pxLFUowUoUmqcqkSvNdF4WkSljB5h7rIEVRr9kzVV4qr2zOMFt1/lc7+1FIn/07+md iOgXbrOHBwzACDodLNfYRcbNNzsHqfXRFTZkJOMEyK21Dmiar1lmhLnkWslIc+/c7pST aMMg== X-Gm-Message-State: AAQBX9c6jdQHUmNwVfVEXqTi4GN6EJ2htj5oEOJ2S2+r0aXr+MvU39g1 y/ZowMXhFP1mnzEWI1hIjVEzDw== 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-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762535865469462323?= X-GMAIL-MSGID: =?utf-8?q?1762535865469462323?= 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;