Skip to contentSkip to conversation

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

PATCH In review Michal Orzel 3 participants 3 messages Oct 10, 2024 – Oct 17, 2024

lore
Share & tools
lore
#0 lore raw

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

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.

---
This patch is based on the already acked series (waiting to be committed):
https://lore.kernel.org/xen-devel/[email protected]/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%)
MAINTAINERS +0 -1
index f68ddd7f84a5..3bba2c8c31ad 100644
@@ -292,7 +292,6 @@ M:	Michal Orzel <[email protected]>
 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
xen/common/Makefile +0 -1
index f90bb00d23e5..8dec11544e35 100644
@@ -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
xen/common/device-tree/Makefile +1 -0
index 990abd571acf..58052d074e62 100644
@@ -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
xen/common/device-tree/dt-overlay.c renamed from xen/common/dt-overlay.c +0 -2
similarity index 99%
rename from xen/common/dt-overlay.c
rename to xen/common/device-tree/dt-overlay.c
index 5ce00514ef14..97fb99eaaaf7 100644
@@ -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.
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Michal Orzel

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.

Quoted 62 lines

---
This patch is based on the already acked series (waiting to be committed):
https://lore.kernel.org/xen-devel/[email protected]/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%)
MAINTAINERS +0 -1
index f68ddd7f84a5..3bba2c8c31ad 100644
@@ -292,7 +292,6 @@ M:	Michal Orzel <[email protected]>
 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
xen/common/Makefile +0 -1
index f90bb00d23e5..8dec11544e35 100644
@@ -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
xen/common/device-tree/Makefile +1 -0
index 990abd571acf..58052d074e62 100644
@@ -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
xen/common/device-tree/dt-overlay.c renamed from xen/common/dt-overlay.c +0 -2
similarity index 99%
rename from xen/common/dt-overlay.c
rename to xen/common/device-tree/dt-overlay.c
index 5ce00514ef14..97fb99eaaaf7 100644
@@ -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.
Signature · 1 line
2.25.1
#2 lore raw

Hi,

Quoted 9 lines · Stefano Stabellini
Quoted 6 lines · Michal Orzel

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.

This is now committed.

Cheers,

Signature · 1 line
Julien Grall