Skip to contentSkip to conversation

mfd: vexpress-sysreg: Fix resource compound literal assignments

PATCH In review Andy Shevchenko 4 participants 5 messages Nov 13, 2022 – Nov 14, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mfd: vexpress-sysreg: Fix resource compound literal assignments

Since DEFINE_RES_*() macros were converted to provide a compound literal the user doesn't need to repeat it. Moreover, it may not be compiled.

Fixes 9c973ce7f9cf ("resource: Convert DEFINE_RES_NAMED() to be compound literal")

---

Should go via Greg's tree where ioport.h has been changed.

 drivers/mfd/vexpress-sysreg.c | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)
drivers/mfd/vexpress-sysreg.c +4 -12
index aaf24af287dd..eab82619ec31 100644
@@ -61,35 +61,27 @@ static struct mfd_cell vexpress_sysreg_cells[] = {
 		.name = "basic-mmio-gpio",
 		.of_compatible = "arm,vexpress-sysreg,sys_led",
 		.num_resources = 1,
-		.resources = (struct resource []) {
-			DEFINE_RES_MEM_NAMED(SYS_LED, 0x4, "dat"),
-		},
+		.resources = &DEFINE_RES_MEM_NAMED(SYS_LED, 0x4, "dat"),
 		.platform_data = &vexpress_sysreg_sys_led_pdata,
 		.pdata_size = sizeof(vexpress_sysreg_sys_led_pdata),
 	}, {
 		.name = "basic-mmio-gpio",
 		.of_compatible = "arm,vexpress-sysreg,sys_mci",
 		.num_resources = 1,
-		.resources = (struct resource []) {
-			DEFINE_RES_MEM_NAMED(SYS_MCI, 0x4, "dat"),
-		},
+		.resources = &DEFINE_RES_MEM_NAMED(SYS_MCI, 0x4, "dat"),
 		.platform_data = &vexpress_sysreg_sys_mci_pdata,
 		.pdata_size = sizeof(vexpress_sysreg_sys_mci_pdata),
 	}, {
 		.name = "basic-mmio-gpio",
 		.of_compatible = "arm,vexpress-sysreg,sys_flash",
 		.num_resources = 1,
-		.resources = (struct resource []) {
-			DEFINE_RES_MEM_NAMED(SYS_FLASH, 0x4, "dat"),
-		},
+		.resources = &DEFINE_RES_MEM_NAMED(SYS_FLASH, 0x4, "dat"),
 		.platform_data = &vexpress_sysreg_sys_flash_pdata,
 		.pdata_size = sizeof(vexpress_sysreg_sys_flash_pdata),
 	}, {
 		.name = "vexpress-syscfg",
 		.num_resources = 1,
-		.resources = (struct resource []) {
-			DEFINE_RES_MEM(SYS_MISC, 0x4c),
-		},
+		.resources = &DEFINE_RES_MEM(SYS_MISC, 0x4c),
 	}
 };
 
Signature · 1 line
2.35.1
#1 lore raw
Quoted 4 lines · Andy Shevchenko

Since DEFINE_RES_*() macros were converted to provide a compound literal the user doesn't need to repeat it. Moreover, it may not be compiled.

Fixes 9c973ce7f9cf ("resource: Convert DEFINE_RES_NAMED() to be compound literal")

Wrong git id, I have no idea where that came from :(

I'll go fix this up...

greg k-h

#2 lore raw
Quoted 7 lines · Greg Kroah-Hartman
Quoted 4 lines · Andy Shevchenko

Since DEFINE_RES_*() macros were converted to provide a compound literal the user doesn't need to repeat it. Moreover, it may not be compiled.

Fixes 9c973ce7f9cf ("resource: Convert DEFINE_RES_NAMED() to be compound literal")

Wrong git id, I have no idea where that came from :(

Pfhh... I think it's my local one since it was never in Linux Next and I forgot to specify your branch explicitly.

Quoted 1 line

I'll go fix this up...

Thank you!

Signature · 2 lines
With Best Regards,
Andy Shevchenko
maintainer Acked-by on v1 1/1
#4 lore raw
In reply to Andy Shevchenko
Quoted 9 lines · Andy Shevchenko

Since DEFINE_RES_*() macros were converted to provide a compound literal the user doesn't need to repeat it. Moreover, it may not be compiled.

Fixes 9c973ce7f9cf ("resource: Convert DEFINE_RES_NAMED() to be compound literal")

---

Should go via Greg's tree where ioport.h has been changed.

I'm fine with it if Greg is:

Quoted 2 lines
 drivers/mfd/vexpress-sysreg.c | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)
Signature · 1 line
Lee Jones [李琼斯]