pvpanic: Don't use "proxy" headers
PATCH 1/1 pvpanic: Don't use "proxy" headers
Update header inclusions to follow IWYU (Include What You Use) principle.
--- drivers/misc/pvpanic/pvpanic-mmio.c | 7 +++---- drivers/misc/pvpanic/pvpanic-pci.c | 5 +---- drivers/misc/pvpanic/pvpanic.c | 12 ++++++++---- drivers/misc/pvpanic/pvpanic.h | 5 +++++ 4 files changed, 17 insertions(+), 12 deletions(-)
drivers/misc/pvpanic/pvpanic-mmio.c +3 -4
@@ -7,16 +7,15 @@* Copyright (C) 2021 Oracle. */ +#include <linux/device.h> +#include <linux/err.h> #include <linux/io.h> -#include <linux/kernel.h> +#include <linux/ioport.h> #include <linux/kexec.h> #include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/platform_device.h> #include <linux/types.h> -#include <linux/slab.h> - -#include <uapi/misc/pvpanic.h> #include "pvpanic.h"
drivers/misc/pvpanic/pvpanic-pci.c +1 -4
@@ -5,13 +5,10 @@* Copyright (C) 2021 Oracle. */ -#include <linux/kernel.h> +#include <linux/errno.h> #include <linux/module.h> #include <linux/pci.h> #include <linux/types.h> -#include <linux/slab.h> - -#include <uapi/misc/pvpanic.h> #include "pvpanic.h"
drivers/misc/pvpanic/pvpanic.c +8 -4
@@ -8,16 +8,20 @@*/ #include <linux/device.h> +#include <linux/errno.h> +#include <linux/gfp_types.h> #include <linux/io.h> -#include <linux/kernel.h> #include <linux/kexec.h> +#include <linux/kstrtox.h> +#include <linux/limits.h> +#include <linux/list.h> #include <linux/mod_devicetable.h> #include <linux/module.h> -#include <linux/platform_device.h> #include <linux/panic_notifier.h> +#include <linux/platform_device.h> +#include <linux/spinlock.h> +#include <linux/sysfs.h> #include <linux/types.h> -#include <linux/cdev.h> -#include <linux/list.h> #include <uapi/misc/pvpanic.h>
drivers/misc/pvpanic/pvpanic.h +5 -0
@@ -8,6 +8,11 @@#ifndef PVPANIC_H_ #define PVPANIC_H_ +#include <linux/compiler_types.h> + +struct attribute_group ; +struct device ; +int devm_pvpanic_probe (struct device *dev,void __iomem *base);extern const struct attribute_group *pvpanic_dev_groups[];
Signature · 1 line
2.43.0.rc1.1.gbec44491f096
Dec 21, 2023 15:44:55 Andy Shevchenko <[email protected]>:
Quoted 4 lines
Update header inclusions to follow IWYU (Include What You Use) principle.
Signed-off-by Andy Shevchenko <[email protected]>
Note:
This also drops the unused include of the UAPI header which could be mentioned in the changelog.
Quoted 97 lines
---
drivers/misc/pvpanic/pvpanic-mmio.c| 7 +++---- drivers/misc/pvpanic/pvpanic-pci.c | 5 +---- drivers/misc/pvpanic/pvpanic.c | 12 ++++++++---- drivers/misc/pvpanic/pvpanic.h | 5 +++++4 files changed, 17 insertions(+), 12 deletions(-)drivers/misc/pvpanic/pvpanic-mmio.c +3
-4@@ -7,16 +7,15 @@* Copyright (C) 2021 Oracle. */ +#include <linux/device.h> +#include <linux/err.h> #include <linux/io.h> -#include <linux/kernel.h> +#include <linux/ioport.h> #include <linux/kexec.h> #include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/platform_device.h> #include <linux/types.h> -#include <linux/slab.h> - -#include <uapi/misc/pvpanic.h> #include "pvpanic.h" drivers/misc/pvpanic/pvpanic-pci.c +1
-4@@ -5,13 +5,10 @@* Copyright (C) 2021 Oracle. */ -#include <linux/kernel.h> +#include <linux/errno.h> #include <linux/module.h> #include <linux/pci.h> #include <linux/types.h> -#include <linux/slab.h> - -#include <uapi/misc/pvpanic.h> #include "pvpanic.h" drivers/misc/pvpanic/pvpanic.c +8
-4@@ -8,16 +8,20 @@*/ #include <linux/device.h> +#include <linux/errno.h> +#include <linux/gfp_types.h> #include <linux/io.h> -#include <linux/kernel.h> #include <linux/kexec.h> +#include <linux/kstrtox.h> +#include <linux/limits.h> +#include <linux/list.h> #include <linux/mod_devicetable.h> #include <linux/module.h> -#include <linux/platform_device.h> #include <linux/panic_notifier.h> +#include <linux/platform_device.h> +#include <linux/spinlock.h> +#include <linux/sysfs.h> #include <linux/types.h> -#include <linux/cdev.h> -#include <linux/list.h> #include <uapi/misc/pvpanic.h> drivers/misc/pvpanic/pvpanic.h +5
-1@@ -8,6 +8,11 @@#ifndef PVPANIC_H_ #define PVPANIC_H_ +#include <linux/compiler_types.h> + +struct attribute_group ; +struct device ; +int devm_pvpanic_probe (struct device *dev,void __iomem *base);extern const struct attribute_group *pvpanic_dev_groups[]; --2.43.0.rc1.1.gbec44491f096
Quoted 8 lines · Thomas Weißschuh
Dec 21, 2023 15:44:55 Andy Shevchenko <[email protected]>:
Quoted 4 lines
Update header inclusions to follow IWYU (Include What You Use) principle.
Signed-off-by Andy Shevchenko <[email protected]>Reviewed-by Thomas Weißschuh <[email protected]>
Thank you!
Quoted 3 lines
Note:
This also drops the unused include of the UAPI header which could be mentioned in the changelog.
Isn't it implied?
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 10 lines · Andy Shevchenko
Quoted 8 lines · Thomas Weißschuh
Dec 21, 2023 15:44:55 Andy Shevchenko <[email protected]>:
Quoted 4 lines
Update header inclusions to follow IWYU (Include What You Use) principle.
Signed-off-by Andy Shevchenko <[email protected]>Reviewed-by Thomas Weißschuh <[email protected]>
Quoted 7 lines
Thank you!
Quoted 3 lines
Note:
This also drops the unused include of the UAPI header which could be mentioned in the changelog.Isn't it implied?
It's not covered by the subject. The message itself is fine. But it's only a tiny nitpick anyways.
Quoted 3 lines · Thomas Weißschuh
Quoted 2 lines · Andy Shevchenko
Quoted 1 line · Thomas Weißschuh
Dec 21, 2023 15:44:55 Andy Shevchenko <[email protected]>:
...
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Note:
This also drops the unused include of the UAPI header which could be mentioned in the changelog.Isn't it implied?
It's not covered by the subject. The message itself is fine.
Ah, I thought you are talking about the body of the message.
Quoted 1 line
But it's only a tiny nitpick anyways.
Yes, I don't think we need a new iteration due to this.
Thank you for the review!
Signature · 2 lines
With Best Regards, Andy Shevchenko