All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] media: pt1: use #ifdef CONFIG_PM_SLEEP instead of #if
@ 2018-05-05 13:24 Mauro Carvalho Chehab
  2018-05-05 19:59 ` Andy Shevchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Mauro Carvalho Chehab @ 2018-05-05 13:24 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List,
	Mauro Carvalho Chehab, Akihiro Tsukada, Hans Verkuil,
	Arvind Yadav

As pointed by ktest:

>> drivers/media//pci/pt1/pt1.c:1433:5: warning: "CONFIG_PM_SLEEP" is not defined, evaluates to 0 [-Wundef]
    #if CONFIG_PM_SLEEP
        ^~~~~~~~~~~~~~~

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
---
 drivers/media/pci/pt1/pt1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/pci/pt1/pt1.c b/drivers/media/pci/pt1/pt1.c
index 3b7e08a4639a..55a89ea13f2a 100644
--- a/drivers/media/pci/pt1/pt1.c
+++ b/drivers/media/pci/pt1/pt1.c
@@ -1443,7 +1443,7 @@ static struct pci_driver pt1_driver = {
 	.probe		= pt1_probe,
 	.remove		= pt1_remove,
 	.id_table	= pt1_id_table,
-#if CONFIG_PM_SLEEP
+#ifdef CONFIG_PM_SLEEP
 	.driver.pm	= &pt1_pm_ops,
 #endif
 };
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] media: pt1: use #ifdef CONFIG_PM_SLEEP instead of #if
  2018-05-05 13:24 [PATCH] media: pt1: use #ifdef CONFIG_PM_SLEEP instead of #if Mauro Carvalho Chehab
@ 2018-05-05 19:59 ` Andy Shevchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Shevchenko @ 2018-05-05 19:59 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Linux Media Mailing List, Mauro Carvalho Chehab, Akihiro Tsukada,
	Hans Verkuil, Arvind Yadav

On Sat, May 5, 2018 at 4:24 PM, Mauro Carvalho Chehab
<mchehab+samsung@kernel.org> wrote:
> As pointed by ktest:
>
>>> drivers/media//pci/pt1/pt1.c:1433:5: warning: "CONFIG_PM_SLEEP" is not defined, evaluates to 0 [-Wundef]
>     #if CONFIG_PM_SLEEP
>         ^~~~~~~~~~~~~~~
>

Why not to go further and drop this ugly #if(def) in favour of __maybe_unused?

> Reported-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
> ---
>  drivers/media/pci/pt1/pt1.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/pci/pt1/pt1.c b/drivers/media/pci/pt1/pt1.c
> index 3b7e08a4639a..55a89ea13f2a 100644
> --- a/drivers/media/pci/pt1/pt1.c
> +++ b/drivers/media/pci/pt1/pt1.c
> @@ -1443,7 +1443,7 @@ static struct pci_driver pt1_driver = {
>         .probe          = pt1_probe,
>         .remove         = pt1_remove,
>         .id_table       = pt1_id_table,
> -#if CONFIG_PM_SLEEP
> +#ifdef CONFIG_PM_SLEEP
>         .driver.pm      = &pt1_pm_ops,
>  #endif
>  };
> --
> 2.17.0
>



-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-05-05 19:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-05 13:24 [PATCH] media: pt1: use #ifdef CONFIG_PM_SLEEP instead of #if Mauro Carvalho Chehab
2018-05-05 19:59 ` Andy Shevchenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.