From patchwork Tue Jun 4 09:08:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Kellermann X-Patchwork-Id: 13684927 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77EF2C25B78 for ; Tue, 4 Jun 2024 09:09:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5D72B6B00A9; Tue, 4 Jun 2024 05:09:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 587526B00AB; Tue, 4 Jun 2024 05:09:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 38DC36B00AC; Tue, 4 Jun 2024 05:09:29 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 17AA96B00A9 for ; Tue, 4 Jun 2024 05:09:29 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 8550FA1BA3 for ; Tue, 4 Jun 2024 09:09:28 +0000 (UTC) X-FDA: 82192632816.14.C5A651C Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) by imf27.hostedemail.com (Postfix) with ESMTP id A8CCA40023 for ; Tue, 4 Jun 2024 09:09:26 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=ionos.com header.s=google header.b=IaIPyMpZ; spf=pass (imf27.hostedemail.com: domain of max.kellermann@ionos.com designates 209.85.218.46 as permitted sender) smtp.mailfrom=max.kellermann@ionos.com; dmarc=pass (policy=quarantine) header.from=ionos.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1717492166; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=i89wEAwGLV+FFt8LVEfujtav/wRlt8aIRY/CjDWyxYI=; b=Er4Ox6ydaETjKgwpy2cro3I02XTwH6NrRuSZJcWCmwDAkx8jfD/tdjAiXwDi7xnScaKL0O d2SepjtNv/iINg/OcMvc5/HesVRA1JNs0AIdv/z12BS6L2y6ZxhYo63zPPvFzFWCBDiPhh BGLhKC3iRBnXrN+r0sTAvlLJxgdqupQ= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=ionos.com header.s=google header.b=IaIPyMpZ; spf=pass (imf27.hostedemail.com: domain of max.kellermann@ionos.com designates 209.85.218.46 as permitted sender) smtp.mailfrom=max.kellermann@ionos.com; dmarc=pass (policy=quarantine) header.from=ionos.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1717492166; a=rsa-sha256; cv=none; b=INZTbhUEKwgu+bgFiVOBtiAHSHo19HRCVRkQgkyc77lG/ERmvq9OG2o4AXldLGXusb1BbD dIXr0M/P4kiMenR62LXGfJvfKk6jTP3xe4vh3vM6KOxGBSur1ggubD1TetFA6leNi6nUnZ lQKMH3SnC/FyRAG+lA/Hq6EPyCljfY0= Received: by mail-ej1-f46.google.com with SMTP id a640c23a62f3a-a68b41ef3f6so80055466b.1 for ; Tue, 04 Jun 2024 02:09:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ionos.com; s=google; t=1717492165; x=1718096965; darn=kvack.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=i89wEAwGLV+FFt8LVEfujtav/wRlt8aIRY/CjDWyxYI=; b=IaIPyMpZx1o4bAsFgOht/xsAMgkK0YlVEEUhdDtw23/4jQsPOtjqVrCn5u/8fhJsC9 S4UvgLt5ZOPGNAdvMZ9QCiF8xgaKOmVxH7dItAQw5x47/t7i3leVkgduNykcSZyTr2WV wvHTaDqDAfHYrfQTe7GgDTmDx3VvNpvqGOvIy7C24kmQIvk/yQS8CQMS87UdyFzYsEA+ 9HubNpbAaNF/4wrv2ui5bDi3s8w8f79gyqMYLgBlFwNwjCGGK1uXKefOQRdOMYGGUAOD rPDuYBEOBjyXPaMLhlzJUFRS/P5vwXslFB/xBKNijVebokrro0t2YFx1fL8CEvt9fwM4 PIAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717492165; x=1718096965; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=i89wEAwGLV+FFt8LVEfujtav/wRlt8aIRY/CjDWyxYI=; b=vQM+68L+zLw/SqZmNPTzNkfHHCk8gy5+xLnAmmGbQhqFTyXGmoNnldc0iWu85GAvXv w3scwMKbl2zIg1fgeuqEYLM5ipOCMYNm5xOaxlJshpxpArZrgt143yiMTi29NGN7Ywkh Zi5/apnZkoq2TGLpSmPt1opu0jQxFIvMSjeM4YM0U58cecbgttWRZsmARPkzWiJZHIBq pQ66jJ/BLzjkRf1JxETVT3eGRL/CT0t6iKyIOXLwztmwrFovq+wCI63wTephBgWR34vG TvMgwU+5de/FgXOmlq/9FYP1jETYTgdEUef65Yu4Yyzb/3tumIpJkMOSFkt8LgpxnZN0 t+xg== X-Forwarded-Encrypted: i=1; AJvYcCUXsEANCs99TLVqzAzseBJVWFt1w789PKV6FjnjeDxSowxF7FFG7qJmVX3jJbQD5Hu5U6aJdhFaDAPoua5Z6SmK1AA= X-Gm-Message-State: AOJu0YzgDcY8PO3pXmG5fqSIiy3PdUUzUoJg14m40DrxqDmJrXp1/sna 2HbkYLtRUmb9Wt26DlOdmaLzKafj3i28r47BhL3iRtL5nfgRHIHMvO4x8kLzDq4= X-Google-Smtp-Source: AGHT+IEEQrB10Ia4g3WkoPKh5/jpdFJJpYBOp5KDOiMCUB9VjtT3LFxj+J1ilVV1yreFVtWqt8rEuw== X-Received: by 2002:a17:907:970e:b0:a69:228:8a6e with SMTP id a640c23a62f3a-a690228939dmr414530066b.44.1717492165278; Tue, 04 Jun 2024 02:09:25 -0700 (PDT) Received: from raven.blarg.de (p200300dc6f4f9200023064fffe740809.dip0.t-ipconnect.de. [2003:dc:6f4f:9200:230:64ff:fe74:809]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a68fa49e66fsm328376766b.129.2024.06.04.02.09.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 02:09:24 -0700 (PDT) From: Max Kellermann To: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: willy@infradead.org, sfr@canb.auug.org.au, david@redhat.com, Max Kellermann Subject: [PATCH v6 15/15] include: reduce dependencies on linux/mm.h Date: Tue, 4 Jun 2024 11:08:45 +0200 Message-Id: <20240604090845.2182265-16-max.kellermann@ionos.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240604090845.2182265-1-max.kellermann@ionos.com> References: <20240604090845.2182265-1-max.kellermann@ionos.com> MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: A8CCA40023 X-Stat-Signature: dbigd3rbj4aab3kbofbrke1r9uh874ra X-HE-Tag: 1717492166-45108 X-HE-Meta: U2FsdGVkX195xB85SGBQAou4xVuLN/4fEdKHFS8xmtNshK8/XUnSvaiz/J8wi6GVwqse0LXpVkfISEda5gMGEH/V+KzkqJvnlanysJGsw/0Gh0tJRIlbgqRSIdBGTTGxI3lIpCo4+ybKBOQYLu9X/hjcl/CrrOz78UIbqlpuKiYLGAHzZqS1mDeBOgzn9q0+/ta88cAF0Xx6lJJl8lsiUigHMtAPBr8zQNiBVgDqc3d+WGumP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Yz8cvXqu/b+YGt9iHnCpT8qFmtA8Pwo3xZGGortnnYiMMFqIwXKRQwS5hB6UZNG85ypM3q 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: List-Subscribe: List-Unsubscribe: Replace with the smaller pieces that were just splitted out. This affects a few headers that are included by many, e.g. bio.h and highmem.h, which now no longer depend on the fat header. For this, several missing includes need to be added because they are no longer indirectly included, e.g. . Signed-off-by: Max Kellermann --- include/linux/bio.h | 2 ++ include/linux/bpfptr.h | 1 - include/linux/dma-mapping.h | 1 + include/linux/highmem-internal.h | 2 ++ include/linux/highmem.h | 4 +++- include/linux/net.h | 2 +- include/linux/oom.h | 2 +- include/linux/pagemap.h | 2 +- include/linux/scatterlist.h | 2 +- include/linux/skbuff.h | 4 ++++ include/linux/vmstat.h | 3 ++- lib/scatterlist.c | 1 + 12 files changed, 19 insertions(+), 7 deletions(-) diff --git a/include/linux/bio.h b/include/linux/bio.h index d5379548d684..ddb0c831557b 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h @@ -5,7 +5,9 @@ #ifndef __LINUX_BIO_H #define __LINUX_BIO_H +#include // for struct kiocb, IOCB_NOWAIT #include +#include /* struct bio, bio_vec and BIO_* flags are defined in blk_types.h */ #include #include diff --git a/include/linux/bpfptr.h b/include/linux/bpfptr.h index 1af241525a17..19967a0e510c 100644 --- a/include/linux/bpfptr.h +++ b/include/linux/bpfptr.h @@ -3,7 +3,6 @@ #ifndef _LINUX_BPFPTR_H #define _LINUX_BPFPTR_H -#include #include typedef sockptr_t bpfptr_t; diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index f693aafe221f..5a66ade2ddf8 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h @@ -11,6 +11,7 @@ #include #include #include +#include /** * List of possible attributes associated with a DMA mapping. The semantics diff --git a/include/linux/highmem-internal.h b/include/linux/highmem-internal.h index a3028e400a9c..a479e6b7c54c 100644 --- a/include/linux/highmem-internal.h +++ b/include/linux/highmem-internal.h @@ -2,6 +2,8 @@ #ifndef _LINUX_HIGHMEM_INTERNAL_H #define _LINUX_HIGHMEM_INTERNAL_H +#include + /* * Outside of CONFIG_HIGHMEM to support X86 32bit iomap_atomic() cruft. */ diff --git a/include/linux/highmem.h b/include/linux/highmem.h index 00341b56d291..10a165a913ad 100644 --- a/include/linux/highmem.h +++ b/include/linux/highmem.h @@ -7,7 +7,9 @@ #include #include #include -#include +#include // for page_size() +#include // for folio_put() +#include #include #include diff --git a/include/linux/net.h b/include/linux/net.h index 688320b79fcc..481fd7e831af 100644 --- a/include/linux/net.h +++ b/include/linux/net.h @@ -21,7 +21,7 @@ #include #include #include -#include +#include // for page_count() #include #include diff --git a/include/linux/oom.h b/include/linux/oom.h index 7d0c9c48a0c5..518426e092d0 100644 --- a/include/linux/oom.h +++ b/include/linux/oom.h @@ -8,7 +8,7 @@ #include #include #include /* MMF_* */ -#include /* VM_FAULT* */ +#include /* VM_FAULT* */ struct zonelist; struct notifier_block; diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 8f09ed4a4451..43e233c998d2 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h @@ -5,7 +5,7 @@ /* * Copyright 1995 Linus Torvalds */ -#include +#include #include #include #include diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h index 0516e64dc03e..9221bba82b23 100644 --- a/include/linux/scatterlist.h +++ b/include/linux/scatterlist.h @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #ifdef CONFIG_UML diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index fe7d8dbef77e..09d020d5a6f4 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -16,6 +16,10 @@ #include #include #include +#include // for alloc_pages_node() +#include // for get_page(), put_page() +#include // for page_to_nid() +#include // for page_is_pfmemalloc() #include #include #include diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h index 67c2505d3b78..b9ad7fa932e0 100644 --- a/include/linux/vmstat.h +++ b/include/linux/vmstat.h @@ -4,7 +4,8 @@ #include #include -#include // for folio_zone(), folio_nr_pages() +#include // for folio_nr_pages() +#include // for folio_zone() #include #include #include diff --git a/lib/scatterlist.c b/lib/scatterlist.c index 7bc2220fea80..775bad99fcd9 100644 --- a/lib/scatterlist.c +++ b/lib/scatterlist.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include