Re: [PATCH 13/28] mfd: sec: Remove #ifdef guards for PM related functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




[...]

  ---
   drivers/mfd/sec-core.c | 7 +++----
   1 file changed, 3 insertions(+), 4 deletions(-)

  diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c
  index 1fb29c45f5cf..a467de2b2fea 100644
  --- a/drivers/mfd/sec-core.c
  +++ b/drivers/mfd/sec-core.c
@@ -455,7 +455,6 @@ static void sec_pmic_shutdown(struct i2c_client
 *i2c)
   	regmap_update_bits(sec_pmic->regmap_pmic, reg, mask, 0);
   }

  -#ifdef CONFIG_PM_SLEEP
   static int sec_pmic_suspend(struct device *dev)

 Did you test W=1 with !CONFIG_PM_SLEEP? No warnings?

 I tested the PR with !CONFIG_PM_SLEEP, correct. sec-core.o compiles
 fine. No warnings with W=1.

Ah, I see now. _DEFINE_DEV_PM_OPS uses __maybe_unused for such case.

Actually it doesn't :) Since the (dev_pm_ops) structure is always (and should always be) referenced through pm_sleep_ptr() or pm_ptr(), the symbols are never seen as unused by the compiler, but are automatically dropped by the compiler when the related config option is turned off.

Cheers,
-Paul





[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux for Synopsys ARC Processors]    
  • [Linux on Unisoc (RDA Micro) SoCs]     [Linux Actions SoC]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  •   Powered by Linux