From patchwork Thu Aug 3 17:58:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sunil V L X-Patchwork-Id: 130820 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f41:0:b0:3e4:2afc:c1 with SMTP id v1csp1361166vqx; Thu, 3 Aug 2023 12:28:18 -0700 (PDT) X-Google-Smtp-Source: APBJJlGCUqFEFnxrHqnIhKKioZDb82S8lqlPFL4FdFOUitYqHjiCy7soww9wurFarFQsU5sobo1T X-Received: by 2002:a05:6a00:13a5:b0:687:1bb1:91ab with SMTP id t37-20020a056a0013a500b006871bb191abmr24166564pfg.33.1691090898300; Thu, 03 Aug 2023 12:28:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691090898; cv=none; d=google.com; s=arc-20160816; b=fGvGjhl0ePnDten4ErmZlFevpaJXYgM18qUybJOeKj3Dis8Y95XKyl1n7J/EHWvmhy whos2VYAZvL+OV1VeI9e5yb00sIjFqL29slmixmD1tlBpXck7zp3VIMH+a3V9X1iYKgp Exc+v2c8tvK1UT6LUjy9w8I9wxI0g2M96cgWl2EV+tEefkk2VrpnBeOy+GLzgd650K4C I7CoCh43UpmlGz6V66QyfNpYi/Xim/ZX8b1KOGp1zdxOJyWsovDKQBWVJC4/IF/oRZtm qJuOnyCzrSxYXNHIV0oa6jwyhztaDCnaV/M3Fv+ffbAjzPvQ/TEPkk5UytuUglXAndqh zJaQ== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d8-20020a056a0010c800b006683174a49csi415527pfu.198.2023.08.03.12.28.03; Thu, 03 Aug 2023 12:28:18 -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 S235283AbjHCSAZ (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 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773237329604173428 X-GMAIL-MSGID: 1773237329604173428 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 Reviewed-by: Andrew Jones --- 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