power: supply: bq24257: skip 'struct acpi_device_id' when !CONFIG_ACPI
PATCH 1/7 power: supply: bq24257: skip 'struct acpi_device_id' when !CONFIG_ACPI
Since ACPI_PTR() is used to NULLify the value when !CONFIG_ACPI, the struct acpi_device_id becomes unused:
drivers/power/supply/bq24257_charger.c:1155:36: warning:
'bq24257_acpi_match' defined but not used [-Wunused-const-variable=]
--- drivers/power/supply/bq24257_charger.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/power/supply/bq24257_charger.c +2 -0
@@ -1152,6 +1152,7 @@ static const struct of_device_id bq24257_of_match[] = { };MODULE_DEVICE_TABLE (of, bq24257_of_match); +#ifdef CONFIG_ACPI static const struct acpi_device_id bq24257_acpi_match[] = { {"BQ242500" ,BQ24250 }, { "BQ242510", BQ24251 },
@@ -1159,6 +1160,7 @@ static const struct acpi_device_id bq24257_acpi_match[] = { {}, };MODULE_DEVICE_TABLE (acpi, bq24257_acpi_match); +#endif static struct i2c_driver bq24257_driver = { .driver = {
Signature · 1 line
2.17.1
PATCH 2/7 power: supply: bq2515x: fix kerneldoc
Fix kerneldoc W=1 warning:
drivers/power/supply/bq2515x_charger.c:189: warning:
Function parameter or member 'init_data' not described in 'bq2515x_device'
--- drivers/power/supply/bq2515x_charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/supply/bq2515x_charger.c +1 -1
@@ -168,7 +168,7 @@ enum bq2515x_id {* @device_id: value of device_id * @mains_online: boolean value indicating power supply online * -* @bq2515x_init_data init_data: charger initialization data structure +* @init_data: charger initialization data structure */ struct bq2515x_device {struct power_supply *mains;
Signature · 1 line
2.17.1
PATCH 3/7 power: supply: bq25890: skip 'struct acpi_device_id' when !CONFIG_ACPI
In reply to Krzysztof KozlowskiSince ACPI_PTR() is used to NULLify the value when !CONFIG_ACPI, the struct acpi_device_id becomes unused:
drivers/power/supply/bq25890_charger.c:1076:36: warning:
'bq25890_acpi_match' defined but not used [-Wunused-const-variable=]
--- drivers/power/supply/bq25890_charger.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/power/supply/bq25890_charger.c +2 -0
@@ -1073,11 +1073,13 @@ static const struct of_device_id bq25890_of_match[] = { };MODULE_DEVICE_TABLE (of, bq25890_of_match); +#ifdef CONFIG_ACPI static const struct acpi_device_id bq25890_acpi_match[] = { {"BQ258900" ,0 }, {}, };MODULE_DEVICE_TABLE (acpi, bq25890_acpi_match); +#endif static struct i2c_driver bq25890_driver = { .driver = {
Signature · 1 line
2.17.1
PATCH 4/7 power: supply: goldfish: skip 'struct acpi_device_id' when !CONFIG_ACPI
In reply to Krzysztof KozlowskiSince ACPI_PTR() is used to NULLify the value when !CONFIG_ACPI, the struct acpi_device_id becomes unused:
drivers/power/supply/goldfish_battery.c:269:36: warning:
'goldfish_battery_acpi_match' defined but not used [-Wunused-const-variable=]
--- drivers/power/supply/goldfish_battery.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/power/supply/goldfish_battery.c +2 -0
@@ -266,11 +266,13 @@ static const struct of_device_id goldfish_battery_of_match[] = { };MODULE_DEVICE_TABLE (of, goldfish_battery_of_match); +#ifdef CONFIG_ACPI static const struct acpi_device_id goldfish_battery_acpi_match[] = { {"GFSH0001" ,0 }, { }, };MODULE_DEVICE_TABLE (acpi, goldfish_battery_acpi_match); +#endif static struct platform_driver goldfish_battery_device = { .probe = goldfish_battery_probe,
Signature · 1 line
2.17.1
PATCH 5/7 power: supply: rt9455: skip 'struct acpi_device_id' when !CONFIG_ACPI
In reply to Krzysztof KozlowskiSince ACPI_PTR() is used to NULLify the value when !CONFIG_ACPI, the struct acpi_device_id becomes unused:
drivers/power/supply/rt9455_charger.c:1734:36: warning:
'rt9455_i2c_acpi_match' defined but not used [-Wunused-const-variable=]
--- drivers/power/supply/rt9455_charger.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/power/supply/rt9455_charger.c +2 -0
@@ -1731,11 +1731,13 @@ static const struct of_device_id rt9455_of_match[] = { };MODULE_DEVICE_TABLE (of, rt9455_of_match); +#ifdef CONFIG_ACPI static const struct acpi_device_id rt9455_i2c_acpi_match[] = { {"RT945500" ,0 }, { } };MODULE_DEVICE_TABLE (acpi, rt9455_i2c_acpi_match); +#endif static struct i2c_driver rt9455_driver = { .probe = rt9455_probe,
Signature · 1 line
2.17.1
PATCH 6/7 power: supply: charger-manager: drop unused charger assignment
In reply to Krzysztof KozlowskiThe 'charger' variable in error path is assigned but never used:
drivers/power/supply/charger-manager.c: In function 'charger_manager_probe':
drivers/power/supply/charger-manager.c:1626:29: warning: variable 'charger' set but not used [-Wunused-but-set-variable]
--- drivers/power/supply/charger-manager.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/power/supply/charger-manager.c +1 -6
@@ -1622,13 +1622,8 @@ static int charger_manager_probe(struct platform_device *pdev)return 0 ; err_reg_extcon: -for (i =0 ; i < desc->num_charger_regulators; i++) { -struct charger_regulator *charger; - - charger = &desc->charger_regulators[i]; - +for (i =0 ; i < desc->num_charger_regulators; i++)regulator_put (desc->charger_regulators[i].consumer); - }power_supply_unregister (cm->charger_psy);
Signature · 1 line
2.17.1
PATCH 7/7 power: supply: pm2301: drop duplicated i2c_device_id
In reply to Krzysztof KozlowskiThe driver defines two of 'struct i2c_device_id' but uses only one:
drivers/power/supply/pm2301_charger.c:107:35: warning:
'pm2xxx_ident' defined but not used [-Wunused-const-variable=]
--- drivers/power/supply/pm2301_charger.c | 5 ----- 1 file changed, 5 deletions(-)
drivers/power/supply/pm2301_charger.c +0 -5
@@ -104,11 +104,6 @@ static int pm2xxx_charger_current_map[] = { 3000, }; -static const struct i2c_device_id pm2xxx_ident[] = { - {"pm2301" ,0 }, - { } -}; -static void set_lpn_pin (struct pm2xxx_charger *pm2) {if (!pm2->ac.charger_connected &&gpio_is_valid (pm2->lpn_pin)) {
Signature · 1 line
2.17.1
Sebastian Reichel
maintainerHi,
Thanks for the cleanup, I queued all 7 patches.
-- Sebastian
Quoted 31 lines · Krzysztof Kozlowski
Since
ACPI_PTR()is used to NULLify the value when !CONFIG_ACPI, the structacpi_device_idbecomes unused:
drivers/power/supply/bq24257_charger.c:1155:36: warning:
'bq24257_acpi_match' defined but not used [-Wunused-const-variable=]Signed-off-by Krzysztof Kozlowski <[email protected]>--- drivers/power/supply/bq24257_charger.c | 2 ++ 1 file changed, 2 insertions(+)drivers/power/supply/bq24257_charger.c +2
-0@@ -1152,6 +1152,7 @@ static const struct of_device_id bq24257_of_match[] = { };MODULE_DEVICE_TABLE (of, bq24257_of_match); +#ifdef CONFIG_ACPI static const struct acpi_device_id bq24257_acpi_match[] = { {"BQ242500" ,BQ24250 }, { "BQ242510", BQ24251 },@@ -1159,6 +1160,7 @@ static const struct acpi_device_id bq24257_acpi_match[] = { {}, };MODULE_DEVICE_TABLE (acpi, bq24257_acpi_match); +#endif static struct i2c_driver bq24257_driver = { .driver = {