power: supply: max17042_battery: Do not use CONFIG_ prefix in regular C code
Subsystems (2)
PATCH 1/1 power: supply: max17042_battery: Do not use CONFIG_ prefix in regular C code
From: Przemyslaw Chwiala <[email protected]>
Using CONFIG_ prefix for macros is not a good practice. Use CONFIG_ prefix in Kconfig only.
--- drivers/power/supply/max17042_battery.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/power/supply/max17042_battery.c +3 -3
@@ -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 ;
Signature · 1 line
2.25.1
Quoted 7 lines · Przemyslaw
From: Przemyslaw Chwiala <[email protected]>
Using
CONFIG_prefix for macros is not a good practice. UseCONFIG_prefix inKconfigonly.Signed-off-by Przemyslaw Chwiala <[email protected]>---
For future:
Please provide changelog after --- and version your patches (git format-patch -v2, or use b4).
---
This is an automated instruction, just in case, because many review tags are being ignored. If you do not know the process, here is a short explanation:
Please add Acked-by/Reviewed-by/Tested-by tags when posting new versions, under or above your Signed-off-by tag. Tag is "received", when provided in a message replied to you on the mailing list. Tools like b4 can help here. However, there's no need to repost patches *only* to add the tags. The upstream maintainer will do that for acks received on the version they apply.
https://elixir.bootlin.com/linux/v5.17/source/Documentation/process/submitting-patches.rst#L540
Best regards,
Krzysztof
Quoted 6 lines · Przemyslaw
From: Przemyslaw Chwiala <[email protected]>
Using
CONFIG_prefix for macros is not a good practice. UseCONFIG_prefix inKconfigonly.
Przemyslaw, thanks for the clean up of kernel config references. One less to go on my clean-up list.
Lukas
Quoted 32 lines
Signed-off-by Przemyslaw Chwiala <[email protected]>--- drivers/power/supply/max17042_battery.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/power/supply/max17042_battery.c +3
-4@@ -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
Sebastian Reichel
AppliedQuoted 4 lines · Przemyslaw
Using
CONFIG_prefix for macros is not a good practice. UseCONFIG_prefix inKconfigonly.
Applied, thanks!
[1/1] power: supply: max17042_battery: Do not use CONFIG_ prefix in regular C code
commit: c06a65ac4e4945478f46654920f5af1be1cf384e
Best regards,
Signature · 1 line
Sebastian Reichel <[email protected]>