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 61FFBC7EE25 for ; Fri, 12 May 2023 10:44:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240853AbjELKoc (ORCPT ); Fri, 12 May 2023 06:44:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240860AbjELKo2 (ORCPT ); Fri, 12 May 2023 06:44:28 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BEB8120A2; Fri, 12 May 2023 03:44:19 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BD1B660BA1; Fri, 12 May 2023 10:44:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9C95FC433A0; Fri, 12 May 2023 10:44:15 +0000 (UTC) Date: Fri, 12 May 2023 11:44:12 +0100 From: Catalin Marinas To: Linus Walleij Cc: Geert Uytterhoeven , Vineet Gupta , Will Deacon , Arnd Bergmann , Russell King , Greg Ungerer , linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-snps-arc@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, linux-arm-kernel@lists.infradead.org, linux-arch@vger.kernel.org Subject: Re: [PATCH 11/12] arm64: memory: Make virt_to_pfn() a static inline Message-ID: References: <20230503-virt-to-pfn-v6-4-rc1-v1-0-6c4698dcf9c8@linaro.org> <20230503-virt-to-pfn-v6-4-rc1-v1-11-6c4698dcf9c8@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230503-virt-to-pfn-v6-4-rc1-v1-11-6c4698dcf9c8@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org On Thu, May 11, 2023 at 01:59:28PM +0200, Linus Walleij wrote: > Making virt_to_pfn() a static inline taking a strongly typed > (const void *) makes the contract of a passing a pointer of that > type to the function explicit and exposes any misuse of the > macro virt_to_pfn() acting polymorphic and accepting many types > such as (void *), (unitptr_t) or (unsigned long) as arguments > without warnings. > > Since arm64 is using to provide > __phys_to_pfn() we need to move the inclusion of that header > up, so we can resolve the static inline at compile time. > > Signed-off-by: Linus Walleij Acked-by: Catalin Marinas