From: Przemyslaw <przemekchwiala@gmail.com>
To: hdegoede@redhat.com, krzysztof.kozlowski@linaro.org,
m.szyprowski@samsung.com, sebastian.krzyszkowiak@puri.sm,
kernel@puri.sm, sre@kernel.org, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: lukas.bulwahn@gmail.com, przemoch <przemekchwiala@gmail.com>
Subject: [PATCH] power: supply: max17042_battery: Do not use CONFIG_ prefix in regular C code
Date: Thu, 20 Jul 2023 14:25:28 +0200 [thread overview]
Message-ID: <20230720122528.154008-1-przemekchwiala@gmail.com> (raw)
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
next reply other threads:[~2023-07-20 12:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-20 12:25 Przemyslaw [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230720122528.154008-1-przemekchwiala@gmail.com \
--to=przemekchwiala@gmail.com \
--cc=hdegoede@redhat.com \
--cc=kernel@puri.sm \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lukas.bulwahn@gmail.com \
--cc=m.szyprowski@samsung.com \
--cc=sebastian.krzyszkowiak@puri.sm \
--cc=sre@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®