[PATCH 1/3] mfd: vexpress-sysreg: use more common syntax for compound literals

Bartosz Golaszewski posted 3 patches 5 months ago
[PATCH 1/3] mfd: vexpress-sysreg: use more common syntax for compound literals
Posted by Bartosz Golaszewski 5 months ago
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

The (typeof(foo)) construct is unusual in the kernel, use a more typical
syntax by explicitly spelling out the type.

Link: https://lore.kernel.org/all/20250909-gpio-mmio-gpio-conv-part4-v1-13-9f723dc3524a@linaro.org/
Suggested-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
 drivers/mfd/vexpress-sysreg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/vexpress-sysreg.c b/drivers/mfd/vexpress-sysreg.c
index 9399eb850ca29b0a9d9be2173bee4bcf6888d10f..f49cee91f71cc2e6132cd3118dafd42a48821e0d 100644
--- a/drivers/mfd/vexpress-sysreg.c
+++ b/drivers/mfd/vexpress-sysreg.c
@@ -120,7 +120,7 @@ static int vexpress_sysreg_probe(struct platform_device *pdev)
 	if (!mmc_gpio_chip)
 		return -ENOMEM;
 
-	config = (typeof(config)){
+	config = (struct gpio_generic_chip_config) {
 		.dev = &pdev->dev,
 		.sz = 4,
 		.dat = base + SYS_MCI,

-- 
2.48.1
Re: [PATCH 1/3] mfd: vexpress-sysreg: use more common syntax for compound literals
Posted by Sudeep Holla 5 months ago
On Wed, Sep 10, 2025 at 09:25:45AM +0200, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> 
> The (typeof(foo)) construct is unusual in the kernel, use a more typical
> syntax by explicitly spelling out the type.
> 

Acked-by: Sudeep Holla <sudeep.holla@arm.com>

-- 
Regards,
Sudeep
Re: (subset) [PATCH 1/3] mfd: vexpress-sysreg: use more common syntax for compound literals
Posted by Lee Jones 4 months, 3 weeks ago
On Wed, 10 Sep 2025 09:25:45 +0200, Bartosz Golaszewski wrote:
> The (typeof(foo)) construct is unusual in the kernel, use a more typical
> syntax by explicitly spelling out the type.
> 
> 

Applied, thanks!

[1/3] mfd: vexpress-sysreg: use more common syntax for compound literals
      commit: f8cba973e4e51b8a166cbf81f827ff926f64d92e

--
Lee Jones [李琼斯]