2024-02-29 18:41:07

by Andy Shevchenko

[permalink] [raw]
Subject: [PATCH v2 0/2] devres: A couple of cleanups

A couple of ad-hoc cleanups. No functional changes intended.

v2:
- fixed plural vs. singular "to have" (Philipp)

Andy Shevchenko (2):
devres: Switch to use dev_err_probe() for unification
devres: Don't use "proxy" headers

lib/devres.c | 26 +++++++++++++++-----------
1 file changed, 15 insertions(+), 11 deletions(-)

--
2.43.0.rc1.1.gbec44491f096



2024-02-29 20:20:47

by Andy Shevchenko

[permalink] [raw]
Subject: [PATCH v2 2/2] devres: Don't use "proxy" headers

Update header inclusions to follow IWYU (Include What You Use)
principle.

Signed-off-by: Andy Shevchenko <[email protected]>
---
lib/devres.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/lib/devres.c b/lib/devres.c
index 27f280a39dca..4fc152de6d8b 100644
--- a/lib/devres.c
+++ b/lib/devres.c
@@ -1,10 +1,13 @@
// SPDX-License-Identifier: GPL-2.0
+#include <linux/bug.h>
#include <linux/device.h>
-#include <linux/err.h>
-#include <linux/io.h>
-#include <linux/gfp.h>
+#include <linux/errno.h>
#include <linux/export.h>
+#include <linux/gfp_types.h>
+#include <linux/io.h>
+#include <linux/ioport.h>
#include <linux/of_address.h>
+#include <linux/types.h>

enum devm_ioremap_type {
DEVM_IOREMAP = 0,
--
2.43.0.rc1.1.gbec44491f096


2024-02-29 20:24:14

by Philipp Stanner

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] devres: Don't use "proxy" headers

Wait a second..

On Thu, 2024-02-29 at 17:53 +0200, Andy Shevchenko wrote:
> Update header inclusions to follow IWYU (Include What You Use)
> principle.

Hm, what tree is this based on?

>
> Signed-off-by: Andy Shevchenko <[email protected]>
> ---
>  lib/devres.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/lib/devres.c b/lib/devres.c
> index 27f280a39dca..4fc152de6d8b 100644
> --- a/lib/devres.c
> +++ b/lib/devres.c
> @@ -1,10 +1,13 @@
>  // SPDX-License-Identifier: GPL-2.0
> +#include <linux/bug.h>
>  #include <linux/device.h>

Where does device.h come from?
That's not on master, is it? (see below).

Is this based on my PCI-devres series?

> -#include <linux/err.h>
> -#include <linux/io.h>
> -#include <linux/gfp.h>
> +#include <linux/errno.h>
>  #include <linux/export.h>
> +#include <linux/gfp_types.h>
> +#include <linux/io.h>
> +#include <linux/ioport.h>
>  #include <linux/of_address.h>
> +#include <linux/types.h>
>  
>  enum devm_ioremap_type {
>         DEVM_IOREMAP = 0,

That's what's currently in Linus's master:

// SPDX-License-Identifier: GPL-2.0
#include <linux/err.h>
#include <linux/pci.h>
#include <linux/io.h>
#include <linux/gfp.h>
#include <linux/export.h>
#include <linux/of_address.h>

enum devm_ioremap_type {



P.


2024-02-29 23:39:49

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] devres: Don't use "proxy" headers

On Thu, Feb 29, 2024 at 09:21:43PM +0100, Philipp Stanner wrote:
> On Thu, 2024-02-29 at 17:53 +0200, Andy Shevchenko wrote:
> > Update header inclusions to follow IWYU (Include What You Use)
> > principle.
>
> Hm, what tree is this based on?

Linux next. Seems like I need to rebase on top of driver core.
Thanks for catching this!

--
With Best Regards,
Andy Shevchenko