[<prev] [next>] [day] [month] [year] [list]
Message-ID: <31d85698-0fc0-6dcc-d3fc-41151f79a9cb@noureddine.xyz>
Date: Sat, 15 May 2021 11:09:41 +0000
From: Nour-eddine Taleb <contact@...reddine.xyz>
To: sre@...nel.org, matti.vaittinen@...rohmeurope.com
Cc: linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-power@...rohmeurope.com
Subject: [PATCH] power: supply: code cleanup
replace declarations like:
char *foo = "bar";
with:
char foo[] = "bar"
because the first declaration creates two variables, one for the string,
and the second for the pointer to the string.
while the second declaration create just one variable for the string,
which makes smaller bin.
Signed-off-by: Nour-eddine Taleb <contact@...reddine.xyz>
---
drivers/power/supply/act8945a_charger.c | 4 ++--
drivers/power/supply/bd70528-charger.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/power/supply/act8945a_charger.c
b/drivers/power/supply/act8945a_charger.c
index e9b5f4283772..d7002b30e74c 100644
--- a/drivers/power/supply/act8945a_charger.c
+++ b/drivers/power/supply/act8945a_charger.c
@@ -15,8 +15,8 @@
#include <linux/regmap.h>
#include <linux/gpio/consumer.h>
-static const char *act8945a_charger_model = "ACT8945A";
-static const char *act8945a_charger_manufacturer = "Active-semi";
+static const char act8945a_charger_model[] = "ACT8945A";
+static const char act8945a_charger_manufacturer[] = "Active-semi";
/*
* ACT8945A Charger Register Map
diff --git a/drivers/power/supply/bd70528-charger.c
b/drivers/power/supply/bd70528-charger.c
index 7c1f0b99c71b..0b7575ed80d5 100644
--- a/drivers/power/supply/bd70528-charger.c
+++ b/drivers/power/supply/bd70528-charger.c
@@ -87,8 +87,8 @@
#define CHG_STAT_TSD_TOPOFF 0x22
#define CHG_STAT_BAT_ERR 0x7f
-static const char *bd70528_charger_model = "BD70528";
-static const char *bd70528_charger_manufacturer = "ROHM Semiconductors";
+static const char bd70528_charger_model[] = "BD70528";
+static const char bd70528_charger_manufacturer[] = "ROHM Semiconductors";
#define BD_ERR_IRQ_HND(_name_, _wrn_) \
static irqreturn_t bd0528_##_name_##_interrupt(int irq, void *arg) \
--
2.30.2
Powered by blists - more mailing lists