[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKXUXMzNejUiJQOnkB9J28nbQg4epKF5c59d20SK9we7-txyJQ@mail.gmail.com>
Date: Thu, 20 Jul 2023 14:48:47 +0200
From: Lukas Bulwahn <lukas.bulwahn@...il.com>
To: Przemyslaw <przemekchwiala@...il.com>
Cc: hdegoede@...hat.com, krzysztof.kozlowski@...aro.org,
m.szyprowski@...sung.com, sebastian.krzyszkowiak@...i.sm,
kernel@...i.sm, sre@...nel.org, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] power: supply: max17042_battery: Do not use CONFIG_
prefix in regular C code
On Thu, Jul 20, 2023 at 2:33 PM Przemyslaw <przemekchwiala@...il.com> wrote:
>
> From: Przemyslaw Chwiala <przemekchwiala@...il.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@...il.com>
Lukas
> Signed-off-by: Przemyslaw Chwiala <przemekchwiala@...il.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
>
Powered by blists - more mailing lists