lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 08 Aug 2022 12:14:15 +0200
From:   Paul Cercueil <paul@...pouillou.net>
To:     Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Cc:     Lee Jones <lee.jones@...aro.org>, linux-kernel@...r.kernel.org,
        Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
        linux-samsung-soc@...r.kernel.org
Subject: Re: [PATCH 13/28] mfd: sec: Remove #ifdef guards for PM related
 functions


[...]

>>>>   ---
>>>>    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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ