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]
Message-ID: <602392dc-de1f-90bf-3deb-cb5cee81e41c@ti.com>
Date:   Tue, 25 Apr 2023 22:48:16 +0530
From:   "Gole, Dhruva" <d-gole@...com>
To:     Guenter Roeck <linux@...ck-us.net>
CC:     Mark Brown <broonie@...nel.org>,
        Vaishnav Achath <vaishnav.a@...com>, Vignesh <vigneshr@...com>,
        Apurva Nandan <a-nandan@...com>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-spi@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        Grant Likely <grant.likely@...retlab.ca>,
        Tanguy Bouzeloc <tanguy.bouzeloc@...xo.com>
Subject: Re: [PATCH] spi: bcm63xx: remove PM_SLEEP based conditional
 compilation

Hi,

On 4/25/2023 8:38 PM, Guenter Roeck wrote:
> On Thu, Apr 20, 2023 at 05:46:15PM +0530, Dhruva Gole wrote:
>> Get rid of conditional compilation based on CONFIG_PM_SLEEP because
>> it may introduce build issues with certain configs where it maybe disabled
>> This is because if above config is not enabled the suspend-resume
>> functions are never part of the code but the bcm63xx_spi_pm_ops struct
>> still inits them to non-existent suspend-resume functions.
>>
>> Fixes: b42dfed83d95 ("spi: add Broadcom BCM63xx SPI controller driver")
>>
>> Signed-off-by: Dhruva Gole <d-gole@...com>
> This patch results in:
>
> drivers/spi/spi-bcm63xx.c:632:12: error: 'bcm63xx_spi_resume' defined but not used [-Werror=unused-function]
>   632 | static int bcm63xx_spi_resume(struct device *dev)
>       |            ^~~~~~~~~~~~~~~~~~
> drivers/spi/spi-bcm63xx.c:620:12: error: 'bcm63xx_spi_suspend' defined but not used [-Werror=unused-function]
>   620 | static int bcm63xx_spi_suspend(struct device *dev)
>
> on architectures with no PM support (alpha, csky, m68k, openrisc, parisc,
> riscv, s390).

Thanks for pointing this out.

I could send a patch to address this as pointed here [0]

by adding a __maybe_unused.

However, do you think my other patch [1] could address this issue without the need for above?

I think it would because DEFINE_SIMPLE_DEV_PM_OPS doesn't seem to be under any conditional CONFIG_PM.

However, I may have missed something, please do let me know what's the best way to fix.

[0] https://lore.kernel.org/all/24ec3728-9720-ae6a-9ff5-3e2e13a96f76@gmail.com/

[1] https://lore.kernel.org/all/20230424102546.1604484-1-d-gole@ti.com/

>
> Guenter

-- 
Regards,
Dhruva Gole <d-gole@...com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ