From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DDF46CCA486 for ; Mon, 11 Jul 2022 08:41:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230430AbiGKIlF (ORCPT ); Mon, 11 Jul 2022 04:41:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230088AbiGKIkp (ORCPT ); Mon, 11 Jul 2022 04:40:45 -0400 Received: from elvis.franken.de (elvis.franken.de [193.175.24.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A8C616390; Mon, 11 Jul 2022 01:40:07 -0700 (PDT) Received: from uucp (helo=alpha) by elvis.franken.de with local-bsmtp (Exim 3.36 #1) id 1oAoxa-0006eA-03; Mon, 11 Jul 2022 10:40:06 +0200 Received: by alpha.franken.de (Postfix, from userid 1000) id 31751C0353; Mon, 11 Jul 2022 10:38:29 +0200 (CEST) Date: Mon, 11 Jul 2022 10:38:29 +0200 From: Thomas Bogendoerfer To: Florian Fainelli Cc: linux-mips@vger.kernel.org, open list Subject: Re: [PATCH] MIPS: Make phys_to_virt utilize __va() Message-ID: <20220711083829.GD6084@alpha.franken.de> References: <20220707203743.1226302-1-f.fainelli@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220707203743.1226302-1-f.fainelli@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 07, 2022 at 01:37:42PM -0700, Florian Fainelli wrote: > The implementation is exactly the same, so avoid open-coding it in two > different locations. > > Signed-off-by: Florian Fainelli > --- > arch/mips/include/asm/io.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h > index 6f5c86d2bab4..880048a54362 100644 > --- a/arch/mips/include/asm/io.h > +++ b/arch/mips/include/asm/io.h > @@ -131,7 +131,7 @@ static inline phys_addr_t virt_to_phys(const volatile void *x) > */ > static inline void * phys_to_virt(unsigned long address) > { > - return (void *)(address + PAGE_OFFSET - PHYS_OFFSET); > + return __va(address); > } > > /* > -- > 2.25.1 applied to mips-next. Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]