diff mbox series

[2/2] power: supply: bq2515x: Some cleanups

Message ID 20230902200518.91585-3-biju.das.jz@bp.renesas.com (mailing list archive)
State Handled Elsewhere, archived
Headers show
Series Match data improvements for bq2515x driver | expand

Commit Message

Biju Das Sept. 2, 2023, 8:05 p.m. UTC
Some cleanups:
 * Remove trailing comma in the terminator entry for OF/ID table.
 * Drop a space from terminator entry for OF table.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
 drivers/power/supply/bq2515x_charger.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Andy Shevchenko Sept. 4, 2023, 10:10 a.m. UTC | #1
On Sat, Sep 02, 2023 at 09:05:18PM +0100, Biju Das wrote:
> Some cleanups:
>  * Remove trailing comma in the terminator entry for OF/ID table.
>  * Drop a space from terminator entry for OF table.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Btw, in all similar patches you may add the reason(s) why you are doing that:

1/ unification;
2/ making code robust against (theoretical) misrebases or other similar things
   where the new entry goes _after_ the termination without compiler noticing.
Andy Shevchenko Sept. 4, 2023, 10:11 a.m. UTC | #2
On Mon, Sep 04, 2023 at 01:10:04PM +0300, Andy Shevchenko wrote:
> On Sat, Sep 02, 2023 at 09:05:18PM +0100, Biju Das wrote:
> > Some cleanups:
> >  * Remove trailing comma in the terminator entry for OF/ID table.
> >  * Drop a space from terminator entry for OF table.
> 
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> Btw, in all similar patches you may add the reason(s) why you are doing that:
> 
> 1/ unification;
> 2/ making code robust against (theoretical) misrebases or other similar things
>    where the new entry goes _after_ the termination without compiler noticing.

I.o.w. "terminator" has to "terminate" at run-time _and_ at compile-time.
diff mbox series

Patch

diff --git a/drivers/power/supply/bq2515x_charger.c b/drivers/power/supply/bq2515x_charger.c
index ada4532fda45..49fa6386a509 100644
--- a/drivers/power/supply/bq2515x_charger.c
+++ b/drivers/power/supply/bq2515x_charger.c
@@ -1139,14 +1139,14 @@  static const struct bq2515x_info bq25155 = {
 static const struct i2c_device_id bq2515x_i2c_ids[] = {
 	{ "bq25150", (kernel_ulong_t)&bq25150 },
 	{ "bq25155", (kernel_ulong_t)&bq25155 },
-	{},
+	{}
 };
 MODULE_DEVICE_TABLE(i2c, bq2515x_i2c_ids);
 
 static const struct of_device_id bq2515x_of_match[] = {
 	{ .compatible = "ti,bq25150", .data = &bq25150 },
 	{ .compatible = "ti,bq25155", .data = &bq25155 },
-	{ },
+	{}
 };
 MODULE_DEVICE_TABLE(of, bq2515x_of_match);