Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp2618880rwo; Thu, 3 Aug 2023 12:07:02 -0700 (PDT) X-Google-Smtp-Source: APBJJlGFbQ54Z/BAEjqTyanF6QDhRnB4P2ckjC2HoCcHEWxAmpd8Zx1fZTW4KJ5PLLeyuu06SdoL X-Received: by 2002:a05:6402:b11:b0:522:5778:aed9 with SMTP id bm17-20020a0564020b1100b005225778aed9mr9334310edb.19.1691089621724; Thu, 03 Aug 2023 12:07:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691089621; cv=none; d=google.com; s=arc-20160816; b=va0ytvNMPx6rdnScnnSlIGRPLLMZdkvQMVrHvGmOt5PTQTyZ01zacHlnCojcAvug4r eEBG2e8/eWkGhLxb9LudF2cAMpNBSEkvIGzUFwLHNdE0K03IpKSw1cnnPIAUVqynTia7 3G+qaXCV6qmYgPvXgJDJOAVm2MieCPsxUYg9ThkmUJXZKxykGe1wLApHqwPmPEa83se8 d/tu3VvghAdQMZr0MtgiyarTOYcHrtUIZvBWcEGntsoZLWCgW6e8YbmogsLU8Ioy3Wnv D7etaJN3yMfujg2CBXhnN/TXKxDs+JoOjrdATWkQ93PLbLTXGA2D0TUPQYQZv3HYbttR ztDQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=dlgMxBU+gnbxavLK2CnXHLqjxrOHpsQhLJivrmp7gq8=; fh=Ii7qdeG42WQpLpi2F+Y9OG8JPs/iA1NkIDq1oHnDEC8=; b=b9ib6Ist5lNqyZOXWgjmjpBxrLhSXlzhpmeGnvuedyP2zV05rnuLPocWYfxJrO9110 NTEyaPTBd/cpENt4792HfViGaF3zpnP/lf4pnLqw31nQ3+fcptLbw5Ksa7Orvz/FsY3r PHk8s5FNKKNgUOsmfThtamo0WcsgWQiCZhXF5Sdb77906xUA/l7OszFcVTRt5gNyV2XL gQ+MtIsOHr2vkrSQhCTe/Fex4Rlhhfaz9nkxDXD9fG8r4/wrb2WYRtfS5/0mICK3IdlM 3x8k8v8zaFztJSjEe5s/OXvfHCdt4mItR9UP95go1tMjrIKJ+5/g0MozemGa+J5eVAa8 gLjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b="Mn/vo0Mo"; 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 f6-20020a05640214c600b005230a2c3b94si226126edx.609.2023.08.03.12.06.36; Thu, 03 Aug 2023 12:07:01 -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=@ventanamicro.com header.s=google header.b="Mn/vo0Mo"; 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 S235202AbjHCSAZ (ORCPT + 99 others); Thu, 3 Aug 2023 14:00:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235340AbjHCSAH (ORCPT ); Thu, 3 Aug 2023 14:00:07 -0400 Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CBFB44AF for ; Thu, 3 Aug 2023 10:59:57 -0700 (PDT) Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-686f1240a22so1103508b3a.0 for ; Thu, 03 Aug 2023 10:59:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1691085597; x=1691690397; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dlgMxBU+gnbxavLK2CnXHLqjxrOHpsQhLJivrmp7gq8=; b=Mn/vo0MoTkPiEepTolmO07DSHUYqv7rFmArT6LTUsVmzAqnBvKBjkRZBvhSJTyiZAM 1h1+n6DkofxPjLLD7asRa2i/oE66f7GWtWQqA9+nDJYue6PrwjDM067chowzEAr4ODxH vSRhcalLZi64uzfoqGFqhxbjGjGGDhdaLNb94wU3+LcfSd6SGzYCkrAI2qx43QP8mXm+ DJ0Il1lN5U+uqlCxzJ+JnPkr+AJ87TQm7Mbi6Aqs2pV30Apw6vIAlJMrvnORHqksud91 revKW71DM8rTMoqvZp3Ftaus2TBe8ju/o/MzItnmUE5tDKZn5+PQ0RhtNd0uQFIakZk6 1UZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691085597; x=1691690397; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dlgMxBU+gnbxavLK2CnXHLqjxrOHpsQhLJivrmp7gq8=; b=RiEslLS2xxJkCecSVJy25sfHuDbXlQMRwHPLm3JLbw6N127LQVVMsZq1J/IoBDNPgA 4OZJR5glZplMMlJ6NXgHpjY1pXXW8hw1OY3PN4+yG9/ZWsaeJuzHbpdPztqS6M5nB+9G FENzEGnVMolQzQGOx0VF7LGQAS4tU5bUr4VimGwUVjHGOm7tYYuIkGZ4Qpza6syCoLti v/0Uw6hdz96KQ32F9V50WtN9WMXlbmzQTOQpyrjavyDBYF4CQxPQaVk9PW5uVT5/oJ2q kQDbMyaCWviBJcAGfdzjQAl16XR6xxfbGOp2xVOn+CaFWZVoHeu1bmQsflyM4mBePq/b 4w0A== X-Gm-Message-State: ABy/qLZ5LMWFiBSrK6T/l2pIeIIdZXGs1nbOdcqfRLKZMW6ZFOGtokZr iP7bXMkrtxJ5tAWQsB72DDrS9g== X-Received: by 2002:a05:6a00:c86:b0:682:4c9f:aa0 with SMTP id a6-20020a056a000c8600b006824c9f0aa0mr23559310pfv.29.1691085596954; Thu, 03 Aug 2023 10:59:56 -0700 (PDT) Received: from sunil-pc.Dlink ([106.51.190.143]) by smtp.gmail.com with ESMTPSA id s8-20020aa78d48000000b0065a1b05193asm134952pfe.185.2023.08.03.10.59.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Aug 2023 10:59:56 -0700 (PDT) From: Sunil V L To: linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org Cc: Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Catalin Marinas , Will Deacon , "Rafael J . Wysocki" , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Greg Kroah-Hartman , Daniel Lezcano , Thomas Gleixner , Anup Patel , Marc Zyngier , Bjorn Helgaas , Robert Moore , Haibo Xu , Andrew Jones , Conor Dooley , Atish Kumar Patra , Sunil V L , kernel test robot Subject: [RFC PATCH v1 03/21] RISC-V: ACPI: Fix acpi_os_ioremap to return iomem address Date: Thu, 3 Aug 2023 23:28:58 +0530 Message-Id: <20230803175916.3174453-4-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230803175916.3174453-1-sunilvl@ventanamicro.com> References: <20230803175916.3174453-1-sunilvl@ventanamicro.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,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 acpi_os_ioremap() currently is a wrapper to memremap() on RISC-V. But the callers of acpi_os_ioremap() expect it to return __iomem address and hence sparse tool reports a new warning. Fix this issue by type casting to __iomem type. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202307230357.egcTAefj-lkp@intel.com/ Fixes: a91a9ffbd3a5 ("RISC-V: Add support to build the ACPI core") Signed-off-by: Sunil V L --- arch/riscv/include/asm/acpi.h | 2 +- arch/riscv/kernel/acpi.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/riscv/include/asm/acpi.h b/arch/riscv/include/asm/acpi.h index f71ce21ff684..d5604d2073bc 100644 --- a/arch/riscv/include/asm/acpi.h +++ b/arch/riscv/include/asm/acpi.h @@ -19,7 +19,7 @@ typedef u64 phys_cpuid_t; #define PHYS_CPUID_INVALID INVALID_HARTID /* ACPI table mapping after acpi_permanent_mmap is set */ -void *acpi_os_ioremap(acpi_physical_address phys, acpi_size size); +void __iomem *acpi_os_ioremap(acpi_physical_address phys, acpi_size size); #define acpi_os_ioremap acpi_os_ioremap #define acpi_strict 1 /* No out-of-spec workarounds on RISC-V */ diff --git a/arch/riscv/kernel/acpi.c b/arch/riscv/kernel/acpi.c index 5ee03ebab80e..56cb2c986c48 100644 --- a/arch/riscv/kernel/acpi.c +++ b/arch/riscv/kernel/acpi.c @@ -215,9 +215,9 @@ void __init __acpi_unmap_table(void __iomem *map, unsigned long size) early_iounmap(map, size); } -void *acpi_os_ioremap(acpi_physical_address phys, acpi_size size) +void __iomem *acpi_os_ioremap(acpi_physical_address phys, acpi_size size) { - return memremap(phys, size, MEMREMAP_WB); + return (void __iomem *)memremap(phys, size, MEMREMAP_WB); } #ifdef CONFIG_PCI -- 2.39.2