* [PATCH] PCI: hotplug: Drop superfluous #include directives
@ 2025-04-14 14:25 Lukas Wunner
2025-04-15 20:33 ` Bjorn Helgaas
0 siblings, 1 reply; 4+ messages in thread
From: Lukas Wunner @ 2025-04-14 14:25 UTC (permalink / raw)
To: Bjorn Helgaas; +Cc: linux-pci
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>
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] PCI: hotplug: Drop superfluous #include directives
2025-04-14 14:25 [PATCH] PCI: hotplug: Drop superfluous #include directives Lukas Wunner
@ 2025-04-15 20:33 ` Bjorn Helgaas
2025-04-17 19:30 ` Lukas Wunner
0 siblings, 1 reply; 4+ messages in thread
From: Bjorn Helgaas @ 2025-04-15 20:33 UTC (permalink / raw)
To: Lukas Wunner; +Cc: linux-pci
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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] PCI: hotplug: Drop superfluous #include directives
2025-04-15 20:33 ` Bjorn Helgaas
@ 2025-04-17 19:30 ` Lukas Wunner
2025-04-17 19:39 ` Bjorn Helgaas
0 siblings, 1 reply; 4+ messages in thread
From: Lukas Wunner @ 2025-04-17 19:30 UTC (permalink / raw)
To: Bjorn Helgaas; +Cc: linux-pci
On Tue, Apr 15, 2025 at 03:33:54PM -0500, Bjorn Helgaas wrote:
> 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!
A small issue snuck into the commit message while applying:
There's a sentence which ends abruptly:
It removed all invocations of lookup_hash() without also removing the
The remainder of the sentence should have been:
#include <linux/namei.h> directive.
While rewrapping the paragraph, the word "#ifdef" ended up at the
beginning of the line and "git commit" interpreted that as a comment
and stripped the line from the commit message.
I think just prepending a blank to the line may stop git from doing that.
Thanks,
Lukas
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] PCI: hotplug: Drop superfluous #include directives
2025-04-17 19:30 ` Lukas Wunner
@ 2025-04-17 19:39 ` Bjorn Helgaas
0 siblings, 0 replies; 4+ messages in thread
From: Bjorn Helgaas @ 2025-04-17 19:39 UTC (permalink / raw)
To: Lukas Wunner; +Cc: linux-pci
On Thu, Apr 17, 2025 at 09:30:40PM +0200, Lukas Wunner wrote:
> On Tue, Apr 15, 2025 at 03:33:54PM -0500, Bjorn Helgaas wrote:
> > 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!
>
> A small issue snuck into the commit message while applying:
>
> There's a sentence which ends abruptly:
>
> It removed all invocations of lookup_hash() without also removing the
>
> The remainder of the sentence should have been:
>
> #include <linux/namei.h> directive.
>
> While rewrapping the paragraph, the word "#ifdef" ended up at the
> beginning of the line and "git commit" interpreted that as a comment
> and stripped the line from the commit message.
Wow, thanks for noticing that. That's new to me. I this I restored
it.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-04-17 19:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-14 14:25 [PATCH] PCI: hotplug: Drop superfluous #include directives Lukas Wunner
2025-04-15 20:33 ` Bjorn Helgaas
2025-04-17 19:30 ` Lukas Wunner
2025-04-17 19:39 ` Bjorn Helgaas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).