Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp35170321rwd; Mon, 10 Jul 2023 03:45:31 -0700 (PDT) X-Google-Smtp-Source: APBJJlF3xp7GP3RRbHZpxAIRNAA0vMuXfV8ZSdK8mLtl/FU6E4YGXeAdQZjF+as221EpGIERWrgk X-Received: by 2002:aa7:ccd4:0:b0:51d:e255:6173 with SMTP id y20-20020aa7ccd4000000b0051de2556173mr10816168edt.0.1688985931192; Mon, 10 Jul 2023 03:45:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688985931; cv=none; d=google.com; s=arc-20160816; b=UaW04sFqi/pMBxSyPfrDpUmwSWZygnNCHnYD5qk5vGhB1mF0spb8qb6gei4kvXDjAp Dx5umCAKLZfM+PPTBjl+89CAnkIgEN52hXY18Z/OAu3Zqi/g6ecfXHiM2AbiJdn+9ZTd gg5b4/O30FirHg79MrNUxtpncgubW2WTRv0A5xRsdMVPBvQKEY8L1TexP2cct3kCwenT UaS5ykKUNC/+4h3b5GeVBz2wgAFY9+o5lKAg0lGOWwAVh+j1wcNqqctgkNP0uVUDXT+M XZ8bGwtMFgM/ik5YCKF3dX7yj9QRN7grsmlCbjo/QRYtyVMeuttxqEMZ/n41M+1aPJiy wShg== 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; bh=sSAQNHr0Tuu5w+wBkg85Px+nRZe1E5e8jRYlgIDrnpw=; fh=/ZqpAP8bC36i4IInRe3vCSZ24/TVToXdss7fr6cDdV8=; b=SqZlEolnFKudcIaNCrXknKkxC8TSEKLTs693qTIXxTv6WaRLkuAIPCmdALs+Hc/YKc 3HNqmWNm0+R1IjvJJO2TGgHsfen5MaO4ym+FjkI5+tQIf8voaCl0hJGvAm8ECnXRewhh XhFuYTQ3QxQIvM5A2s4IhFmmkGjx5jTkKTsFiWQNil2VRtkmajS22ZDPYuWYJmiUDksM d50vP9Dd43Lkvz2kgF5cFPBpZ0H9HMGUJLD2q8oMZ374W/zU2kObDucRRrf6g357ffcQ xTJHgQebf5eeh1v3wXwKgJL58pT0QYUBTyGgupPQySkFr4kHHc6zF0TqiQ+b/pIuK6KL 3gUA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b13-20020aa7c6cd000000b0051e24b6b536si9810691eds.232.2023.07.10.03.45.07; Mon, 10 Jul 2023 03:45:31 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233314AbjGJKMM (ORCPT + 99 others); Mon, 10 Jul 2023 06:12:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232851AbjGJKLy (ORCPT ); Mon, 10 Jul 2023 06:11:54 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9B9252724 for ; Mon, 10 Jul 2023 03:09:39 -0700 (PDT) Received: from loongson.cn (unknown [10.20.42.43]) by gateway (Coremail) with SMTP id _____8AxV_Hh2KtkwBcDAA--.9201S3; Mon, 10 Jul 2023 18:09:37 +0800 (CST) Received: from openarena.loongson.cn (unknown [10.20.42.43]) by localhost.localdomain (Coremail) with SMTP id AQAAf8Cx_c7g2KtknCInAA--.45834S2; Mon, 10 Jul 2023 18:09:36 +0800 (CST) From: Sui Jingfeng To: Sui Jingfeng , David Airlie , Daniel Vetter , Thomas Zimmermann , Li Yi Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, loongson-kernel@lists.loongnix.cn, kernel test robot Subject: [PATCH] drm/loongson: Fix two warnings because of passing wrong type Date: Mon, 10 Jul 2023 18:09:31 +0800 Message-Id: <20230710100931.255234-1-suijingfeng@loongson.cn> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf8Cx_c7g2KtknCInAA--.45834S2 X-CM-SenderInfo: xvxlyxpqjiv03j6o00pqjv00gofq/ X-Coremail-Antispam: 1Uk129KBj93XoW7tw4fur45Gw15KFWUXFykXrc_yoW8Ar1kpF 47Ca48trZ8Jr12yr4kG3WUZ34Fv3ZaqFZa9FZ7C3Z09w1DAF1UZF1kuFW5Kry7Zay2vrWa yr93G3yag3WqqwcCm3ZEXasCq-sJn29KB7ZKAUJUUUU7529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUU9Fb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r1Y6r17M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_JFI_Gr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Gr0_Cr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x0267AK xVW8Jr0_Cr1UM2kKe7AKxVWUXVWUAwAS0I0E0xvYzxvE52x082IY62kv0487Mc804VCY07 AIYIkI8VC2zVCFFI0UMc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWU AVWUtwAv7VC2z280aVAFwI0_Gr0_Cr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcxkI7V AKI48JMxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMxCIbckI1I0E14v2 6r1Y6r17MI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17 CEb7AF67AKxVWUtVW8ZwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF 0xvE2Ix0cI8IcVCY1x0267AKxVWUJVW8JwCI42IY6xAIw20EY4v20xvaj40_Jr0_JF4lIx AIcVC2z280aVAFwI0_Gr0_Cr1lIxAIcVC2z280aVCY1x0267AKxVW8JVW8JrUvcSsGvfC2 KfnxnUUI43ZEXa7IU8uuWJUUUUU== X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 When accessing I/O memory, we should pass '__iomem *' type instead of 'void *' simply, otherwise sparse tests will complain. After applied this patch, the following two sparse warnings got fixed. 1) drivers/gpu/drm/loongson/lsdc_benchmark.c:27:35: sparse: expected void volatile [noderef] __iomem * sparse: got void *kptr 2) drivers/gpu/drm/loongson/lsdc_benchmark.c:42:51: sparse: expected void const volatile [noderef] __iomem * sparse: got void *kptr Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202307100243.v3hv6aes-lkp@intel.com/ Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/loongson/lsdc_benchmark.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/loongson/lsdc_benchmark.c b/drivers/gpu/drm/loongson/lsdc_benchmark.c index b088646a2ff9..36e352820bdb 100644 --- a/drivers/gpu/drm/loongson/lsdc_benchmark.c +++ b/drivers/gpu/drm/loongson/lsdc_benchmark.c @@ -24,7 +24,7 @@ static void lsdc_copy_gtt_to_vram_cpu(struct lsdc_bo *src_bo, lsdc_bo_kmap(dst_bo); while (n--) - memcpy_toio(dst_bo->kptr, src_bo->kptr, size); + memcpy_toio((void __iomem *)dst_bo->kptr, src_bo->kptr, size); lsdc_bo_kunmap(src_bo); lsdc_bo_kunmap(dst_bo); @@ -39,7 +39,7 @@ static void lsdc_copy_vram_to_gtt_cpu(struct lsdc_bo *src_bo, lsdc_bo_kmap(dst_bo); while (n--) - memcpy_fromio(dst_bo->kptr, src_bo->kptr, size); + memcpy_fromio(dst_bo->kptr, (void __iomem *)src_bo->kptr, size); lsdc_bo_kunmap(src_bo); lsdc_bo_kunmap(dst_bo); -- 2.34.1