Skip to contentSkip to conversation

Remove a number of duplicate includes

PATCH In review Jesper Juhl 2 participants 2 messages Jan 31, 2023 – Feb 1, 2023

Subsystems (7)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Remove a number of duplicate includes

From 09d653f07a8bbb2aea52b735a731ca781f5f401c Mon Sep 17 00:00:00 2001
From: Jesper Juhl <[email protected]>
Date: Thu, 26 Jan 2023 02:16:59 +0100
Subject: [PATCH] Remove a number of duplicate includes

Including the same header multiple times when there's no functional reason to do so is just pointless clutter and potentially slows down builds.

---
 drivers/base/node.c                     | 1 -
 drivers/bus/bt1-apb.c                   | 1 -
 drivers/char/hw_random/core.c           | 1 -
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 1 -
 drivers/gpu/drm/drm_gem_shmem_helper.c  | 1 -
 fs/fscache/io.c                         | 1 -
 fs/overlayfs/inode.c                    | 1 -
 kernel/sched/build_utility.c            | 1 -
 kernel/sched/core.c                     | 3 ---
 kernel/sched/fair.c                     | 2 --
 10 files changed, 13 deletions(-)
drivers/base/node.c +0 -1
index faf3597a96da..4306611ac092 100644
@@ -20,7 +20,6 @@
 #include <linux/pm_runtime.h>
 #include <linux/swap.h>
 #include <linux/slab.h>
-#include <linux/hugetlb.h>
 
 static struct bus_type node_subsys = {
 	.name = "node",
drivers/bus/bt1-apb.c +0 -1
index 63b1b4a76671..fd198577cdb3 100644
@@ -22,7 +22,6 @@
 #include <linux/clk.h>
 #include <linux/reset.h>
 #include <linux/time64.h>
-#include <linux/clk.h>
 #include <linux/sysfs.h>
 
 #define APB_EHB_ISR			0x00
drivers/char/hw_random/core.c +0 -1
index f34d356fe2c0..ead998ca0c40 100644
@@ -21,7 +21,6 @@
 #include <linux/sched/signal.h>
 #include <linux/miscdevice.h>
 #include <linux/module.h>
-#include <linux/random.h>
 #include <linux/sched.h>
 #include <linux/slab.h>
 #include <linux/uaccess.h>
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +0 -1
index 55e0284b2bdd..f99251861c08 100644
@@ -43,7 +43,6 @@
 #include <linux/sizes.h>
 #include <linux/module.h>
 
-#include <drm/drm_drv.h>
 #include <drm/ttm/ttm_bo_api.h>
 #include <drm/ttm/ttm_bo_driver.h>
 #include <drm/ttm/ttm_placement.h>
drivers/gpu/drm/drm_gem_shmem_helper.c +0 -1
index b602cd72a120..6f794db17059 100644
@@ -10,7 +10,6 @@
 #include <linux/shmem_fs.h>
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
-#include <linux/module.h>
 
 #ifdef CONFIG_X86
 #include <asm/set_memory.h>
fs/fscache/io.c +0 -1
index 0d2b8dec8f82..ac9f19388bfb 100644
@@ -9,7 +9,6 @@
 #include <linux/uio.h>
 #include <linux/bvec.h>
 #include <linux/slab.h>
-#include <linux/uio.h>
 #include "internal.h"
 
 /**
fs/overlayfs/inode.c +0 -1
index ee6dfa577c93..e6aba8c21efc 100644
@@ -8,7 +8,6 @@
 #include <linux/slab.h>
 #include <linux/cred.h>
 #include <linux/xattr.h>
-#include <linux/posix_acl.h>
 #include <linux/ratelimit.h>
 #include <linux/fiemap.h>
 #include <linux/fileattr.h>
kernel/sched/build_utility.c +0 -1
index 99bdd96f454f..80a3df49ab47 100644
@@ -34,7 +34,6 @@
 #include <linux/nospec.h>
 #include <linux/proc_fs.h>
 #include <linux/psi.h>
-#include <linux/psi.h>
 #include <linux/ptrace_api.h>
 #include <linux/sched_clock.h>
 #include <linux/security.h>
kernel/sched/core.c +0 -3
index e838feb6adc5..f3bba4b8c430 100644
@@ -84,12 +84,9 @@
 
 #include "sched.h"
 #include "stats.h"
-#include "autogroup.h"
-
 #include "autogroup.h"
 #include "pelt.h"
 #include "smp.h"
-#include "stats.h"
 
 #include "../workqueue_internal.h"
 #include "../../io_uring/io-wq.h"
kernel/sched/fair.c +0 -2
index 0f8736991427..e6a11380b47b 100644
@@ -50,8 +50,6 @@
 
 #include <asm/switch_to.h>
 
-#include <linux/sched/cond_resched.h>
-
 #include "sched.h"
 #include "stats.h"
 #include "autogroup.h"
Signature · 1 line
2.39.1
#1 lore raw
Quoted 4 lines · Jesper Juhl
Quoted 1 line

From 09d653f07a8bbb2aea52b735a731ca781f5f401c Mon Sep 17 00:00:00 2001

From: Jesper Juhl <[email protected]>
Date: Thu, 26 Jan 2023 02:16:59 +0100
Subject: [PATCH] Remove a number of duplicate includes

Why is this in the body of the changelog?

Quoted 5 lines

Including the same header multiple times when there's no functional reason to do so is just pointless clutter and potentially slows down builds.

Quoted 12 lines
---
 drivers/base/node.c                     | 1 -
 drivers/bus/bt1-apb.c                   | 1 -
 drivers/char/hw_random/core.c           | 1 -
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 1 -
 drivers/gpu/drm/drm_gem_shmem_helper.c  | 1 -
 fs/fscache/io.c                         | 1 -
 fs/overlayfs/inode.c                    | 1 -
 kernel/sched/build_utility.c            | 1 -
 kernel/sched/core.c                     | 3 ---
 kernel/sched/fair.c                     | 2 --
 10 files changed, 13 deletions(-)

Please properly split this up into subsystem-related patches and send them that way.

thanks,

greg k-h