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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D708BC77B7E for ; Thu, 25 May 2023 05:12:10 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.539306.840047 (Exim 4.92) (envelope-from ) id 1q23GT-0003cX-F6; Thu, 25 May 2023 05:11:53 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 539306.840047; Thu, 25 May 2023 05:11:53 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1q23GT-0003cQ-Cd; Thu, 25 May 2023 05:11:53 +0000 Received: by outflank-mailman (input) for mailman id 539306; Thu, 25 May 2023 05:11:52 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1q23GS-0003cK-9Y for xen-devel@lists.xenproject.org; Thu, 25 May 2023 05:11:52 +0000 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id a72d56ee-faba-11ed-b230-6b7b168915f2; Thu, 25 May 2023 07:11:50 +0200 (CEST) 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 EC5D663FA3; Thu, 25 May 2023 05:11:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 20665C4339B; Thu, 25 May 2023 05:11:48 +0000 (UTC) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: a72d56ee-faba-11ed-b230-6b7b168915f2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684991508; bh=a0tzE9UDpxf2Gv03EAySk423E9WJbttajURADQK6RpY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=E+prJKSG6S1YLfI14dLgGo1xJFb3uRkM/dPsvsquftreGTEc4mdpGqCTE7w1vcjIj vXMGcd2WHPPBm1xLHJDAP249/W6Mjfg3E1wmwyNnriWw5w6b2O48gkDtDkdrifnm1o dVEl9xgtqcSrvqF9PsN5b4phTeSzfIA8mVgdMgaaj9Ww8A1OtUxS2OZhLGE9GyqD9P c/H04SuRMQyVKw3raKrejRwKGEX+ueVginsBjR+mXRD1JokoUZucIdWlb6z37Szt2f we9Y9GD0a5ZcpY+bQ+CiF+F4ncxe/vM8aRqCaCPwGGjMNcIc6pNuAtIvQ5g91kxp2P a4yZbJWlTgikA== Date: Wed, 24 May 2023 22:11:47 -0700 From: Jakub Kicinski To: Linus Walleij Cc: Wei Liu , Paul Durrant , xen-devel@lists.xenproject.org, netdev@vger.kernel.org Subject: Re: [PATCH] xen/netback: Pass (void *) to virt_to_page() Message-ID: <20230524221147.5791ba3a@kernel.org> In-Reply-To: <20230523140342.2672713-1-linus.walleij@linaro.org> References: <20230523140342.2672713-1-linus.walleij@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 23 May 2023 16:03:42 +0200 Linus Walleij wrote: > virt_to_page() takes a virtual address as argument but > the driver passes an unsigned long, which works because > the target platform(s) uses polymorphic macros to calculate > the page. > > Since many architectures implement virt_to_pfn() as > a macro, this function becomes polymorphic and accepts both a > (unsigned long) and a (void *). > > Fix this up by an explicit (void *) cast. Paul, Wei, looks like netdev may be the usual path for this patch to flow thru, although I'm never 100% sure with Xen. Please ack or LUK if you prefer to direct the patch elsewhere?