[PATCH v2 21/23] mfd: Unify style of of_device_id arrays

sashiko-bot at kernel.org sashiko-bot at kernel.org
Wed Jul 8 04:32:53 PDT 2026


Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Inconsistencies between the commit message's stated formatting rules and the actual modifications in several files.
--

--- Patch [21]: [PATCH v2 21/23] mfd: Unify style of of_device_id arrays ---
commit 38160e259bf192b6d1cf5cbe5c20b7b81df1f0bc
Author: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig at baylibre.com>

mfd: Unify style of of_device_id arrays

This commit unifies the coding style of of_device_id arrays across multiple
MFD drivers. It aims to ensure consistent spacing, comma placement, and
terminator formatting as specified in the commit message.

> diff --git a/drivers/mfd/stmpe-i2c.c b/drivers/mfd/stmpe-i2c.c
> --- a/drivers/mfd/stmpe-i2c.c
> +++ b/drivers/mfd/stmpe-i2c.c
[ ... ]
>  static const struct of_device_id stmpe_of_match[] = {
[ ... ]
> -	{ .compatible = "st,stmpe1801", .data = (void *)STMPE1801, },
> -	{ .compatible = "st,stmpe2401", .data = (void *)STMPE2401, },
> -	{ .compatible = "st,stmpe2403", .data = (void *)STMPE2403, },
> -	{},
> +	{ .compatible = "st,stmpe1801", .data = (void *)STMPE1801 },
> +	{ .compatible = "st,stmpe2401", .data = (void *)STMPE2401},

[Severity: Low]
This isn't a bug, but does this entry miss the required space before the
closing brace? The commit message mentions adding a space before a closing
brace as part of the style unification.

> +	{ .compatible = "st,stmpe2403", .data = (void *)STMPE2403 },
> +	{ }
>  };
>  MODULE_DEVICE_TABLE(of, stmpe_of_match);

> diff --git a/drivers/mfd/tps6507x.c b/drivers/mfd/tps6507x.c
> --- a/drivers/mfd/tps6507x.c
> +++ b/drivers/mfd/tps6507x.c
[ ... ]
>  #ifdef CONFIG_OF
>  static const struct of_device_id tps6507x_of_match[] = {
> -	{.compatible = "ti,tps6507x", },
> -	{},
> +	{ .compatible = "ti,tps6507x" },
> +	{}

[Severity: Low]
This isn't a bug, but should this list terminator have a single space inside?
The commit message notes a rule for using a single space in the list
terminator.

>  };
>  MODULE_DEVICE_TABLE(of, tps6507x_of_match);
>  #endif

> diff --git a/drivers/mfd/tps6594-i2c.c b/drivers/mfd/tps6594-i2c.c
> --- a/drivers/mfd/tps6594-i2c.c
> +++ b/drivers/mfd/tps6594-i2c.c
[ ... ]
>  static const struct of_device_id tps6594_i2c_of_match_table[] = {
> -	{ .compatible = "ti,tps6594-q1", .data = (void *)TPS6594, },
> -	{ .compatible = "ti,tps6593-q1", .data = (void *)TPS6593, },
> -	{ .compatible = "ti,lp8764-q1",  .data = (void *)LP8764,  },
> -	{ .compatible = "ti,tps65224-q1", .data = (void *)TPS65224, },
> -	{ .compatible = "ti,tps652g1", .data = (void *)TPS652G1, },
> -	{}
> +	{ .compatible = "ti,tps6594-q1", .data = (void *)TPS6594 },
> +	{ .compatible = "ti,tps6593-q1", .data = (void *)TPS6593 },
> +	{ .compatible = "ti,lp8764-q1", .data = (void *)LP8764  },

[Severity: Low]
This isn't a bug, but are there two spaces before the closing brace on the
lp8764-q1 line? It looks like this might have been missed during the cleanup
to ensure a single space before the closing brace.

> +	{ .compatible = "ti,tps65224-q1", .data = (void *)TPS65224 },
> +	{ .compatible = "ti,tps652g1", .data = (void *)TPS652G1 },
> +	{ }
>  };

> diff --git a/drivers/mfd/tps6594-spi.c b/drivers/mfd/tps6594-spi.c
> --- a/drivers/mfd/tps6594-spi.c
> +++ b/drivers/mfd/tps6594-spi.c
[ ... ]
>  static const struct of_device_id tps6594_spi_of_match_table[] = {
> -	{ .compatible = "ti,tps6594-q1", .data = (void *)TPS6594, },
> -	{ .compatible = "ti,tps6593-q1", .data = (void *)TPS6593, },
> -	{ .compatible = "ti,lp8764-q1",  .data = (void *)LP8764,  },
> -	{ .compatible = "ti,tps65224-q1", .data = (void *)TPS65224, },
> -	{ .compatible = "ti,tps652g1", .data = (void *)TPS652G1, },
> -	{}
> +	{ .compatible = "ti,tps6594-q1", .data = (void *)TPS6594 },
> +	{ .compatible = "ti,tps6593-q1", .data = (void *)TPS6593 },
> +	{ .compatible = "ti,lp8764-q1", .data = (void *)LP8764  },

[Severity: Low]
This isn't a bug, but could we also reduce the double spacing before the
closing brace on this line to match the intended single-space style?

> +	{ .compatible = "ti,tps65224-q1", .data = (void *)TPS65224 },
> +	{ .compatible = "ti,tps652g1", .data = (void *)TPS652G1 },
> +	{ }
>  };

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1783507945.git.u.kleine-koenig@baylibre.com?part=21



More information about the linux-amlogic mailing list