* [PATCH] drivers/pcmcia: Fix ifdef covering yenta_pm_ops
@ 2022-01-11 21:54 Paul E. McKenney
2022-01-11 22:50 ` Linus Torvalds
0 siblings, 1 reply; 3+ messages in thread
From: Paul E. McKenney @ 2022-01-11 21:54 UTC (permalink / raw)
To: masahiroy; +Cc: sfr, linux-kernel, torvalds, gregkh, caihuoqing, linux
Currently, yenta_dev_suspend_noirq(), yenta_dev_resume_noirq(),
and yenta_pm_ops are covered by "#ifdef CONFIG_PM", which results in
compiler warnings in kernels built with CONFIG_PM_SLEEP=n and CONFIG_PM=y:
drivers/pcmcia/yenta_socket.c:1322:12: warning: ‘yenta_dev_resume_noirq’ defined but not used [-Wunused-function]
1322 | static int yenta_dev_resume_noirq(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/pcmcia/yenta_socket.c:1303:12: warning: ‘yenta_dev_suspend_noirq’ defined but not used [-Wunused-function]
1303 | static int yenta_dev_suspend_noirq(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~~~~~
This affects kernels built without suspend and hibernation.
Avoid these warnings by using "#ifdef CONFIG_PM_SLEEP".
Fixes: 3daaf2c7aae8 ("pcmcia: Make use of the helper macro SET_NOIRQ_SYSTEM_SLEEP_PM_OPS()")
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Masahiro Yamada <masahiroy@kernel.org>
diff --git a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c
index 837877daed622..3966a6ceb1ac7 100644
--- a/drivers/pcmcia/yenta_socket.c
+++ b/drivers/pcmcia/yenta_socket.c
@@ -1299,7 +1299,7 @@ static int yenta_probe(struct pci_dev *dev, const struct pci_device_id *id)
return ret;
}
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
static int yenta_dev_suspend_noirq(struct device *dev)
{
struct pci_dev *pdev = to_pci_dev(dev);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drivers/pcmcia: Fix ifdef covering yenta_pm_ops
2022-01-11 21:54 [PATCH] drivers/pcmcia: Fix ifdef covering yenta_pm_ops Paul E. McKenney
@ 2022-01-11 22:50 ` Linus Torvalds
2022-01-11 23:21 ` Paul E. McKenney
0 siblings, 1 reply; 3+ messages in thread
From: Linus Torvalds @ 2022-01-11 22:50 UTC (permalink / raw)
To: Paul E. McKenney
Cc: Masahiro Yamada, Stephen Rothwell, Linux Kernel Mailing List,
Greg Kroah-Hartman, caihuoqing, Dominik Brodowski
On Tue, Jan 11, 2022 at 1:54 PM Paul E. McKenney <paulmck@kernel.org> wrote:
>
> Currently, yenta_dev_suspend_noirq(), yenta_dev_resume_noirq(),
> and yenta_pm_ops are covered by "#ifdef CONFIG_PM", which results in
> compiler warnings in kernels built with CONFIG_PM_SLEEP=n and CONFIG_PM=y:
Hmm. Wasn't the pcmcia tree in -next? Or how did this get missed?
Anyway, applied directly. Thanks,
Linus
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drivers/pcmcia: Fix ifdef covering yenta_pm_ops
2022-01-11 22:50 ` Linus Torvalds
@ 2022-01-11 23:21 ` Paul E. McKenney
0 siblings, 0 replies; 3+ messages in thread
From: Paul E. McKenney @ 2022-01-11 23:21 UTC (permalink / raw)
To: Linus Torvalds
Cc: Masahiro Yamada, Stephen Rothwell, Linux Kernel Mailing List,
Greg Kroah-Hartman, caihuoqing, Dominik Brodowski
On Tue, Jan 11, 2022 at 02:50:26PM -0800, Linus Torvalds wrote:
> On Tue, Jan 11, 2022 at 1:54 PM Paul E. McKenney <paulmck@kernel.org> wrote:
> >
> > Currently, yenta_dev_suspend_noirq(), yenta_dev_resume_noirq(),
> > and yenta_pm_ops are covered by "#ifdef CONFIG_PM", which results in
> > compiler warnings in kernels built with CONFIG_PM_SLEEP=n and CONFIG_PM=y:
>
> Hmm. Wasn't the pcmcia tree in -next? Or how did this get missed?
This bug happens when running the rcuscale and refscale tests, not the
usual rcu, lock, and scf torture tests. So I would catch it only if
I ran my overnight torture-everything test against -next during the
critical time, which I failed to do this time. :-/
My guess is that others building such kernels don't often test against
-next.
For whatever it is worth, here is my overnight torture-everything test,
which takes about 15 hours on a 16-CPU system:
./tools/testing/selftests/rcutorture/bin/torture.sh --duration 10 --do-kcsan --kcsan-kmake-arg "CC=clang-11"
> Anyway, applied directly. Thanks,
Thank you!
Thanx, Paul
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-01-11 23:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-11 21:54 [PATCH] drivers/pcmcia: Fix ifdef covering yenta_pm_ops Paul E. McKenney
2022-01-11 22:50 ` Linus Torvalds
2022-01-11 23:21 ` Paul E. McKenney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).