* [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
* Re: [PATCH] power: supply: max17042_battery: Do not use CONFIG_ prefix in regular C code
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
0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2023-07-20 12:28 UTC (permalink / raw)
To: Przemyslaw, hdegoede, m.szyprowski, sebastian.krzyszkowiak,
kernel, sre, linux-pm, linux-kernel
Cc: lukas.bulwahn
On 20/07/2023 14:25, Przemyslaw wrote:
> From: przemoch <przemekchwiala@gmail.com>
Please use the same name in commit author and SoB.
>
> Using CONFIG_ prefix for macros is not a good practice.
> Use CONFIG_ prefix in Kconfig only.
>
> Signed-off-by: Przemyslaw Chwiala <przemekchwiala@gmail.com>
Code is okay, so please send v2 with fixed author.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [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
2023-07-20 12:48 ` Lukas Bulwahn
@ 2023-09-12 19:08 ` Sebastian Reichel
2 siblings, 0 replies; 6+ messages in thread
From: Sebastian Reichel @ 2023-09-12 19:08 UTC (permalink / raw)
To: hdegoede, krzysztof.kozlowski, m.szyprowski,
sebastian.krzyszkowiak, kernel, sre, linux-pm, linux-kernel,
Przemyslaw
Cc: lukas.bulwahn
On Thu, 20 Jul 2023 14:31:02 +0200, Przemyslaw wrote:
> Using CONFIG_ prefix for macros is not a good practice.
> Use CONFIG_ prefix in Kconfig only.
>
>
Applied, thanks!
[1/1] power: supply: max17042_battery: Do not use CONFIG_ prefix in regular C code
commit: c06a65ac4e4945478f46654920f5af1be1cf384e
Best regards,
--
Sebastian Reichel <sebastian.reichel@collabora.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [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
@ 2023-07-20 12:48 ` Lukas Bulwahn
2023-09-12 19:08 ` Sebastian Reichel
2 siblings, 0 replies; 6+ messages in thread
From: Lukas Bulwahn @ 2023-07-20 12:48 UTC (permalink / raw)
To: Przemyslaw
Cc: hdegoede, krzysztof.kozlowski, m.szyprowski,
sebastian.krzyszkowiak, kernel, sre, linux-pm, linux-kernel
On Thu, Jul 20, 2023 at 2:33 PM Przemyslaw <przemekchwiala@gmail.com> wrote:
>
> From: Przemyslaw Chwiala <przemekchwiala@gmail.com>
>
> Using CONFIG_ prefix for macros is not a good practice.
> Use CONFIG_ prefix in Kconfig only.
>
Przemyslaw, thanks for the clean up of kernel config references. One
less to go on my clean-up list.
Reviewed-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Lukas
> 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
* Re: [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
2023-07-20 12:48 ` Lukas Bulwahn
2023-09-12 19:08 ` Sebastian Reichel
2 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2023-07-20 12:35 UTC (permalink / raw)
To: Przemyslaw, hdegoede, m.szyprowski, sebastian.krzyszkowiak,
kernel, sre, linux-pm, linux-kernel
Cc: lukas.bulwahn
On 20/07/2023 14:31, Przemyslaw wrote:
> 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>
> ---
For future:
Please provide changelog after --- and version your patches (git
format-patch -v2, or use b4).
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
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
^ 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®