Skip to contentSkip to conversation

of: unittest: Use DEFINE_RES_MEM() to simplify code

PATCH Applied Zhen Lei 2 participants 2 messages Jun 1, 2021 – Jun 4, 2021 Device tree

lore
Share & tools
lore

Zhen Lei

author
#0 lore raw

PATCH 1/1 of: unittest: Use DEFINE_RES_MEM() to simplify code

No functional change.

---
 drivers/of/unittest.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/of/unittest.c +1 -5
index 819a20acaa93986..8c056972a6ddc72 100644
@@ -1209,11 +1209,7 @@ static void __init of_unittest_match_node(void)
 	}
 }
 
-static struct resource test_bus_res = {
-	.start = 0xfffffff8,
-	.end = 0xfffffff9,
-	.flags = IORESOURCE_MEM,
-};
+static struct resource test_bus_res = DEFINE_RES_MEM(0xfffffff8, 2);
 static const struct platform_device_info test_bus_info = {
 	.name = "unittest-bus",
 };
Signature · 1 line
2.26.0.106.g9fadedd
maintainer Applied
#1 lore raw
Quoted 7 lines · Zhen Lei

No functional change.

---
 drivers/of/unittest.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Applied, thanks!