Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3243709pxb; Mon, 25 Jan 2021 10:30:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJwYd0kdCAArXRZrqunHzvnNxYdm/0DumApNEGyfc3uV7R1wCxbPq81AD2YLmnA04SHRRuMO X-Received: by 2002:a17:906:b756:: with SMTP id fx22mr1132220ejb.406.1611599444195; Mon, 25 Jan 2021 10:30:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611599444; cv=none; d=google.com; s=arc-20160816; b=FIXZ2W2+/lN6u8oq1qKe+ElR+P18lwmBEVY8sXJlxk/L4s3Z7iXs37oFPKwk8ZDOPx PAJZpR9mcoS1ZqBKVqrEWUMQ1yJgiTU1SvOzd2fSZQxhe5qvpuSL5tdXnxOsgDLX3Czz SmnZzQs5ZIjBIoJ8XIxGUg8rGdCxI89do5RI6MG7POT29A8Vp0cLA71m1vbGrNioCi2J mxjTfR+M5W6n6VZ9KLjpWdQta5xw+297f6j2vRBhBtNVu9Co1O+XhasX6B+z1r0VweHN SDVyRBQpFl3g8mNTKbICu5dm1AmFa9/x9nKtdWoeNQVL66PLTmtnxXVVIhXfdu3tKksr C9Vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:reply-to:cc:from:to :dkim-signature:date; bh=BNsVpptmPCWnM/HSD7DFkyRUhexA9u11ZFBtrI8eXBw=; b=RiOCaMCWr/o/V5IIsbL81wn7LraR6O3RYhhhKW4xJvq7y60w1Aab4fxxgoiA87/wnk Yvb5du0209Vdt0jtZz1xRnWSezkfGEE6Sx8rqiwEbP6Gm3sswy0lw4SNqQ72Dfp43Q6q 6ph7eLU+4OOhK9nwy7CkGLI1XR5bxj4I/5kLo0SkB/vKeynYhzv6NDoxM87u6qWNVE2w qPP5ZNta6li9GXo2IYp8gbg6G5v1J7ecY8L9p5XWaQWa2/wnmeEAUKQ2l24kivH2UtGC FzbXEo/SZ3W1kJ8c4082o9xmeOTYMNmeybNMrlbj3dHqQvthBDjPsOxeDOQiU5shqxEo +a8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail header.b=aw2vpID7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m13si882019edi.144.2021.01.25.10.30.18; Mon, 25 Jan 2021 10:30:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail header.b=aw2vpID7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726430AbhAYS2q (ORCPT + 99 others); Mon, 25 Jan 2021 13:28:46 -0500 Received: from mail2.protonmail.ch ([185.70.40.22]:44697 "EHLO mail2.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726884AbhAYS2T (ORCPT ); Mon, 25 Jan 2021 13:28:19 -0500 Date: Mon, 25 Jan 2021 18:27:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail; t=1611599255; bh=BNsVpptmPCWnM/HSD7DFkyRUhexA9u11ZFBtrI8eXBw=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=aw2vpID7+/tcFGlQBlD9SjxMuz+grORCsiUs4coVpZPWcuIL3pf1vkiYfr2JRZaZT EwhVJPGp3/tZwXNjCo8HiBvRNB9hO/AUA499dNaBjQzn5xAam5Sfdypp43gCxrTBsx nZWz6AhMji7ekBopTmogGQmAm02Ir/+PZU0xCzWxobwLTcq9S+o+av/RuMqjxh1qno jCu7otS0DW5MtXXM5XrHrcf1DWg4fRB1uVvyBRofxLUGowVVNpS5WgGrNWzJDCPpP+ Yu5v0rgcUcRC4wejN4NhYEol36SE9E3WINOxv3ldpJtKfmAAbgK7gv9F42sBHN7c8x bc+pB4ZowJz6Q== To: David Rientjes From: Alexander Lobakin Cc: Alexander Lobakin , "David S. Miller" , Jakub Kicinski , Yisen Zhuang , Salil Mehta , Jesse Brandeburg , Tony Nguyen , Saeed Mahameed , Leon Romanovsky , Andrew Morton , Jesper Dangaard Brouer , Ilias Apalodimas , Jonathan Lemon , Willem de Bruijn , Randy Dunlap , Pablo Neira Ayuso , Dexuan Cui , Jakub Sitnicki , Marco Elver , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, intel-wired-lan@lists.osuosl.org, linux-rdma@vger.kernel.org, linux-mm@kvack.org Reply-To: Alexander Lobakin Subject: Re: [PATCH net-next 2/3] net: constify page_is_pfmemalloc() argument at call sites Message-ID: <20210125182702.247232-1-alobakin@pm.me> In-Reply-To: <85978330-9753-f7a-f263-7a1cfd95b851@google.com> References: <20210125164612.243838-1-alobakin@pm.me> <20210125164612.243838-3-alobakin@pm.me> <85978330-9753-f7a-f263-7a1cfd95b851@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: David Rientjes Date: Mon, 25 Jan 2021 10:19:48 -0800 (PST) > On Mon, 25 Jan 2021, Alexander Lobakin wrote: >=20 > > Constify "page" argument for page_is_pfmemalloc() users where applicabl= e. > > > > Signed-off-by: Alexander Lobakin > > --- > > drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 2 +- > > drivers/net/ethernet/intel/fm10k/fm10k_main.c | 2 +- > > drivers/net/ethernet/intel/i40e/i40e_txrx.c | 2 +- > > drivers/net/ethernet/intel/iavf/iavf_txrx.c | 2 +- > > drivers/net/ethernet/intel/ice/ice_txrx.c | 2 +- > > drivers/net/ethernet/intel/igb/igb_main.c | 2 +- > > drivers/net/ethernet/intel/igc/igc_main.c | 2 +- > > drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 +- > > drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 2 +- > > drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 2 +- > > include/linux/skbuff.h | 4 ++-- > > 11 files changed, 12 insertions(+), 12 deletions(-) > > > > diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/= net/ethernet/hisilicon/hns3/hns3_enet.c > > index 512080640cbc..0f8e962b5010 100644 > > --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c > > +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c > > @@ -2800,7 +2800,7 @@ static void hns3_nic_alloc_rx_buffers(struct hns3= _enet_ring *ring, > > =09writel(i, ring->tqp->io_base + HNS3_RING_RX_RING_HEAD_REG); > > } > > > > -static bool hns3_page_is_reusable(struct page *page) > > +static bool hns3_page_is_reusable(const struct page *page) > > { > > =09return page_to_nid(page) =3D=3D numa_mem_id() && > > =09=09!page_is_pfmemalloc(page); >=20 > Hi Alexander, Hi David! > All of these functions appear to be doing the same thing, would it make > sense to simply add this to a header file and remove all the code > duplication as well? That's an interesting idea. I'll be glad to do this if drivers' maintainers agree it's okay for them. Thanks, Al