Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp4475567pxt; Wed, 11 Aug 2021 06:59:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyec2v1d4sgAZt9BND4TaYEqM7Rw1Gm8cW96DWloFtaC5ndfcYIuJ2EW3jU0UY6cNBvI3BR X-Received: by 2002:a05:6402:27cf:: with SMTP id c15mr11822468ede.268.1628690399513; Wed, 11 Aug 2021 06:59:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628690399; cv=none; d=google.com; s=arc-20160816; b=f/KfssAG9f8oNVBstmTEG5QaGvaB2KfPvlTFvU1vddaHqADcV0AgUY2p/WSvjTB4Qx Q3/KwHFCXDrMAXs3Ch788tGaHfu13JbAX2xiC84k6dLeqkDZPgUa/u7gsbNy+WgGVU3R F/ygrD9Zocl6CuRNR7ifk6OSN11EfYgytfKmf0fM01u6XiufbbW1DHvZjDgVlCdt8vN7 sGT2fdrbEnErzbgzUGFX5B7tO3f/xvOM5sJ11ruYtpmhcyiaBqa1Jinm068AvoiJ7dDB 75ylytxJv0O4s51YfHYZ04n+awtC8Kr9892mfxE5reHWp9tT0oBRNRlrTII94UcsWmns EKfA== 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:date:subject:cc:to:from; bh=zQ3X1jX0zA2j+q90aYHfLXKuJ8hcwgLcRJR3XJ2liF4=; b=U67T8N8ohp6MdQ8/bSNirdmOXQUKXAngGHk6PCVWpN2afh6EljhEH+kIsE/1zX2WZy H7RFg6/Z/zMKmDViJcipREE8HJs/Dr7FCarQT9Dvm2PlsPVUAFtYaZF8F8bPb0lVhxVd trUR5l/tszrA7GjMntE5VZt8ohCE8J5FaV08tXjnHIOsrIWg2esMYWmNxGWDiHMhOWb8 I844D1mhDYWTciJ7dk4QYqZKZCtTemErXl2lOTPonsf3d5YbgAjQVUabfBuZr24hnKld EnqxAFfLJ8DSTu5FBpSAMPjz470HD0d1b4iEu3wG+E3Vu4YyXQvMPjA9MFezDXEKOHB8 bgPQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=shanghaitech.edu.cn Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s5si10667172edy.388.2021.08.11.06.59.34; Wed, 11 Aug 2021 06:59:59 -0700 (PDT) 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; 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=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=shanghaitech.edu.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232064AbhHKN6E convert rfc822-to-8bit (ORCPT + 99 others); Wed, 11 Aug 2021 09:58:04 -0400 Received: from mail.shanghaitech.edu.cn ([119.78.254.11]:2395 "EHLO mail.shanghaitech.edu.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231602AbhHKN6D (ORCPT ); Wed, 11 Aug 2021 09:58:03 -0400 Received: from [10.15.44.216] by mail.shanghaitech.edu.cn with MESSAGESEC ESMTP id 439963667906979; Wed, 11 Aug 2021 21:56:59 +0800 (CST) Received: from DESKTOP-U066CHB.localdomain (10.15.44.220) by smtp.shanghaitech.edu.cn (10.15.44.216) with Microsoft SMTP Server (TLS) id 14.3.399.0; Wed, 11 Aug 2021 21:56:58 +0800 From: Mianhan Liu To: Eric Dumazet , "David S . Miller" , Hideaki YOSHIFUJI , David Ahern CC: , , Matthew Wilcox , MianHan Liu Subject: [PATCH -next] net/ipv4/tcp.c: remove superfluous header file in tcp.c Date: Wed, 11 Aug 2021 21:56:50 +0800 Message-ID: <20210811135650.14995-1-liumh1@shanghaitech.edu.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain X-Originating-IP: [10.15.44.220] Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org nr_free_buffer_pages could be exposed through mm.h instead of swap.h, and then tcp.c wouldn't need swap.h. Moreover, after preprocessing all the files that use nr_free_buffer_pages, it turns out that those files have already included mm.h. Thus, we can move nr_free_buffer_pages from swap.h to mm.h safely so as to reduce the obsolete includes. Signed-off-by: MianHan Liu --- include/linux/mm.h | 1 + include/linux/swap.h | 2 +- net/ipv4/tcp.c | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index ce8fc0fd6..6ca7b7fba 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -871,6 +871,7 @@ void put_pages_list(struct list_head *pages); void split_page(struct page *page, unsigned int order); void folio_copy(struct folio *dst, struct folio *src); +extern unsigned long nr_free_buffer_pages(void); /* * Compound pages have a destructor function. Provide a * prototype for that function and accessor functions. diff --git a/include/linux/swap.h b/include/linux/swap.h index cdf0957a8..22b17431a 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -341,7 +341,7 @@ void workingset_update_node(struct xa_node *node); /* linux/mm/page_alloc.c */ extern unsigned long totalreserve_pages; -extern unsigned long nr_free_buffer_pages(void); + /* Definition of global_zone_page_state not available yet */ #define nr_free_pages() global_zone_page_state(NR_FREE_PAGES) diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index f931def63..dcdd8ebfb 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -260,7 +260,6 @@ #include #include #include -#include #include #include #include -- 2.25.1