mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] power: supply: max17042_battery: Do not use CONFIG_ prefix in regular C code
@ 2023-07-20 12:25 Przemyslaw
  2023-07-20 12:28 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 6+ messages in thread
From: Przemyslaw @ 2023-07-20 12:25 UTC (permalink / raw)
  To: hdegoede, krzysztof.kozlowski, m.szyprowski,
	sebastian.krzyszkowiak, kernel, sre, linux-pm, linux-kernel
  Cc: lukas.bulwahn, przemoch

From: przemoch <przemekchwiala@gmail.com>

Using CONFIG_ prefix for macros is not a good practice.
Use CONFIG_ prefix in Kconfig only.

Signed-off-by: Przemyslaw Chwiala <przemekchwiala@gmail.com>
---
 drivers/power/supply/max17042_battery.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/power/supply/max17042_battery.c b/drivers/power/supply/max17042_battery.c
index 17ac2ab78c4e..e7d37e422c3f 100644
--- a/drivers/power/supply/max17042_battery.c
+++ b/drivers/power/supply/max17042_battery.c
@@ -36,7 +36,7 @@
 #define STATUS_BR_BIT          (1 << 15)
 
 /* Interrupt mask bits */
-#define CONFIG_ALRT_BIT_ENBL	(1 << 2)
+#define CFG_ALRT_BIT_ENBL	(1 << 2)
 
 #define VFSOC0_LOCK		0x0000
 #define VFSOC0_UNLOCK		0x0080
@@ -1116,8 +1116,8 @@ static int max17042_probe(struct i2c_client *client)
 						chip);
 		if (!ret) {
 			regmap_update_bits(chip->regmap, MAX17042_CONFIG,
-					CONFIG_ALRT_BIT_ENBL,
-					CONFIG_ALRT_BIT_ENBL);
+					CFG_ALRT_BIT_ENBL,
+					CFG_ALRT_BIT_ENBL);
 			max17042_set_soc_threshold(chip, 1);
 		} else {
 			client->irq = 0;
-- 
2.25.1


^ permalink raw reply	[flat|nested] 6+ messages in thread
* [PATCH] power: supply: max17042_battery: Do not use CONFIG_ prefix in regular C code
@ 2023-07-20 12:31 Przemyslaw
  2023-07-20 12:35 ` Krzysztof Kozlowski
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Przemyslaw @ 2023-07-20 12:31 UTC (permalink / raw)
  To: hdegoede, krzysztof.kozlowski, m.szyprowski,
	sebastian.krzyszkowiak, kernel, sre, linux-pm, linux-kernel
  Cc: lukas.bulwahn, Przemyslaw Chwiala

From: Przemyslaw Chwiala <przemekchwiala@gmail.com>

Using CONFIG_ prefix for macros is not a good practice.
Use CONFIG_ prefix in Kconfig only.

Signed-off-by: Przemyslaw Chwiala <przemekchwiala@gmail.com>
---
 drivers/power/supply/max17042_battery.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/power/supply/max17042_battery.c b/drivers/power/supply/max17042_battery.c
index 17ac2ab78c4e..e7d37e422c3f 100644
--- a/drivers/power/supply/max17042_battery.c
+++ b/drivers/power/supply/max17042_battery.c
@@ -36,7 +36,7 @@
 #define STATUS_BR_BIT          (1 << 15)
 
 /* Interrupt mask bits */
-#define CONFIG_ALRT_BIT_ENBL	(1 << 2)
+#define CFG_ALRT_BIT_ENBL	(1 << 2)
 
 #define VFSOC0_LOCK		0x0000
 #define VFSOC0_UNLOCK		0x0080
@@ -1116,8 +1116,8 @@ static int max17042_probe(struct i2c_client *client)
 						chip);
 		if (!ret) {
 			regmap_update_bits(chip->regmap, MAX17042_CONFIG,
-					CONFIG_ALRT_BIT_ENBL,
-					CONFIG_ALRT_BIT_ENBL);
+					CFG_ALRT_BIT_ENBL,
+					CFG_ALRT_BIT_ENBL);
 			max17042_set_soc_threshold(chip, 1);
 		} else {
 			client->irq = 0;
-- 
2.25.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-09-12 19:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-20 12:25 [PATCH] power: supply: max17042_battery: Do not use CONFIG_ prefix in regular C code Przemyslaw
2023-07-20 12:28 ` Krzysztof Kozlowski
2023-07-20 12:31 Przemyslaw
2023-07-20 12:35 ` Krzysztof Kozlowski
2023-07-20 12:48 ` Lukas Bulwahn
2023-09-12 19:08 ` Sebastian Reichel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®