From: "Gole, Dhruva" <d-gole@ti.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Mark Brown <broonie@kernel.org>,
Vaishnav Achath <vaishnav.a@ti.com>, Vignesh <vigneshr@ti.com>,
Apurva Nandan <a-nandan@ti.com>,
<linux-arm-kernel@lists.infradead.org>,
<linux-spi@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Grant Likely <grant.likely@secretlab.ca>,
Tanguy Bouzeloc <tanguy.bouzeloc@efixo.com>
Subject: Re: [PATCH] spi: bcm63xx: remove PM_SLEEP based conditional compilation
Date: Tue, 25 Apr 2023 22:48:16 +0530 [thread overview]
Message-ID: <602392dc-de1f-90bf-3deb-cb5cee81e41c@ti.com> (raw)
In-Reply-To: <8edb48ee-55a3-4cc2-9c81-514ec867b35c@roeck-us.net>
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@ti.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@ti.com>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-04-25 17:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-20 12:16 [PATCH] spi: bcm63xx: remove PM_SLEEP based conditional compilation Dhruva Gole
2023-04-21 16:06 ` Mark Brown
2023-04-21 17:13 ` Florian Fainelli
2023-04-24 8:20 ` Jonas Gorski
2023-04-24 10:26 ` Dhruva Gole
2023-04-25 15:08 ` Guenter Roeck
2023-04-25 17:18 ` Gole, Dhruva [this message]
2023-04-25 17:37 ` Guenter Roeck
2023-04-25 18:00 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=602392dc-de1f-90bf-3deb-cb5cee81e41c@ti.com \
--to=d-gole@ti.com \
--cc=a-nandan@ti.com \
--cc=broonie@kernel.org \
--cc=grant.likely@secretlab.ca \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=tanguy.bouzeloc@efixo.com \
--cc=vaishnav.a@ti.com \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox