From: Bjorn Helgaas <helgaas@kernel.org>
To: Lukas Wunner <lukas@wunner.de>
Cc: linux-pci@vger.kernel.org
Subject: Re: [PATCH] PCI: hotplug: Drop superfluous #include directives
Date: Tue, 15 Apr 2025 15:33:54 -0500 [thread overview]
Message-ID: <20250415203354.GA34031@bhelgaas> (raw)
In-Reply-To: <c19e25bf2cefecc14e0822c6a9bb3a7f546258bc.1744640331.git.lukas@wunner.de>
On Mon, Apr 14, 2025 at 04:25:21PM +0200, Lukas Wunner wrote:
> In February 2003, historic commit
>
> https://git.kernel.org/tglx/history/c/280c1c9a0ea4
> ("[PATCH] PCI Hotplug: Replace pcihpfs with sysfs.")
>
> removed all invocations of __get_free_page() and free_page() from the
> PCI hotplug core without also removing the #include <linux/pagemap.h>
> directive.
>
> It removed all invocations of kern_mount(), mntget() and mntput()
> without also removing the #include <linux/mount.h> directive.
>
> It removed all invocations of lookup_hash()
> without also removing the #include <linux/namei.h> directive.
>
> It removed all invocations of copy_to_user() and copy_from_user()
> without also removing the #include <linux/uaccess.h> directive.
>
> These #include directives are still unnecessary today, so drop them.
>
> Signed-off-by: Lukas Wunner <lukas@wunner.de>
Applied to pci/hotplug for v6.16, thanks!
> ---
> drivers/pci/hotplug/pci_hotplug_core.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/pci/hotplug/pci_hotplug_core.c b/drivers/pci/hotplug/pci_hotplug_core.c
> index d8c5856..210f93d 100644
> --- a/drivers/pci/hotplug/pci_hotplug_core.c
> +++ b/drivers/pci/hotplug/pci_hotplug_core.c
> @@ -20,13 +20,9 @@
> #include <linux/types.h>
> #include <linux/kobject.h>
> #include <linux/sysfs.h>
> -#include <linux/pagemap.h>
> #include <linux/init.h>
> -#include <linux/mount.h>
> -#include <linux/namei.h>
> #include <linux/pci.h>
> #include <linux/pci_hotplug.h>
> -#include <linux/uaccess.h>
> #include "../pci.h"
> #include "cpci_hotplug.h"
>
> --
> 2.43.0
>
next prev parent reply other threads:[~2025-04-15 20:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-14 14:25 [PATCH] PCI: hotplug: Drop superfluous #include directives Lukas Wunner
2025-04-15 20:33 ` Bjorn Helgaas [this message]
2025-04-17 19:30 ` Lukas Wunner
2025-04-17 19:39 ` Bjorn Helgaas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250415203354.GA34031@bhelgaas \
--to=helgaas@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lukas@wunner.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox