Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp10090985rwr; Fri, 12 May 2023 03:48:04 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5JEr5sdGaZaBX/29h8XcpgySF1hWx3BcApEraWUJx7Q9GuNInOjJLD4B2cmjJbiiqMqpRv X-Received: by 2002:a05:6a20:938b:b0:f8:a481:a952 with SMTP id x11-20020a056a20938b00b000f8a481a952mr32745158pzh.1.1683888483708; Fri, 12 May 2023 03:48:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683888483; cv=none; d=google.com; s=arc-20160816; b=jWIolYSUgRiBBc6Sun8GZUVVXp6RkFn79ZzlNukcaYjARveLhGzke5h4a38vm/JeaF FiNjodwxepwGJz590+ZRh+7b34XApnYep0qKmrGMP5P5EmOCLk48uXErZSlsLIB6dF5K WmsKxY11M95SAMQ6ckvUM6q8jawbwdBhvPE/LvYFFwUR1vWF8QpzTkMp4CnhG2aaL+2r 0eDVL/GX3y2ybL6I4ybHW57pvspijbRCWa825Z06goJHLmybUo85UboHDR9b3jmtSnKJ jJn48+q8dVEiA5j5+blNobAyMXkFpf3EIuWK5BksfGBcBCYT7NXV9qgtpGuDQ3feOCiB Anyg== 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; bh=yYeYncL6wdZlfKbUpEriXgq4zJu5GxDX35PSarwzEl4=; b=hLwG0s6OS9Bqiqrpjrg0p2tqVDsG6fAwHiRBcj4dVJ7QrC/ZxagH8E+iBfFkredS9c HzdiufDfhXvIeLNxHD+wuUA4GXoQAmmzAXdg5iKBLTSX5DII3wtOLo28cwWc7QBLQTwH gR7FqD29SGp2BNoV56q8ECr1KZ6EC9uqEo5Lw1NbJCk3sRBBzd9fnOA4IKMf8KPtGf7l L4u5ur3O6x16fyhXv7qHq48T1e0bAUg3eZm37g+r9L6Y8aFQBXYWgbV3i2xNO/Pz0Knv 9rJdyBtWVOl+GCW/pVMDCH892qOB8o6sJ6c4+goD0aAG1DP3CX/jPTKFZHamBbM6JUBS rjqg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 123-20020a620481000000b00627dd2b5307si9585986pfe.102.2023.05.12.03.47.51; Fri, 12 May 2023 03:48:03 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240810AbjELKoc (ORCPT + 99 others); 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> X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_MED,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 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