Re: [PATCH 9/9] mfd: sprd-sc27xx-spi: remove unnecessary CONFIG_PM_SLEEP

2020-10-30 Thread Coiby Xu

Hi Chunyan,

On Fri, Oct 30, 2020 at 12:02:03PM +0800, Chunyan Zhang wrote:

Hi Coiby,

After removing CONFIG_PM_SLEEP, sprd_pmic_suspend/resume() would not
be built into symbol table with clang compiler though, that would
cause clang compiler report warnings of "unused function" if
CONFIG_PM_SLEEP is not set. So I also prefer to add a __maybe_unused
instead as other people suggested in the mail list.


Thank you for the suggestion! At least Lee prefers to CONFIG_PM_SLEEP
thus to keep the status quo. I'll see he'll change his mind with the
ongoing discussion [1]:)

[1] https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg2361371.html


Thanks,
Chunyan


On Thu, 29 Oct 2020 at 18:07, Coiby Xu  wrote:


SIMPLE_DEV_PM_OPS has already took good care of CONFIG_PM_CONFIG. Signed-off-by: 
Coiby Xu   drivers/mfd/sprd-sc27xx-spi.c | 2 --  1 file 
changed, 2 deletions(-) diff --git a/drivers/mfd/sprd-sc27xx-spi.c 
b/drivers/mfd/sprd-sc27xx-spi.c index 6b7956604a0f..4db2ec9ef2ff 100644 --- 
a/drivers/mfd/sprd-sc27xx-spi.c +++ b/drivers/mfd/sprd-sc27xx-spi.c @@ -206,7 +206,6 
@@ static int sprd_pmic_probe(struct spi_device *spi) return 0; -#ifdef 
CONFIG_PM_SLEEP  static int sprd_pmic_suspend(struct device *dev) struct sprd_pmic 
*ddata = dev_get_drvdata(dev); @@ -226,7 +225,6 @@ static int sprd_pmic_resume(struct 
device *dev) return 0; -#endif  static SIMPLE_DEV_PM_OPS(sprd_pmic_pm_ops, 
sprd_pmic_suspend, sprd_pmic_resume); 2.28.0


--
Best regards,
Coiby


Re: [PATCH 9/9] mfd: sprd-sc27xx-spi: remove unnecessary CONFIG_PM_SLEEP

2020-10-29 Thread Chunyan Zhang
Hi Coiby,

After removing CONFIG_PM_SLEEP, sprd_pmic_suspend/resume() would not
be built into symbol table with clang compiler though, that would
cause clang compiler report warnings of "unused function" if
CONFIG_PM_SLEEP is not set. So I also prefer to add a __maybe_unused
instead as other people suggested in the mail list.

Thanks,
Chunyan


On Thu, 29 Oct 2020 at 18:07, Coiby Xu  wrote:
>
> SIMPLE_DEV_PM_OPS has already took good care of CONFIG_PM_CONFIG. 
> Signed-off-by: Coiby Xu   drivers/mfd/sprd-sc27xx-spi.c | 
> 2 --  1 file changed, 2 deletions(-) diff --git 
> a/drivers/mfd/sprd-sc27xx-spi.c b/drivers/mfd/sprd-sc27xx-spi.c index 
> 6b7956604a0f..4db2ec9ef2ff 100644 --- a/drivers/mfd/sprd-sc27xx-spi.c +++ 
> b/drivers/mfd/sprd-sc27xx-spi.c @@ -206,7 +206,6 @@ static int 
> sprd_pmic_probe(struct spi_device *spi) return 0; -#ifdef CONFIG_PM_SLEEP  
> static int sprd_pmic_suspend(struct device *dev) struct sprd_pmic *ddata = 
> dev_get_drvdata(dev); @@ -226,7 +225,6 @@ static int sprd_pmic_resume(struct 
> device *dev) return 0; -#endif  static SIMPLE_DEV_PM_OPS(sprd_pmic_pm_ops, 
> sprd_pmic_suspend, sprd_pmic_resume); 2.28.0


[PATCH 9/9] mfd: sprd-sc27xx-spi: remove unnecessary CONFIG_PM_SLEEP

2020-10-29 Thread Coiby Xu
SIMPLE_DEV_PM_OPS has already took good care of CONFIG_PM_CONFIG.

Signed-off-by: Coiby Xu 
---
 drivers/mfd/sprd-sc27xx-spi.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/mfd/sprd-sc27xx-spi.c b/drivers/mfd/sprd-sc27xx-spi.c
index 6b7956604a0f..4db2ec9ef2ff 100644
--- a/drivers/mfd/sprd-sc27xx-spi.c
+++ b/drivers/mfd/sprd-sc27xx-spi.c
@@ -206,7 +206,6 @@ static int sprd_pmic_probe(struct spi_device *spi)
return 0;
 }
 
-#ifdef CONFIG_PM_SLEEP
 static int sprd_pmic_suspend(struct device *dev)
 {
struct sprd_pmic *ddata = dev_get_drvdata(dev);
@@ -226,7 +225,6 @@ static int sprd_pmic_resume(struct device *dev)
 
return 0;
 }
-#endif
 
 static SIMPLE_DEV_PM_OPS(sprd_pmic_pm_ops, sprd_pmic_suspend, 
sprd_pmic_resume);
 
-- 
2.28.0