From patchwork Mon Jan 25 16:46:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Lobakin X-Patchwork-Id: 12043703 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EC6DEC433E0 for ; Mon, 25 Jan 2021 16:46:56 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B8E35229C6 for ; Mon, 25 Jan 2021 16:46:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B8E35229C6 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=pm.me Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 202388D0012; Mon, 25 Jan 2021 11:46:55 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 18CD38D0001; Mon, 25 Jan 2021 11:46:55 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 07B838D0012; Mon, 25 Jan 2021 11:46:55 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0197.hostedemail.com [216.40.44.197]) by kanga.kvack.org (Postfix) with ESMTP id E19FD8D0001 for ; Mon, 25 Jan 2021 11:46:54 -0500 (EST) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id A633F180ACEE4 for ; Mon, 25 Jan 2021 16:46:54 +0000 (UTC) X-FDA: 77744876748.20.flame50_5516fa727587 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin20.hostedemail.com (Postfix) with ESMTP id 80808180C07A3 for ; Mon, 25 Jan 2021 16:46:54 +0000 (UTC) X-HE-Tag: flame50_5516fa727587 X-Filterd-Recvd-Size: 3656 Received: from mail2.protonmail.ch (mail2.protonmail.ch [185.70.40.22]) by imf26.hostedemail.com (Postfix) with ESMTP for ; Mon, 25 Jan 2021 16:46:53 +0000 (UTC) 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 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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(-)