Skip to contentSkip to conversation

power: bq27xxx: Update to SPDX licensing

PATCH In review Dan Murphy 3 participants 7 messages Jul 30, 2020 – Sep 9, 2020

Subsystems (3)
lore
Share & tools
lore

Dan Murphy

author
#0 lore raw

PATCH 1/2 power: bq27xxx: Update to SPDX licensing

Update the license to the SPDX licensing format.

---
 drivers/power/supply/bq27xxx_battery.c     |  9 +--------
 drivers/power/supply/bq27xxx_battery_hdq.c |  9 +--------
 drivers/power/supply/bq27xxx_battery_i2c.c | 10 +---------
 3 files changed, 3 insertions(+), 25 deletions(-)
drivers/power/supply/bq27xxx_battery.c +1 -8
index a123f6e21f08..8b112449ace8 100644
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * BQ27xxx battery driver
  *
@@ -9,14 +10,6 @@
  *
  * Based on a previous work by Copyright (C) 2008 Texas Instruments, Inc.
  *
- * This package is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
  * Datasheets:
  * https://www.ti.com/product/bq27000
  * https://www.ti.com/product/bq27200
drivers/power/supply/bq27xxx_battery_hdq.c +1 -8
index 29771967df2e..12b10dad77d3 100644
@@ -1,16 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * BQ27xxx battery monitor HDQ/1-wire driver
  *
  * Copyright (C) 2007-2017 Texas Instruments Incorporated - https://www.ti.com/
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * This program is distributed "as is" WITHOUT ANY WARRANTY of any
- * kind, whether express or implied; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
  */
 
 #include <linux/kernel.h>
drivers/power/supply/bq27xxx_battery_i2c.c +1 -9
index ab02456d69e5..765873dfc495 100644
@@ -1,17 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * BQ27xxx battery monitor I2C driver
  *
  * Copyright (C) 2015 Texas Instruments Incorporated - https://www.ti.com/
  *	Andrew F. Davis <[email protected]>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * This program is distributed "as is" WITHOUT ANY WARRANTY of any
- * kind, whether express or implied; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
  */
 
 #include <linux/i2c.h>
Signature · 1 line
2.28.0
author
#1 lore raw

PATCH 2/2 power: bq27xxx: Fix spacing style and white space issues

Fix spacing style issues with the chip data array. As well as fix missing new line after variable declaration.

---
 drivers/power/supply/bq27xxx_battery.c | 63 ++++++++++++++------------
 1 file changed, 33 insertions(+), 30 deletions(-)
drivers/power/supply/bq27xxx_battery.c +33 -30
index 8b112449ace8..e58039db8e64 100644
@@ -871,35 +871,35 @@ static struct {
 	enum power_supply_property *props;
 	size_t props_size;
 } bq27xxx_chip_data[] = {
-	[BQ27000]   = BQ27XXX_DATA(bq27000,   0         , BQ27XXX_O_ZERO),
-	[BQ27010]   = BQ27XXX_DATA(bq27010,   0         , BQ27XXX_O_ZERO),
-	[BQ2750X]   = BQ27XXX_DATA(bq2750x,   0         , BQ27XXX_O_OTDC),
-	[BQ2751X]   = BQ27XXX_DATA(bq2751x,   0         , BQ27XXX_O_OTDC),
-	[BQ2752X]   = BQ27XXX_DATA(bq2752x,   0         , BQ27XXX_O_OTDC),
-	[BQ27500]   = BQ27XXX_DATA(bq27500,   0x04143672, BQ27XXX_O_OTDC),
-	[BQ27510G1] = BQ27XXX_DATA(bq27510g1, 0         , BQ27XXX_O_OTDC),
-	[BQ27510G2] = BQ27XXX_DATA(bq27510g2, 0         , BQ27XXX_O_OTDC),
-	[BQ27510G3] = BQ27XXX_DATA(bq27510g3, 0         , BQ27XXX_O_OTDC),
-	[BQ27520G1] = BQ27XXX_DATA(bq27520g1, 0         , BQ27XXX_O_OTDC),
-	[BQ27520G2] = BQ27XXX_DATA(bq27520g2, 0         , BQ27XXX_O_OTDC),
-	[BQ27520G3] = BQ27XXX_DATA(bq27520g3, 0         , BQ27XXX_O_OTDC),
-	[BQ27520G4] = BQ27XXX_DATA(bq27520g4, 0         , BQ27XXX_O_OTDC),
-	[BQ27521]   = BQ27XXX_DATA(bq27521,   0         , 0),
-	[BQ27530]   = BQ27XXX_DATA(bq27530,   0         , BQ27XXX_O_UTOT),
-	[BQ27531]   = BQ27XXX_DATA(bq27531,   0         , BQ27XXX_O_UTOT),
-	[BQ27541]   = BQ27XXX_DATA(bq27541,   0         , BQ27XXX_O_OTDC),
-	[BQ27542]   = BQ27XXX_DATA(bq27542,   0         , BQ27XXX_O_OTDC),
-	[BQ27546]   = BQ27XXX_DATA(bq27546,   0         , BQ27XXX_O_OTDC),
-	[BQ27742]   = BQ27XXX_DATA(bq27742,   0         , BQ27XXX_O_OTDC),
-	[BQ27545]   = BQ27XXX_DATA(bq27545,   0x04143672, BQ27XXX_O_OTDC),
-	[BQ27411]   = BQ27XXX_DATA(bq27411,   0x80008000, BQ27XXX_O_UTOT | BQ27XXX_O_CFGUP | BQ27XXX_O_RAM),
-	[BQ27421]   = BQ27XXX_DATA(bq27421,   0x80008000, BQ27XXX_O_UTOT | BQ27XXX_O_CFGUP | BQ27XXX_O_RAM),
-	[BQ27425]   = BQ27XXX_DATA(bq27425,   0x04143672, BQ27XXX_O_UTOT | BQ27XXX_O_CFGUP),
-	[BQ27426]   = BQ27XXX_DATA(bq27426,   0x80008000, BQ27XXX_O_UTOT | BQ27XXX_O_CFGUP | BQ27XXX_O_RAM),
-	[BQ27441]   = BQ27XXX_DATA(bq27441,   0x80008000, BQ27XXX_O_UTOT | BQ27XXX_O_CFGUP | BQ27XXX_O_RAM),
-	[BQ27621]   = BQ27XXX_DATA(bq27621,   0x80008000, BQ27XXX_O_UTOT | BQ27XXX_O_CFGUP | BQ27XXX_O_RAM),
-	[BQ27Z561]  = BQ27XXX_DATA(bq27z561,  0         , BQ27Z561_O_BITS),
-	[BQ28Z610]  = BQ27XXX_DATA(bq28z610,  0         , BQ27Z561_O_BITS),
+	[BQ27000]   = BQ27XXX_DATA(bq27000, 0, BQ27XXX_O_ZERO),
+	[BQ27010]   = BQ27XXX_DATA(bq27010, 0, BQ27XXX_O_ZERO),
+	[BQ2750X]   = BQ27XXX_DATA(bq2750x, 0, BQ27XXX_O_OTDC),
+	[BQ2751X]   = BQ27XXX_DATA(bq2751x, 0, BQ27XXX_O_OTDC),
+	[BQ2752X]   = BQ27XXX_DATA(bq2752x, 0, BQ27XXX_O_OTDC),
+	[BQ27500]   = BQ27XXX_DATA(bq27500, 0x04143672, BQ27XXX_O_OTDC),
+	[BQ27510G1] = BQ27XXX_DATA(bq27510g1, 0, BQ27XXX_O_OTDC),
+	[BQ27510G2] = BQ27XXX_DATA(bq27510g2, 0, BQ27XXX_O_OTDC),
+	[BQ27510G3] = BQ27XXX_DATA(bq27510g3, 0, BQ27XXX_O_OTDC),
+	[BQ27520G1] = BQ27XXX_DATA(bq27520g1, 0, BQ27XXX_O_OTDC),
+	[BQ27520G2] = BQ27XXX_DATA(bq27520g2, 0, BQ27XXX_O_OTDC),
+	[BQ27520G3] = BQ27XXX_DATA(bq27520g3, 0, BQ27XXX_O_OTDC),
+	[BQ27520G4] = BQ27XXX_DATA(bq27520g4, 0, BQ27XXX_O_OTDC),
+	[BQ27521]   = BQ27XXX_DATA(bq27521, 0, 0),
+	[BQ27530]   = BQ27XXX_DATA(bq27530, 0, BQ27XXX_O_UTOT),
+	[BQ27531]   = BQ27XXX_DATA(bq27531, 0, BQ27XXX_O_UTOT),
+	[BQ27541]   = BQ27XXX_DATA(bq27541, 0, BQ27XXX_O_OTDC),
+	[BQ27542]   = BQ27XXX_DATA(bq27542, 0, BQ27XXX_O_OTDC),
+	[BQ27546]   = BQ27XXX_DATA(bq27546, 0, BQ27XXX_O_OTDC),
+	[BQ27742]   = BQ27XXX_DATA(bq27742, 0, BQ27XXX_O_OTDC),
+	[BQ27545]   = BQ27XXX_DATA(bq27545, 0x04143672, BQ27XXX_O_OTDC),
+	[BQ27411]   = BQ27XXX_DATA(bq27411, 0x80008000, BQ27XXX_O_UTOT | BQ27XXX_O_CFGUP | BQ27XXX_O_RAM),
+	[BQ27421]   = BQ27XXX_DATA(bq27421, 0x80008000, BQ27XXX_O_UTOT | BQ27XXX_O_CFGUP | BQ27XXX_O_RAM),
+	[BQ27425]   = BQ27XXX_DATA(bq27425, 0x04143672, BQ27XXX_O_UTOT | BQ27XXX_O_CFGUP),
+	[BQ27426]   = BQ27XXX_DATA(bq27426, 0x80008000, BQ27XXX_O_UTOT | BQ27XXX_O_CFGUP | BQ27XXX_O_RAM),
+	[BQ27441]   = BQ27XXX_DATA(bq27441, 0x80008000, BQ27XXX_O_UTOT | BQ27XXX_O_CFGUP | BQ27XXX_O_RAM),
+	[BQ27621]   = BQ27XXX_DATA(bq27621, 0x80008000, BQ27XXX_O_UTOT | BQ27XXX_O_CFGUP | BQ27XXX_O_RAM),
+	[BQ27Z561]  = BQ27XXX_DATA(bq27z561, 0, BQ27Z561_O_BITS),
+	[BQ28Z610]  = BQ27XXX_DATA(bq28z610, 0, BQ27Z561_O_BITS),
 };
 
 static DEFINE_MUTEX(bq27xxx_list_lock);
@@ -1235,6 +1235,7 @@ static int bq27xxx_battery_cfgupdate_priv(struct bq27xxx_device_info *di, bool a
 static inline int bq27xxx_battery_set_cfgupdate(struct bq27xxx_device_info *di)
 {
 	int ret = bq27xxx_battery_cfgupdate_priv(di, true);
+
 	if (ret < 0 && ret != -EINVAL)
 		dev_err(di->dev, "bus error on set_cfgupdate: %d\n", ret);
 
@@ -1244,6 +1245,7 @@ static inline int bq27xxx_battery_set_cfgupdate(struct bq27xxx_device_info *di)
 static inline int bq27xxx_battery_soft_reset(struct bq27xxx_device_info *di)
 {
 	int ret = bq27xxx_battery_cfgupdate_priv(di, false);
+
 	if (ret < 0 && ret != -EINVAL)
 		dev_err(di->dev, "bus error on soft_reset: %d\n", ret);
 
@@ -1338,6 +1340,7 @@ static void bq27xxx_battery_set_config(struct bq27xxx_device_info *di,
 
 	if (info->voltage_min_design_uv != -EINVAL) {
 		bool same = bd.class == bt.class && bd.block == bt.block;
+
 		if (!same)
 			bq27xxx_battery_read_dm_block(di, &bt);
 		bq27xxx_battery_update_dm_block(di, same ? &bd : &bt,
@@ -1611,7 +1614,7 @@ static bool bq27xxx_battery_overtemp(struct bq27xxx_device_info *di, u16 flags)
 {
 	if (di->opts & BQ27XXX_O_OTDC)
 		return flags & (BQ27XXX_FLAG_OTC | BQ27XXX_FLAG_OTD);
-        if (di->opts & BQ27XXX_O_UTOT)
+	if (di->opts & BQ27XXX_O_UTOT)
 		return flags & BQ27XXX_FLAG_OT;
 
 	return false;
Signature · 1 line
2.28.0
#2 lore raw

Re: [PATCH 2/2] power: bq27xxx: Fix spacing style and white space issues

Quoted 36 lines · Dan Murphy

Fix spacing style issues with the chip data array. As well as fix missing new line after variable declaration.

---
 drivers/power/supply/bq27xxx_battery.c | 63 ++++++++++++++------------
 1 file changed, 33 insertions(+), 30 deletions(-)
drivers/power/supply/bq27xxx_battery.c +0 -20
index 8b112449ace8..e58039db8e64 100644
@@ -871,35 +871,35 @@ static struct {
 	enum power_supply_property *props;
 	size_t props_size;
 } bq27xxx_chip_data[] = {
-	[BQ27000]   = BQ27XXX_DATA(bq27000,   0         , BQ27XXX_O_ZERO),
-	[BQ27010]   = BQ27XXX_DATA(bq27010,   0         , BQ27XXX_O_ZERO),
-	[BQ2750X]   = BQ27XXX_DATA(bq2750x,   0         , BQ27XXX_O_OTDC),
-	[BQ2751X]   = BQ27XXX_DATA(bq2751x,   0         , BQ27XXX_O_OTDC),
-	[BQ2752X]   = BQ27XXX_DATA(bq2752x,   0         , BQ27XXX_O_OTDC),
-	[BQ27500]   = BQ27XXX_DATA(bq27500,   0x04143672, BQ27XXX_O_OTDC),
-	[BQ27510G1] = BQ27XXX_DATA(bq27510g1, 0         , BQ27XXX_O_OTDC),
-	[BQ27510G2] = BQ27XXX_DATA(bq27510g2, 0         , BQ27XXX_O_OTDC),
-	[BQ27510G3] = BQ27XXX_DATA(bq27510g3, 0         , BQ27XXX_O_OTDC),
-	[BQ27520G1] = BQ27XXX_DATA(bq27520g1, 0         , BQ27XXX_O_OTDC),
-	[BQ27520G2] = BQ27XXX_DATA(bq27520g2, 0         , BQ27XXX_O_OTDC),
-	[BQ27520G3] = BQ27XXX_DATA(bq27520g3, 0         , BQ27XXX_O_OTDC),
-	[BQ27520G4] = BQ27XXX_DATA(bq27520g4, 0         , BQ27XXX_O_OTDC),
-	[BQ27521]   = BQ27XXX_DATA(bq27521,   0         , 0),
-	[BQ27530]   = BQ27XXX_DATA(bq27530,   0         , BQ27XXX_O_UTOT),
-	[BQ27531]   = BQ27XXX_DATA(bq27531,   0         , BQ27XXX_O_UTOT),
-	[BQ27541]   = BQ27XXX_DATA(bq27541,   0         , BQ27XXX_O_OTDC),
-	[BQ27542]   = BQ27XXX_DATA(bq27542,   0         , BQ27XXX_O_OTDC),
-	[BQ27546]   = BQ27XXX_DATA(bq27546,   0         , BQ27XXX_O_OTDC),
-	[BQ27742]   = BQ27XXX_DATA(bq27742,   0         , BQ27XXX_O_OTDC),

drivers/power/supply/bq27xxx_battery.c static struct { · line 874

Quoted 10 lines
drivers/power/supply/bq27xxx_battery.c +1 -9
-	[BQ27545]   = BQ27XXX_DATA(bq27545,   0x04143672, BQ27XXX_O_OTDC),
-	[BQ27411]   = BQ27XXX_DATA(bq27411,   0x80008000, BQ27XXX_O_UTOT | BQ27XXX_O_CFGUP | BQ27XXX_O_RAM),
-	[BQ27421]   = BQ27XXX_DATA(bq27421,   0x80008000, BQ27XXX_O_UTOT | BQ27XXX_O_CFGUP | BQ27XXX_O_RAM),
-	[BQ27425]   = BQ27XXX_DATA(bq27425,   0x04143672, BQ27XXX_O_UTOT | BQ27XXX_O_CFGUP),
-	[BQ27426]   = BQ27XXX_DATA(bq27426,   0x80008000, BQ27XXX_O_UTOT | BQ27XXX_O_CFGUP | BQ27XXX_O_RAM),
-	[BQ27441]   = BQ27XXX_DATA(bq27441,   0x80008000, BQ27XXX_O_UTOT | BQ27XXX_O_CFGUP | BQ27XXX_O_RAM),
-	[BQ27621]   = BQ27XXX_DATA(bq27621,   0x80008000, BQ27XXX_O_UTOT | BQ27XXX_O_CFGUP | BQ27XXX_O_RAM),
-	[BQ27Z561]  = BQ27XXX_DATA(bq27z561,  0         , BQ27Z561_O_BITS),
-	[BQ28Z610]  = BQ27XXX_DATA(bq28z610,  0         , BQ27Z561_O_BITS),
+	[BQ27000]   = BQ27XXX_DATA(bq27000, 0, BQ27XXX_O_ZERO),

The spacing before improved readability.

Andrew

Quoted 65 lines
drivers/power/supply/bq27xxx_battery.c +32 -1
+	[BQ27010]   = BQ27XXX_DATA(bq27010, 0, BQ27XXX_O_ZERO),
+	[BQ2750X]   = BQ27XXX_DATA(bq2750x, 0, BQ27XXX_O_OTDC),
+	[BQ2751X]   = BQ27XXX_DATA(bq2751x, 0, BQ27XXX_O_OTDC),
+	[BQ2752X]   = BQ27XXX_DATA(bq2752x, 0, BQ27XXX_O_OTDC),
+	[BQ27500]   = BQ27XXX_DATA(bq27500, 0x04143672, BQ27XXX_O_OTDC),
+	[BQ27510G1] = BQ27XXX_DATA(bq27510g1, 0, BQ27XXX_O_OTDC),
+	[BQ27510G2] = BQ27XXX_DATA(bq27510g2, 0, BQ27XXX_O_OTDC),
+	[BQ27510G3] = BQ27XXX_DATA(bq27510g3, 0, BQ27XXX_O_OTDC),
+	[BQ27520G1] = BQ27XXX_DATA(bq27520g1, 0, BQ27XXX_O_OTDC),
+	[BQ27520G2] = BQ27XXX_DATA(bq27520g2, 0, BQ27XXX_O_OTDC),
+	[BQ27520G3] = BQ27XXX_DATA(bq27520g3, 0, BQ27XXX_O_OTDC),
+	[BQ27520G4] = BQ27XXX_DATA(bq27520g4, 0, BQ27XXX_O_OTDC),
+	[BQ27521]   = BQ27XXX_DATA(bq27521, 0, 0),
+	[BQ27530]   = BQ27XXX_DATA(bq27530, 0, BQ27XXX_O_UTOT),
+	[BQ27531]   = BQ27XXX_DATA(bq27531, 0, BQ27XXX_O_UTOT),
+	[BQ27541]   = BQ27XXX_DATA(bq27541, 0, BQ27XXX_O_OTDC),
+	[BQ27542]   = BQ27XXX_DATA(bq27542, 0, BQ27XXX_O_OTDC),
+	[BQ27546]   = BQ27XXX_DATA(bq27546, 0, BQ27XXX_O_OTDC),
+	[BQ27742]   = BQ27XXX_DATA(bq27742, 0, BQ27XXX_O_OTDC),
+	[BQ27545]   = BQ27XXX_DATA(bq27545, 0x04143672, BQ27XXX_O_OTDC),
+	[BQ27411]   = BQ27XXX_DATA(bq27411, 0x80008000, BQ27XXX_O_UTOT | BQ27XXX_O_CFGUP | BQ27XXX_O_RAM),
+	[BQ27421]   = BQ27XXX_DATA(bq27421, 0x80008000, BQ27XXX_O_UTOT | BQ27XXX_O_CFGUP | BQ27XXX_O_RAM),
+	[BQ27425]   = BQ27XXX_DATA(bq27425, 0x04143672, BQ27XXX_O_UTOT | BQ27XXX_O_CFGUP),
+	[BQ27426]   = BQ27XXX_DATA(bq27426, 0x80008000, BQ27XXX_O_UTOT | BQ27XXX_O_CFGUP | BQ27XXX_O_RAM),
+	[BQ27441]   = BQ27XXX_DATA(bq27441, 0x80008000, BQ27XXX_O_UTOT | BQ27XXX_O_CFGUP | BQ27XXX_O_RAM),
+	[BQ27621]   = BQ27XXX_DATA(bq27621, 0x80008000, BQ27XXX_O_UTOT | BQ27XXX_O_CFGUP | BQ27XXX_O_RAM),
+	[BQ27Z561]  = BQ27XXX_DATA(bq27z561, 0, BQ27Z561_O_BITS),
+	[BQ28Z610]  = BQ27XXX_DATA(bq28z610, 0, BQ27Z561_O_BITS),
 };
 
 static DEFINE_MUTEX(bq27xxx_list_lock);
@@ -1235,6 +1235,7 @@ static int bq27xxx_battery_cfgupdate_priv(struct bq27xxx_device_info *di, bool a
 static inline int bq27xxx_battery_set_cfgupdate(struct bq27xxx_device_info *di)
 {
 	int ret = bq27xxx_battery_cfgupdate_priv(di, true);
+
 	if (ret < 0 && ret != -EINVAL)
 		dev_err(di->dev, "bus error on set_cfgupdate: %d\n", ret);
 
@@ -1244,6 +1245,7 @@ static inline int bq27xxx_battery_set_cfgupdate(struct bq27xxx_device_info *di)
 static inline int bq27xxx_battery_soft_reset(struct bq27xxx_device_info *di)
 {
 	int ret = bq27xxx_battery_cfgupdate_priv(di, false);
+
 	if (ret < 0 && ret != -EINVAL)
 		dev_err(di->dev, "bus error on soft_reset: %d\n", ret);
 
@@ -1338,6 +1340,7 @@ static void bq27xxx_battery_set_config(struct bq27xxx_device_info *di,
 
 	if (info->voltage_min_design_uv != -EINVAL) {
 		bool same = bd.class == bt.class && bd.block == bt.block;
+
 		if (!same)
 			bq27xxx_battery_read_dm_block(di, &bt);
 		bq27xxx_battery_update_dm_block(di, same ? &bd : &bt,
@@ -1611,7 +1614,7 @@ static bool bq27xxx_battery_overtemp(struct bq27xxx_device_info *di, u16 flags)
 {
 	if (di->opts & BQ27XXX_O_OTDC)
 		return flags & (BQ27XXX_FLAG_OTC | BQ27XXX_FLAG_OTD);
-        if (di->opts & BQ27XXX_O_UTOT)
+	if (di->opts & BQ27XXX_O_UTOT)
 		return flags & BQ27XXX_FLAG_OT;
 
 	return false;
author
#3 lore raw

Re: [PATCH 2/2] power: bq27xxx: Fix spacing style and white space issues

Andrew

Quoted 41 lines · Andrew F. Davis
Quoted 40 lines · Dan Murphy

Fix spacing style issues with the chip data array. As well as fix missing new line after variable declaration.

---
  drivers/power/supply/bq27xxx_battery.c | 63 ++++++++++++++------------
  1 file changed, 33 insertions(+), 30 deletions(-)
drivers/power/supply/bq27xxx_battery.c +0 -24
index 8b112449ace8..e58039db8e64 100644
@@ -871,35 +871,35 @@ static struct {
  	enum power_supply_property *props;
  	size_t props_size;
  } bq27xxx_chip_data[] = {
-	[BQ27000]   = BQ27XXX_DATA(bq27000,   0         , BQ27XXX_O_ZERO),
-	[BQ27010]   = BQ27XXX_DATA(bq27010,   0         , BQ27XXX_O_ZERO),
-	[BQ2750X]   = BQ27XXX_DATA(bq2750x,   0         , BQ27XXX_O_OTDC),
-	[BQ2751X]   = BQ27XXX_DATA(bq2751x,   0         , BQ27XXX_O_OTDC),
-	[BQ2752X]   = BQ27XXX_DATA(bq2752x,   0         , BQ27XXX_O_OTDC),
-	[BQ27500]   = BQ27XXX_DATA(bq27500,   0x04143672, BQ27XXX_O_OTDC),
-	[BQ27510G1] = BQ27XXX_DATA(bq27510g1, 0         , BQ27XXX_O_OTDC),
-	[BQ27510G2] = BQ27XXX_DATA(bq27510g2, 0         , BQ27XXX_O_OTDC),
-	[BQ27510G3] = BQ27XXX_DATA(bq27510g3, 0         , BQ27XXX_O_OTDC),
-	[BQ27520G1] = BQ27XXX_DATA(bq27520g1, 0         , BQ27XXX_O_OTDC),
-	[BQ27520G2] = BQ27XXX_DATA(bq27520g2, 0         , BQ27XXX_O_OTDC),
-	[BQ27520G3] = BQ27XXX_DATA(bq27520g3, 0         , BQ27XXX_O_OTDC),
-	[BQ27520G4] = BQ27XXX_DATA(bq27520g4, 0         , BQ27XXX_O_OTDC),
-	[BQ27521]   = BQ27XXX_DATA(bq27521,   0         , 0),
-	[BQ27530]   = BQ27XXX_DATA(bq27530,   0         , BQ27XXX_O_UTOT),
-	[BQ27531]   = BQ27XXX_DATA(bq27531,   0         , BQ27XXX_O_UTOT),
-	[BQ27541]   = BQ27XXX_DATA(bq27541,   0         , BQ27XXX_O_OTDC),
-	[BQ27542]   = BQ27XXX_DATA(bq27542,   0         , BQ27XXX_O_OTDC),
-	[BQ27546]   = BQ27XXX_DATA(bq27546,   0         , BQ27XXX_O_OTDC),
-	[BQ27742]   = BQ27XXX_DATA(bq27742,   0         , BQ27XXX_O_OTDC),
-	[BQ27545]   = BQ27XXX_DATA(bq27545,   0x04143672, BQ27XXX_O_OTDC),
-	[BQ27411]   = BQ27XXX_DATA(bq27411,   0x80008000, BQ27XXX_O_UTOT | BQ27XXX_O_CFGUP | BQ27XXX_O_RAM),
-	[BQ27421]   = BQ27XXX_DATA(bq27421,   0x80008000, BQ27XXX_O_UTOT | BQ27XXX_O_CFGUP | BQ27XXX_O_RAM),
-	[BQ27425]   = BQ27XXX_DATA(bq27425,   0x04143672, BQ27XXX_O_UTOT | BQ27XXX_O_CFGUP),
Quoted 8 lines

drivers/power/supply/bq27xxx_battery.c static struct { · line 874

Quoted 6 lines
drivers/power/supply/bq27xxx_battery.c +1 -5
-	[BQ27426]   = BQ27XXX_DATA(bq27426,   0x80008000, BQ27XXX_O_UTOT | BQ27XXX_O_CFGUP | BQ27XXX_O_RAM),
-	[BQ27441]   = BQ27XXX_DATA(bq27441,   0x80008000, BQ27XXX_O_UTOT | BQ27XXX_O_CFGUP | BQ27XXX_O_RAM),
-	[BQ27621]   = BQ27XXX_DATA(bq27621,   0x80008000, BQ27XXX_O_UTOT | BQ27XXX_O_CFGUP | BQ27XXX_O_RAM),
-	[BQ27Z561]  = BQ27XXX_DATA(bq27z561,  0         , BQ27Z561_O_BITS),
-	[BQ28Z610]  = BQ27XXX_DATA(bq28z610,  0         , BQ27Z561_O_BITS),
+	[BQ27000]   = BQ27XXX_DATA(bq27000, 0, BQ27XXX_O_ZERO),

The spacing before improved readability.

In my opinon reordering this would improve readability or #defining the magic numbers to keep the alignment.

Otherwise checkpatch produces 19 errors on this alone.

Dan

#4 lore raw

Re: [PATCH 2/2] power: bq27xxx: Fix spacing style and white space issues

In reply to Dan Murphy
Quoted 8 lines · Dan Murphy

Fix spacing style issues with the chip data array. As well as fix missing new line after variable declaration.

---
 drivers/power/supply/bq27xxx_battery.c | 63 ++++++++++++++------------
 1 file changed, 33 insertions(+), 30 deletions(-)

Hi all,

Different topic. Do you know what is happening with Andrew's email? I receive bounces with 550, so permanent error (no recipient under this address).

Best regards,
Krzysztof

author
#5 lore raw

Re: [PATCH 2/2] power: bq27xxx: Fix spacing style and white space issues

Krzysztof

Quoted 8 lines · Krzysztof Kozlowski
Quoted 7 lines · Dan Murphy

Fix spacing style issues with the chip data array. As well as fix missing new line after variable declaration.

---
  drivers/power/supply/bq27xxx_battery.c | 63 ++++++++++++++------------
  1 file changed, 33 insertions(+), 30 deletions(-)
Quoted 5 lines

Hi all,

Different topic. Do you know what is happening with Andrew's email? I receive bounces with 550, so permanent error (no recipient under this address).

Andrews email is invalid.  He no longer works for TI.

Dan

Quoted 2 lines

Best regards,
Krzysztof

#6 lore raw

Re: [PATCH 2/2] power: bq27xxx: Fix spacing style and white space issues

Quoted 12 lines · Dan Murphy

Krzysztof

Quoted 8 lines · Krzysztof Kozlowski
Quoted 7 lines · Dan Murphy

Fix spacing style issues with the chip data array. As well as fix missing new line after variable declaration.

---
  drivers/power/supply/bq27xxx_battery.c | 63 ++++++++++++++------------
  1 file changed, 33 insertions(+), 30 deletions(-)
Quoted 7 lines
Quoted 5 lines

Hi all,

Different topic. Do you know what is happening with Andrew's email? I receive bounces with 550, so permanent error (no recipient under this address).

Andrews email is invalid. He no longer works for TI.

Thanks for update. Does he plan to send an email update? If not, I can just remove him from MAINTAINERS.

Best Regards,
Krzysztof