i2c: qup: remove unnecessary CONFIG_PM_SLEEP
Subsystems (9)
PATCH 1/5 i2c: qup: remove unnecessary CONFIG_PM_SLEEP
SET_SYSTEM_SLEEP_PM_OPS has already took good care of CONFIG_PM_CONFIG.
--- drivers/i2c/busses/i2c-qup.c | 2 -- 1 file changed, 2 deletions(-)
drivers/i2c/busses/i2c-qup.c +0 -2
@@ -1940,7 +1940,6 @@ static int qup_i2c_pm_resume_runtime(struct device *device) }#endif -#ifdef CONFIG_PM_SLEEP static int qup_i2c_suspend (struct device *device) {if (!pm_runtime_suspended (device))
@@ -1955,7 +1954,6 @@ static int qup_i2c_resume(struct device *device)pm_request_autosuspend (device);return 0 ; } -#endif static const struct dev_pm_ops qup_i2c_qup_pm_ops = { SET_SYSTEM_SLEEP_PM_OPS(
Signature · 1 line
2.28.0
PATCH 2/5 i2c: mediatek: remove unnecessary CONFIG_PM_SLEEP
SET_SYSTEM_SLEEP_PM_OPS has already took good care of CONFIG_PM_CONFIG.
--- drivers/i2c/busses/i2c-mt65xx.c | 2 -- 1 file changed, 2 deletions(-)
drivers/i2c/busses/i2c-mt65xx.c +0 -2
@@ -1284,7 +1284,6 @@ static int mtk_i2c_remove(struct platform_device *pdev)return 0 ; } -#ifdef CONFIG_PM_SLEEP static int mtk_i2c_resume (struct device *dev) {int ret;
@@ -1302,7 +1301,6 @@ static int mtk_i2c_resume(struct device *dev)return 0 ; } -#endif static const struct dev_pm_ops mtk_i2c_pm = {SET_SYSTEM_SLEEP_PM_OPS (NULL , mtk_i2c_resume)
Signature · 1 line
2.28.0
PATCH 3/5 i2c: brcmstb: remove unnecessary CONFIG_PM_SLEEP
In reply to Coiby XuSIMPLE_DEV_PM_OPS has already took good care of CONFIG_PM_CONFIG.
--- drivers/i2c/busses/i2c-brcmstb.c | 2 -- 1 file changed, 2 deletions(-)
drivers/i2c/busses/i2c-brcmstb.c +0 -2
@@ -713,7 +713,6 @@ static int brcmstb_i2c_remove(struct platform_device *pdev)return 0 ; } -#ifdef CONFIG_PM_SLEEP static int brcmstb_i2c_suspend (struct device *dev) {struct brcmstb_i2c_dev *i2c_dev =dev_get_drvdata (dev);
@@ -731,7 +730,6 @@ static int brcmstb_i2c_resume(struct device *dev)return 0 ; } -#endif static SIMPLE_DEV_PM_OPS(brcmstb_i2c_pm, brcmstb_i2c_suspend, brcmstb_i2c_resume);
Signature · 1 line
2.28.0
Re: [PATCH 3/5] i2c: brcmstb: remove unnecessary CONFIG_PM_SLEEP
Quoted 3 lines · Coiby Xu
SIMPLE_DEV_PM_OPShas already took good care ofCONFIG_PM_CONFIG.Signed-off-by Coiby Xu <[email protected]>
You need to annotate brcmstb_i2c_suspend and brcmstb_i2c_resume with __maybe_unused to avoid generating compiler warnings about unused functions with CONFIG_PM_SLEEP disabled.
Signature · 1 line
Florian
PATCH 4/5 i2c: nomadik: remove unnecessary CONFIG_PM_SLEEP
In reply to Coiby XuSET_LATE_SYSTEM_SLEEP_PM_OPS has already took good care of CONFIG_PM_CONFIG.
--- drivers/i2c/busses/i2c-nomadik.c | 2 -- 1 file changed, 2 deletions(-)
drivers/i2c/busses/i2c-nomadik.c +0 -2
@@ -873,7 +873,6 @@ static irqreturn_t i2c_irq_handler(int irq, void *arg)return IRQ_HANDLED ; } -#ifdef CONFIG_PM_SLEEP static int nmk_i2c_suspend_late (struct device *dev) {int ret;
@@ -890,7 +889,6 @@ static int nmk_i2c_resume_early(struct device *dev) {return pm_runtime_force_resume (dev); } -#endif #ifdef CONFIG_PM static int nmk_i2c_runtime_suspend (struct device *dev)
Signature · 1 line
2.28.0
Re: [PATCH 4/5] i2c: nomadik: remove unnecessary CONFIG_PM_SLEEP
Quoted 3 lines · Coiby Xu
SET_LATE_SYSTEM_SLEEP_PM_OPShas already took good care ofCONFIG_PM_CONFIG.Signed-off-by Coiby Xu <[email protected]>
I don't know about the state of sleep/pm callback macros, but I assume you know what you're doing.
Yours,
Linus Walleij
PATCH 5/5 i2c: stm32: remove unnecessary CONFIG_PM_SLEEP
In reply to Coiby XuSET_SYSTEM_SLEEP_PM_OPS has already took good care of CONFIG_PM_CONFIG.
--- drivers/i2c/busses/i2c-stm32f7.c | 2 -- 1 file changed, 2 deletions(-)
drivers/i2c/busses/i2c-stm32f7.c +0 -2
@@ -2262,7 +2262,6 @@ static int __maybe_unused stm32f7_i2c_runtime_resume(struct device *dev)return 0 ; } -#ifdef CONFIG_PM_SLEEP static int stm32f7_i2c_regs_backup (struct stm32f7_i2c_dev *i2c_dev) {int ret;
@@ -2356,7 +2355,6 @@ static int stm32f7_i2c_resume(struct device *dev)return 0 ; } -#endif static const struct dev_pm_ops stm32f7_i2c_pm_ops = { SET_RUNTIME_PM_OPS(stm32f7_i2c_runtime_suspend,
Signature · 1 line
2.28.0
Re: [PATCH 5/5] i2c: stm32: remove unnecessary CONFIG_PM_SLEEP
Quoted 12 lines · Coiby Xu
SET_SYSTEM_SLEEP_PM_OPShas already took good care ofCONFIG_PM_CONFIG.Signed-off-by Coiby Xu <[email protected]>--- drivers/i2c/busses/i2c-stm32f7.c | 2 -- 1 file changed, 2 deletions(-)drivers/i2c/busses/i2c-stm32f7.c +0
-0
drivers/i2c/busses/i2c-stm32f7.c static int __maybe_unused stm32f7_i2c_runtime_resume(struct device *dev) · line 2265
Quoted 4 lines
drivers/i2c/busses/i2c-stm32f7.c +0
-1@@ -2262,7 +2262,6 @@ static int __maybe_unused stm32f7_i2c_runtime_resume(struct device *dev)return 0 ; } -#ifdef CONFIG_PM_SLEEP
Hi Coiby,
This generates warnings when building with W=1 and CONFIG_PM_SLEEP=n. Could you please add also "__maybe_unused" for relevant routines below ?
drivers/i2c/busses/i2c-stm32f7.c static int __maybe_unused stm32f7_i2c_runtime_resume(struct device *dev) · line 2265
Quoted 1 line
drivers/i2c/busses/i2c-stm32f7.c +0
-0static int stm32f7_i2c_regs_backup (struct stm32f7_i2c_dev *i2c_dev)
^
e.g. insert: __maybe_unused
Best regards,
Fabrice
Quoted 11 lines
drivers/i2c/busses/i2c-stm32f7.c +0
-1{int ret;@@ -2356,7 +2355,6 @@ static int stm32f7_i2c_resume(struct device *dev)return 0 ; } -#endif static const struct dev_pm_ops stm32f7_i2c_pm_ops = { SET_RUNTIME_PM_OPS(stm32f7_i2c_runtime_suspend,
Re: [PATCH 5/5] i2c: stm32: remove unnecessary CONFIG_PM_SLEEP
Hi Fabrice,
Quoted 20 lines · Fabrice Gasnier
Quoted 12 lines · Coiby Xu
SET_SYSTEM_SLEEP_PM_OPShas already took good care ofCONFIG_PM_CONFIG.Signed-off-by Coiby Xu <[email protected]>--- drivers/i2c/busses/i2c-stm32f7.c | 2 -- 1 file changed, 2 deletions(-)drivers/i2c/busses/i2c-stm32f7.c +0
-0drivers/i2c/busses/i2c-stm32f7.c static int __maybe_unused stm32f7_i2c_runtime_resume(struct device *dev) · line 2265
Quoted 4 lines
drivers/i2c/busses/i2c-stm32f7.c +0
-1@@ -2262,7 +2262,6 @@ static int __maybe_unused stm32f7_i2c_runtime_resume(struct device *dev)return 0 ; } -#ifdef CONFIG_PM_SLEEP Hi Coiby,
Quoted 7 lines
This generates warnings when building with W=1 and
CONFIG_PM_SLEEP=n. Could you please add also "__maybe_unused" for relevant routines below ?drivers/i2c/busses/i2c-stm32f7.c static int __maybe_unused stm32f7_i2c_runtime_resume(struct device *dev) · line 2265
Quoted 1 line
drivers/i2c/busses/i2c-stm32f7.c +0
-0static int stm32f7_i2c_regs_backup (struct stm32f7_i2c_dev *i2c_dev)^e.g. insert:
__maybe_unused
Thank you for the suggestion. I'll add "__maybe_unused" in v2.
Quoted 6 lines
Best regards,
FabriceQuoted 4 lines
drivers/i2c/busses/i2c-stm32f7.c +0
-0{int ret;@@ -2356,7 +2355,6 @@ static int stm32f7_i2c_resume(struct device *dev)
Quoted 7 lines
drivers/i2c/busses/i2c-stm32f7.c static int stm32f7_i2c_resume(struct device *dev) · line 2360
Quoted 7 lines
drivers/i2c/busses/i2c-stm32f7.c +0
-1return 0 ; } -#endif static const struct dev_pm_ops stm32f7_i2c_pm_ops = { SET_RUNTIME_PM_OPS(stm32f7_i2c_runtime_suspend,
--
Best regards,
Coiby