Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp4469202pxt; Wed, 11 Aug 2021 06:51:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHI+m2bp/IyyJxR4bvOI9+6MAjZlNiaQAwJrOoaC/hfKkzEkVGvG0aGDGazGuYx6R+w+ao X-Received: by 2002:aa7:d841:: with SMTP id f1mr11587135eds.196.1628689889357; Wed, 11 Aug 2021 06:51:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628689889; cv=none; d=google.com; s=arc-20160816; b=z9HsQHnXoEcD+6dbItliPD2JuJd4pzABVpVRiv4ajvEwZr5/50mTyi42MWFjaLOmTS URY4loDUAVzEbGO6r5qu/RyE6CBTEzg83hAf2gGhyhcOtU00r73+MQmFA19nEEW/RnHn Zpuwlkv37HCrtrxy3u9CkWJOvo6544BhtUZZ8ub5+yM0c1C/TSteQEmlqrmgookCLJkv GK5lMk3rARq4sdDBwp64fojRzuw9s4Xx3kBDg0yXakjHicQZDjo9GBQNYDvFSBuf2+3c v1P6it2+bimYOWFrPdXZnWokZ5Gfp+mZvs5dUPi/1nh9iWIFdo/ci4S7uhK62Th/8BSR MYjA== 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=BqlbSHVUZIsWIzA7OuQbdYudU5VoO5CNtBhixkPodFzjhWLQWBaJ+lusMcMTW+DqWG HCQHYQAJUdyXtl8g0Sj8RR8XQKD9UIv0n5gBofIGRhwc/RFqIdPy+FSEQAwAV7hjgshJ uUGu33ep8T3rA0xxfrEHXmWh/d6KBhqEAKeGqBvc9qzqHP7j0X/El+YGfE/bCmIELkZm 4WJnkRYo6wo47DZPsP6tYQaS5tR6iSbvmg2QnlAN4RsnE2Naz+cqSk/cqKvMPM9exfVz 8tuBpxDK2MDcH2aoKRYKybk050xycBcyWYG/LkfDaXHiDsunbL1X2l2X8ygG+yMtxVBK Wz3A== 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 z2si10895332edq.209.2021.08.11.06.51.05; Wed, 11 Aug 2021 06:51:29 -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 S232125AbhHKNtx convert rfc822-to-8bit (ORCPT + 99 others); Wed, 11 Aug 2021 09:49:53 -0400 Received: from mail.shanghaitech.edu.cn ([119.78.254.11]:2159 "EHLO mail.shanghaitech.edu.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231897AbhHKNtx (ORCPT ); Wed, 11 Aug 2021 09:49:53 -0400 X-Greylist: delayed 924 seconds by postgrey-1.27 at vger.kernel.org; Wed, 11 Aug 2021 09:49:51 EDT Received: from [10.15.44.216] by mail.shanghaitech.edu.cn with MESSAGESEC ESMTP id 439963503056403; Wed, 11 Aug 2021 21:33:45 +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:33:45 +0800 From: Mianhan Liu To: Eric Dumazet , "David S . Miller" , Hideaki YOSHIFUJI , David Ahern CC: , , Matthew , MianHan Liu Subject: [PATCH -next] net/ipv4/tcp.c: remove superfluous header file in tcp.c Date: Wed, 11 Aug 2021 21:33:05 +0800 Message-ID: <20210811133305.14640-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