Skip to contentSkip to conversation

platform/chrome: chromeos_tbmc - Remove unneeded const

PATCH In review Nathan Chancellor 2 participants 2 messages Oct 8, 2018 – Oct 10, 2018 Chrome hardware platform support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 platform/chrome: chromeos_tbmc - Remove unneeded const

Clang warns:

drivers/platform/chrome/chromeos_tbmc.c:102:14: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier] static const SIMPLE_DEV_PM_OPS(chromeos_tbmc_pm_ops, NULL,

             ^
./include/linux/pm.h:365:56: note: expanded from macro
'SIMPLE_DEV_PM_OPS'
#define SIMPLE_DEV_PM_OPS(name, suspend_fn, resume_fn) \
                                                       ^

1 warning generated.

SIMPLE_DEV_PM_OPS is already declared as const, this one is unnecessary so remove it.

---
 drivers/platform/chrome/chromeos_tbmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/chrome/chromeos_tbmc.c +1 -1
index 1e81f8144c0d..ce259ec9f990 100644
@@ -99,7 +99,7 @@ static const struct acpi_device_id chromeos_tbmc_acpi_device_ids[] = {
 };
 MODULE_DEVICE_TABLE(acpi, chromeos_tbmc_acpi_device_ids);
 
-static const SIMPLE_DEV_PM_OPS(chromeos_tbmc_pm_ops, NULL,
+static SIMPLE_DEV_PM_OPS(chromeos_tbmc_pm_ops, NULL,
 		chromeos_tbmc_resume);
 
 static struct acpi_driver chromeos_tbmc_driver = {
Signature · 1 line
2.19.0
#1 lore raw

Hi Nathan,

Quoted 10 lines · Nathan Chancellor

Clang warns:

drivers/platform/chrome/chromeos_tbmc.c:102:14: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier] static const SIMPLE_DEV_PM_OPS(chromeos_tbmc_pm_ops, NULL,

             ^
./include/linux/pm.h:365:56: note: expanded from macro
'SIMPLE_DEV_PM_OPS'
#define SIMPLE_DEV_PM_OPS(name, suspend_fn, resume_fn) \
                                                       ^
Quoted 6 lines

1 warning generated.

SIMPLE_DEV_PM_OPS is already declared as const, this one is unnecessary so remove it.

Applied for 4.20. Thank you.

Benson

Quoted 20 lines
---
 drivers/platform/chrome/chromeos_tbmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/chrome/chromeos_tbmc.c +1 -1
index 1e81f8144c0d..ce259ec9f990 100644
@@ -99,7 +99,7 @@ static const struct acpi_device_id chromeos_tbmc_acpi_device_ids[] = {
 };
 MODULE_DEVICE_TABLE(acpi, chromeos_tbmc_acpi_device_ids);
 
-static const SIMPLE_DEV_PM_OPS(chromeos_tbmc_pm_ops, NULL,
+static SIMPLE_DEV_PM_OPS(chromeos_tbmc_pm_ops, NULL,
 		chromeos_tbmc_resume);
 
 static struct acpi_driver chromeos_tbmc_driver = {
Signature · 1 line
2.19.0
Signature · 7 lines
Benson Leung
Staff Software Engineer
Chrome OS Kernel
Google Inc.
[email protected]
Chromium OS Project
[email protected]