Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4726335iob; Sun, 8 May 2022 23:24:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTkjaCuvl24X16XouFObq1xchmhIoZALkzIstNIwGz0Ug3jwnHcw7EoI15+aokuuI9QGtO X-Received: by 2002:a17:902:d547:b0:15e:c404:5a3b with SMTP id z7-20020a170902d54700b0015ec4045a3bmr14643343plf.110.1652077486288; Sun, 08 May 2022 23:24:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652077486; cv=none; d=google.com; s=arc-20160816; b=je0rtSWLj29z9Q/0UQyRjTtRPEggxVtcwI+HGeRtrCSGsDJM4BX5LZpOxXSs/VK2xw UzgGthDFdP+8hua1ZsZ2xxvoGDR0/42yofkHeDTTcymWk2xHEEwjJ+LZMSS9TF5ikqR7 p1b/GVt3SQ1hfdZNsU7IepxhAhazXWZUaL4YaxJuxPYfV1tKi3nnIj8om80UO3fFIXwz bcw4gBjnHT+DP2mH7bVuYD1eK0SAtmXVhcPrzZSTtgTekM3Ih3AvVirq2vEzM87Lge1q lW+CJez1gmmeTfPYy0z20co4Dg5R4/wGMRKza8l3nsKl5EuadTyOdwATRyj57AHQ+EO5 iTjA== 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=vncVoL2JhBNKljKiob7OIeoa3sEmbpg073822r/dh9w=; b=CddU7BIwN9AHaw7yQtxMlUWVBX56GTfXVmqpgRA151RdsLjwvZM4R2EBF0xBbdsMW8 6buupnEOxM1wU08Xgx5r+uWBBD1r1595QGIClzHknmthtuq1TPaB/XjnzPa9097tjbEn JtqXS4fYuBZmMQguHPWXlE3jo1tjqNxXYB622CVXd5I2hfJ3V0NUqRJGRaTRqEFQ8f9z 6Rl98IhZzTSeoIGJSFiMCoPmGUgZjcalRFNt+dMZlRZhGKBcyHrOkal/0O9wG77CQiHn qfwYa9+gCwk46lNZ14U0geVZjc7/is8oP/DcMhQc0JCnbZzw2dvq1wLy/fX2i1ujYXZ+ cliw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VbH7Buuf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id e14-20020a056a00162e00b0050acaaed691si11228901pfc.268.2022.05.08.23.24.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 23:24:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VbH7Buuf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id EBFFA14B678; Sun, 8 May 2022 23:22:03 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1445209AbiEGBiY (ORCPT + 99 others); Fri, 6 May 2022 21:38:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236028AbiEGBiW (ORCPT ); Fri, 6 May 2022 21:38:22 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 958265F25D for ; Fri, 6 May 2022 18:34:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1651887276; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vncVoL2JhBNKljKiob7OIeoa3sEmbpg073822r/dh9w=; b=VbH7BuufTxDCXdiSmb3llf0EXpmP+7icFWMcIHrHunjAn5q5kBuS6yIxuFdNk6Cidar384 PBWWx//APkbZeWu2rj9f+vcM2V2WwIeNoLQ4WWWjVZDyln7EcNhU9dOjt6PA2xC5gqX6xx 1GsQVAAyyeRV6UOZM0nHkpFCBDsj95g= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-245-qAWFsuJSNgSMVyTzlT0U4Q-1; Fri, 06 May 2022 21:34:21 -0400 X-MC-Unique: qAWFsuJSNgSMVyTzlT0U4Q-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D3E3B2999B5B; Sat, 7 May 2022 01:34:20 +0000 (UTC) Received: from MiWiFi-R3L-srv.redhat.com (ovpn-13-18.pek2.redhat.com [10.72.13.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2B34E40D2971; Sat, 7 May 2022 01:34:15 +0000 (UTC) From: Baoquan He To: ysato@users.sourceforge.jp, dalias@libc.org Cc: linux-sh@vger.kernel.org, bhe@redhat.com, linux-kernel@vger.kernel.org, kernel test robot Subject: [PATCH] sh: cast away __iomem to remove sparse warning Date: Sat, 7 May 2022 09:34:11 +0800 Message-Id: <20220507013411.74277-1-bhe@redhat.com> MIME-Version: 1.0 Content-type: text/plain Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE 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 LKP reported a sparse warning in arch/sh/kernel/crash_dump.c during a kdump patchset reviewing: https://lore.kernel.org/all/202204082128.JKXXDGpa-lkp@intel.com/T/#u ../arch/sh/kernel/crash_dump.c:23:36: sparse: warning: incorrect type in argument 1 (different address spaces) ../arch/sh/kernel/crash_dump.c:23:36: sparse: expected void const *addr ../arch/sh/kernel/crash_dump.c:23:36: sparse: got void [noderef] __iomem * This warning happened when __iomem pointer is passed into fucntion which doesn't expect it. Casting away the __iomem can fix it. Reported-by: kernel test robot Signed-off-by: Baoquan He --- arch/sh/kernel/crash_dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/sh/kernel/crash_dump.c b/arch/sh/kernel/crash_dump.c index 19ce6a950aac..52d1d54eb6b1 100644 --- a/arch/sh/kernel/crash_dump.c +++ b/arch/sh/kernel/crash_dump.c @@ -20,7 +20,7 @@ ssize_t copy_oldmem_page(struct iov_iter *iter, unsigned long pfn, return 0; vaddr = ioremap(pfn << PAGE_SHIFT, PAGE_SIZE); - csize = copy_to_iter(vaddr + offset, csize, iter); + csize = copy_to_iter((const void __force *)vaddr + offset, csize, iter); iounmap(vaddr); return csize; -- 2.34.1