Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3625599pxb; Mon, 25 Jan 2021 23:53:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJxCw7BcjLQWLnPitOclJlRzBqa4Vg4CqSHYAK5K9Rmt6M4xB59mDItXYdGnTp3OoerZZkc5 X-Received: by 2002:a17:907:2458:: with SMTP id yw24mr2683592ejb.333.1611647627646; Mon, 25 Jan 2021 23:53:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611647627; cv=none; d=google.com; s=arc-20160816; b=wTuswMLq2B1m/ec7HyZMV5H7wRsxuTZ8MGiFwkzMkgYDQoN1TvDMBm5aJ+9pqm6hoo K8sHGPvbGCcdyEOCqu8KvwLe2WnbWP5hcX89Gx9qqmDPIYV31j/gPeVR/DlelZTYa8h1 +vMUQ3Mln1katGRcKQgt90dx/7CQXP5SI39tzepcn0WS901++g7520vPL+DMuonQxJtU LbzhQJejhEd8D/7Xzh1/LMV0BjSkFW+6SrycxeReiGojckq44Qq/BaM2wHiy2X/sLnRM oAmfKU6zKzVEbc8KDUC12OJaDEDAJwF18aXub6epIywht7n9CVDJSfKM2+Jv0dkswgVy TCTQ== 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 :message-id:subject:reply-to:cc:from:to:dkim-signature:date; bh=O3BWBtVtHnlCsFaJds2EaRRj5UFBxIVItFjF3RQ5foo=; b=uCXzWPAl1uQz13TO81+ESMf2R+dtATjWlbwUBnzDtF3j6OjPSKmd9+AsgLTczu56Ta uVvtU6iQjqthd5oXOv+/Igh9yE3ykkVKYqD7fV1j157vjvK5oxbvuhgSh6rpdohiqFm4 WQlWKH4bL4GGegHyzr65gj4FcclPqEbz3wESY47CMYRMX/f6VPPeKQlgyb9Zk9CNwTng vmRYUYHte2w5FskPnvuZN6OJ+9xdlTVllm+JfCydM2EsrvZmtsqXiaV6az80oaKQOCWv ymNO/ILOrg4Ly4LNXb31dvECzvxG/LUPt/6cqzkrlVyW8W9ujs2I6M9XjUdt3M43Gv8P qo6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail header.b="fyb2kN/4"; 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 z23si2727325edr.175.2021.01.25.23.53.22; Mon, 25 Jan 2021 23:53:47 -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="fyb2kN/4"; 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 S1728795AbhAZHwa (ORCPT + 99 others); Tue, 26 Jan 2021 02:52:30 -0500 Received: from mail2.protonmail.ch ([185.70.40.22]:41733 "EHLO mail2.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730884AbhAYQsF (ORCPT ); Mon, 25 Jan 2021 11:48:05 -0500 Date: Mon, 25 Jan 2021 16:46:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail; t=1611593212; bh=O3BWBtVtHnlCsFaJds2EaRRj5UFBxIVItFjF3RQ5foo=; h=Date:To:From:Cc:Reply-To:Subject:From; b=fyb2kN/4x6ExKBRo9Irg/d1YeJZtuGXCH3KkYYxrwU6bfwqlp8xMWmyHoMUe9wKZ7 FE4ZC5fnorwlL/gi5srUrW8gfzuAUandYJdMMJtbd60j7IN3szMPX9rMu49/9ZcFnx mggR925yYUco0rRp1UqPs6oBDI2aUk0GPLTSLnEIzSfFP1cdBPEwguNgJU25afaZoY 5lx4EVfbt3/89Iq5QNz7cj/2zToRT9N8KHsxez2Sqd2z6gQsDdV4BKPWnmuayZVa6s voZckv5Kh2OQ1jTDMApFKg4MTPwxYrd2KAWmMNbjJKjcuTkrZ1xfkwA5Jay1YMuCQg rZ+LjQ+WWvz5Q== To: "David S. Miller" , Jakub Kicinski From: Alexander Lobakin Cc: 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 , Aleksandr Nogikh , 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, Alexander Lobakin Reply-To: Alexander Lobakin Subject: [PATCH net-next 0/3] net: constify page_is_pfmemalloc() and its users Message-ID: <20210125164612.243838-1-alobakin@pm.me> 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 page_is_pfmemalloc() is used mostly by networking drivers. It doesn't write anything to the struct page itself, so constify its argument and a bunch of callers and wrappers around this function in drivers. In Page Pool core code, it can be simply inlined instead. Alexander Lobakin (3): mm: constify page_is_pfmemalloc() argument net: constify page_is_pfmemalloc() argument at call sites net: page_pool: simplify page recycling condition tests 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/mm.h | 2 +- include/linux/skbuff.h | 4 ++-- net/core/page_pool.c | 14 ++++---------- 13 files changed, 17 insertions(+), 23 deletions(-) --=20 2.30.0