[PATCH] device-tree: Move dt-overlay.c to common/device-tree/

Michal Orzel posted 1 patch 2 months, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20241010105746.140921-1-michal.orzel@amd.com
MAINTAINERS                               | 1 -
xen/common/Makefile                       | 1 -
xen/common/device-tree/Makefile           | 1 +
xen/common/{ => device-tree}/dt-overlay.c | 2 --
4 files changed, 1 insertion(+), 4 deletions(-)
rename xen/common/{ => device-tree}/dt-overlay.c (99%)
[PATCH] device-tree: Move dt-overlay.c to common/device-tree/
Posted by Michal Orzel 2 months, 1 week ago
The code is DT specific and as such should be placed under common
directory for DT related files. Update MAINTAINERS file accordingly
and drop the line with a path from a top-level comment in dt-overlay.c.
It serves no purpose and requires being updated on every code movement.

Signed-off-by: Michal Orzel <michal.orzel@amd.com>
---
This patch is based on the already acked series (waiting to be committed):
https://lore.kernel.org/xen-devel/20241004122220.234817-1-michal.orzel@amd.com/T/
---
 MAINTAINERS                               | 1 -
 xen/common/Makefile                       | 1 -
 xen/common/device-tree/Makefile           | 1 +
 xen/common/{ => device-tree}/dt-overlay.c | 2 --
 4 files changed, 1 insertion(+), 4 deletions(-)
 rename xen/common/{ => device-tree}/dt-overlay.c (99%)

diff --git a/MAINTAINERS b/MAINTAINERS
index f68ddd7f84a5..3bba2c8c31ad 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -292,7 +292,6 @@ M:	Michal Orzel <michal.orzel@amd.com>
 S:	Supported
 F:	xen/common/libfdt/
 F:	xen/common/device-tree/
-F:	xen/common/dt-overlay.c
 F:	xen/include/xen/libfdt/
 F:	xen/include/xen/bootfdt.h
 F:	xen/include/xen/device_tree.h
diff --git a/xen/common/Makefile b/xen/common/Makefile
index f90bb00d23e5..8dec11544e35 100644
--- a/xen/common/Makefile
+++ b/xen/common/Makefile
@@ -9,7 +9,6 @@ obj-$(CONFIG_DEBUG_TRACE) += debugtrace.o
 obj-$(CONFIG_HAS_DEVICE_TREE) += device-tree/
 obj-$(CONFIG_IOREQ_SERVER) += dm.o
 obj-y += domain.o
-obj-$(CONFIG_OVERLAY_DTB) += dt-overlay.o
 obj-y += event_2l.o
 obj-y += event_channel.o
 obj-y += event_fifo.o
diff --git a/xen/common/device-tree/Makefile b/xen/common/device-tree/Makefile
index 990abd571acf..58052d074e62 100644
--- a/xen/common/device-tree/Makefile
+++ b/xen/common/device-tree/Makefile
@@ -1,3 +1,4 @@
 obj-y += bootfdt.init.o
 obj-y += bootinfo.init.o
 obj-y += device-tree.o
+obj-$(CONFIG_OVERLAY_DTB) += dt-overlay.o
diff --git a/xen/common/dt-overlay.c b/xen/common/device-tree/dt-overlay.c
similarity index 99%
rename from xen/common/dt-overlay.c
rename to xen/common/device-tree/dt-overlay.c
index 5ce00514ef14..97fb99eaaaf7 100644
--- a/xen/common/dt-overlay.c
+++ b/xen/common/device-tree/dt-overlay.c
@@ -1,7 +1,5 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 /*
- * xen/common/dt-overlay.c
- *
  * Device tree overlay support in Xen.
  *
  * Copyright (C) 2023, Advanced Micro Devices, Inc. All Rights Reserved.
-- 
2.25.1
Re: [PATCH] device-tree: Move dt-overlay.c to common/device-tree/
Posted by Stefano Stabellini 2 months, 1 week ago
On Thu, 10 Oct 2024, Michal Orzel wrote:
> The code is DT specific and as such should be placed under common
> directory for DT related files. Update MAINTAINERS file accordingly
> and drop the line with a path from a top-level comment in dt-overlay.c.
> It serves no purpose and requires being updated on every code movement.
> 
> Signed-off-by: Michal Orzel <michal.orzel@amd.com>

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>


> ---
> This patch is based on the already acked series (waiting to be committed):
> https://lore.kernel.org/xen-devel/20241004122220.234817-1-michal.orzel@amd.com/T/
> ---
>  MAINTAINERS                               | 1 -
>  xen/common/Makefile                       | 1 -
>  xen/common/device-tree/Makefile           | 1 +
>  xen/common/{ => device-tree}/dt-overlay.c | 2 --
>  4 files changed, 1 insertion(+), 4 deletions(-)
>  rename xen/common/{ => device-tree}/dt-overlay.c (99%)
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index f68ddd7f84a5..3bba2c8c31ad 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -292,7 +292,6 @@ M:	Michal Orzel <michal.orzel@amd.com>
>  S:	Supported
>  F:	xen/common/libfdt/
>  F:	xen/common/device-tree/
> -F:	xen/common/dt-overlay.c
>  F:	xen/include/xen/libfdt/
>  F:	xen/include/xen/bootfdt.h
>  F:	xen/include/xen/device_tree.h
> diff --git a/xen/common/Makefile b/xen/common/Makefile
> index f90bb00d23e5..8dec11544e35 100644
> --- a/xen/common/Makefile
> +++ b/xen/common/Makefile
> @@ -9,7 +9,6 @@ obj-$(CONFIG_DEBUG_TRACE) += debugtrace.o
>  obj-$(CONFIG_HAS_DEVICE_TREE) += device-tree/
>  obj-$(CONFIG_IOREQ_SERVER) += dm.o
>  obj-y += domain.o
> -obj-$(CONFIG_OVERLAY_DTB) += dt-overlay.o
>  obj-y += event_2l.o
>  obj-y += event_channel.o
>  obj-y += event_fifo.o
> diff --git a/xen/common/device-tree/Makefile b/xen/common/device-tree/Makefile
> index 990abd571acf..58052d074e62 100644
> --- a/xen/common/device-tree/Makefile
> +++ b/xen/common/device-tree/Makefile
> @@ -1,3 +1,4 @@
>  obj-y += bootfdt.init.o
>  obj-y += bootinfo.init.o
>  obj-y += device-tree.o
> +obj-$(CONFIG_OVERLAY_DTB) += dt-overlay.o
> diff --git a/xen/common/dt-overlay.c b/xen/common/device-tree/dt-overlay.c
> similarity index 99%
> rename from xen/common/dt-overlay.c
> rename to xen/common/device-tree/dt-overlay.c
> index 5ce00514ef14..97fb99eaaaf7 100644
> --- a/xen/common/dt-overlay.c
> +++ b/xen/common/device-tree/dt-overlay.c
> @@ -1,7 +1,5 @@
>  /* SPDX-License-Identifier: GPL-2.0-only */
>  /*
> - * xen/common/dt-overlay.c
> - *
>   * Device tree overlay support in Xen.
>   *
>   * Copyright (C) 2023, Advanced Micro Devices, Inc. All Rights Reserved.
> -- 
> 2.25.1
>
Re: [PATCH] device-tree: Move dt-overlay.c to common/device-tree/
Posted by Julien Grall 2 months ago
Hi,

On 10/10/2024 20:48, Stefano Stabellini wrote:
> On Thu, 10 Oct 2024, Michal Orzel wrote:
>> The code is DT specific and as such should be placed under common
>> directory for DT related files. Update MAINTAINERS file accordingly
>> and drop the line with a path from a top-level comment in dt-overlay.c.
>> It serves no purpose and requires being updated on every code movement.
>>
>> Signed-off-by: Michal Orzel <michal.orzel@amd.com>
> 
> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>

This is now committed.

Cheers,

-- 
Julien Grall