Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp2928672rwo; Mon, 24 Jul 2023 03:46:29 -0700 (PDT) X-Google-Smtp-Source: APBJJlGoMkaqKnmlJSI7NoksqavRYW33Qk2T/ePng5i2qibo7cvnitAZMCDnzNcPbXVDyTMy8Jzc X-Received: by 2002:a05:6a00:1410:b0:686:25fe:d575 with SMTP id l16-20020a056a00141000b0068625fed575mr5309718pfu.11.1690195588750; Mon, 24 Jul 2023 03:46:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690195588; cv=none; d=google.com; s=arc-20160816; b=fTCOTF2aDBqXIWUWdZVdQmqNBpGQ5X5tZOvl0Ab6oEjzjjR6AP92WOyX+Xs0VtGHVH XAsZ6Ebm4msJ2m65Da7NOJGqu33wVg2ra7VbRQfbnceB76JEtI9Y8MbSSQBDHPqEzu3m UR5xX/R6Fp8RUNMV620QUvbE8fqol/Hmsq542ftFslQIyVhpRxJ/mUYO2l5isyUfnbwR TU08qUX7Ph0fn08dQMWjtl8PLC1tiodqhUeS1uDn4wwCTmj9XUqCim2bHgEHdESdVa5J 995fTHT2/4S+R29SlUV7o82TBZFXw9eoxecETMy1kWDmGmjyG5i/nMWFwUKoiM5MOIPM fR1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=MrmlzXoYNzugCzzt3b6HpaANRTXL6i1yXFP7+CXqEQc=; fh=5OajI6l2cNCEym206+2Ru+4DZrJNcPke3xLGszowkiI=; b=bw4gAIi6wRr5vlGueQ/SEu+cdDioPjJxPR7IXrV1RI88iXleV3KqZVtmwGrEbLko0I AxiDkbTv+35Cmpg+5AbJ1Bxv6fCijOvqNIpb5jGdlMzmRSlLuvGbaLkxi34IWjqc+m6v me5PoSIklvfCpAdmHJqGuczrR+HpVxRtMl3kz4f+CbhIeB96NB6F5MKT42ewd+ITzua9 t3QJ5dtmFbJ7Gl+13po4jDgLUxeJfXJh848JU3HJTMI9zf4vMDI0GdjpiMgEte3d6Bo8 erXGVkGYgTysFrS6SL8eqhmKldIiSwu/+EGyn3VtgaCvFn1BZlp5nzVsfbWDH7AV6/k8 Zyrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=MRAzXxWU; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h10-20020a056a001a4a00b0068050054196si9004094pfv.299.2023.07.24.03.46.15; Mon, 24 Jul 2023 03:46:28 -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=@microchip.com header.s=mchp header.b=MRAzXxWU; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230257AbjGXKd1 (ORCPT + 99 others); Mon, 24 Jul 2023 06:33:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231778AbjGXKdP (ORCPT ); Mon, 24 Jul 2023 06:33:15 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA0ECDB for ; Mon, 24 Jul 2023 03:33:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1690194794; x=1721730794; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=2A2JU/fzgzYQsCwx+j1j5mbZhV4V8Gf7uWXcztu+eQs=; b=MRAzXxWUeNTpUM1VrFfGVAUoGXb9dL+TwpgARt1+Si8BtfzZTUeD1Dz4 rfnA5ddGZr8jtjHi+BBq/90vZVJlYKWT8f1HE1DvwAT7v8LK6twTAB0yC k4iONtNa6PxBAoze04IQFVrXSQozb/cRGG0QlDIwNZZLbkRU3tiUOemoS t2X2vIgjzvbohGYuBT+8GLCZDfTpm3NJ5vDKDuCRxPJxBMuGYPlHFqlr8 3XdcJQteO3Z5rnBbm9gUNeaL+0qBq4H+Hrp8JhdQ1RwoP0hGwxG3brbch yZqNpOuNZEwHdUwqCCCkFKWWE4Db0zuB7AbRAypnAN0VKyzlndq30A3fL w==; X-IronPort-AV: E=Sophos;i="6.01,228,1684825200"; d="asc'?scan'208";a="237300210" X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 24 Jul 2023 03:33:13 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Mon, 24 Jul 2023 03:33:13 -0700 Received: from wendy (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21 via Frontend Transport; Mon, 24 Jul 2023 03:33:11 -0700 Date: Mon, 24 Jul 2023 11:32:38 +0100 From: Conor Dooley To: Sunil V L CC: , , Paul Walmsley , Palmer Dabbelt , Albert Ou , Andrew Jones , kernel test robot Subject: Re: [PATCH v3 -fixes] RISC-V: ACPI: Fix acpi_os_ioremap to return iomem address Message-ID: <20230724-zit-stunning-901bfd989a4a@wendy> References: <20230724100346.1302937-1-sunilvl@ventanamicro.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="zkxf3SyDjVGAdJvc" Content-Disposition: inline In-Reply-To: <20230724100346.1302937-1-sunilvl@ventanamicro.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_NONE, 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 --zkxf3SyDjVGAdJvc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 24, 2023 at 03:33:46PM +0530, Sunil V L wrote: > 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. >=20 > Reported-by: kernel test robot > Closes: https://lore.kernel.org/oe-kbuild-all/202307230357.egcTAefj-lkp@i= ntel.com/ > Fixes: a91a9ffbd3a5 ("RISC-V: Add support to build the ACPI core") > Signed-off-by: Sunil V L > --- Surprisingly, my automation already tested this patch. Usually there's a several hour delay between posting & testing. Reviewed-by: Conor Dooley Thanks, Conor. > Changes since v2: > 1) Removed unnecessary __force. > 2) Removed unnecessary space after cast to fix checkpatch --strict warni= ng. >=20 > Changes since v1: > 1) Removed enhancements from the fix patch. >=20 > arch/riscv/include/asm/acpi.h | 2 +- > arch/riscv/kernel/acpi.c | 4 ++-- > 2 files changed, 3 insertions(+), 3 deletions(-) >=20 > 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 > =20 > /* 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 > =20 > #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, uns= igned long size) > early_iounmap(map, size); > } > =20 > -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); > } > =20 > #ifdef CONFIG_PCI > --=20 > 2.39.2 >=20 --zkxf3SyDjVGAdJvc Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZL5TRQAKCRB4tDGHoIJi 0sSUAQDRKYATqlpRLkFQpUraMl2rdoynN0aAfJOpVdSZbqnsrwEAuylSpN7Gpx3x eShz+1UlkmUkL7qLQ4c5WW/ZZyoJQQQ= =5gPe -----END PGP SIGNATURE----- --zkxf3SyDjVGAdJvc--