public inbox for dmaengine@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/1] dmaengine: idma64: switch to DEFINE_SIMPLE_DEV_PM_OPS()
@ 2026-01-29 10:49 Andy Shevchenko
  2026-01-29 18:37 ` kernel test robot
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Andy Shevchenko @ 2026-01-29 10:49 UTC (permalink / raw)
  To: Andy Shevchenko, dmaengine, linux-kernel; +Cc: Vinod Koul

SET_*_PM_OPS() are deprecated, replace it with DEFINE_SIMPLE_DEV_PM_OPS()
and use pm_sleep_ptr() for setting the driver's PM routines. We can now
remove the __maybe_unused qualifier in the suspend and resume functions.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/dma/idma64.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/dma/idma64.c b/drivers/dma/idma64.c
index d147353d47ab..d1197d68df94 100644
--- a/drivers/dma/idma64.c
+++ b/drivers/dma/idma64.c
@@ -671,7 +671,7 @@ static void idma64_platform_remove(struct platform_device *pdev)
 	idma64_remove(chip);
 }
 
-static int __maybe_unused idma64_pm_suspend(struct device *dev)
+static int idma64_pm_suspend(struct device *dev)
 {
 	struct idma64_chip *chip = dev_get_drvdata(dev);
 
@@ -679,7 +679,7 @@ static int __maybe_unused idma64_pm_suspend(struct device *dev)
 	return 0;
 }
 
-static int __maybe_unused idma64_pm_resume(struct device *dev)
+static int idma64_pm_resume(struct device *dev)
 {
 	struct idma64_chip *chip = dev_get_drvdata(dev);
 
@@ -687,16 +687,14 @@ static int __maybe_unused idma64_pm_resume(struct device *dev)
 	return 0;
 }
 
-static const struct dev_pm_ops idma64_dev_pm_ops = {
-	SET_SYSTEM_SLEEP_PM_OPS(idma64_pm_suspend, idma64_pm_resume)
-};
+static DEFINE_SIMPLE_DEV_PM_OPS(idma64_pm_suspend, idma64_pm_resume);
 
 static struct platform_driver idma64_platform_driver = {
 	.probe		= idma64_platform_probe,
 	.remove		= idma64_platform_remove,
 	.driver = {
 		.name	= LPSS_IDMA64_DRIVER_NAME,
-		.pm	= &idma64_dev_pm_ops,
+		.pm	= pm_sleep_ptr(&idma64_dev_pm_ops),
 	},
 };
 
-- 
2.50.1


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

* Re: [PATCH v1 1/1] dmaengine: idma64: switch to DEFINE_SIMPLE_DEV_PM_OPS()
  2026-01-29 10:49 [PATCH v1 1/1] dmaengine: idma64: switch to DEFINE_SIMPLE_DEV_PM_OPS() Andy Shevchenko
@ 2026-01-29 18:37 ` kernel test robot
  2026-01-29 18:49 ` kernel test robot
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2026-01-29 18:37 UTC (permalink / raw)
  To: Andy Shevchenko, dmaengine, linux-kernel; +Cc: oe-kbuild-all, Vinod Koul

Hi Andy,

kernel test robot noticed the following build errors:

[auto build test ERROR on vkoul-dmaengine/next]
[also build test ERROR on linus/master v6.19-rc7 next-20260128]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Andy-Shevchenko/dmaengine-idma64-switch-to-DEFINE_SIMPLE_DEV_PM_OPS/20260129-185309
base:   https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git next
patch link:    https://lore.kernel.org/r/20260129104916.200484-1-andriy.shevchenko%40linux.intel.com
patch subject: [PATCH v1 1/1] dmaengine: idma64: switch to DEFINE_SIMPLE_DEV_PM_OPS()
config: x86_64-rhel-9.4-ltp (https://download.01.org/0day-ci/archive/20260129/202601291924.z6XjqnDH-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260129/202601291924.z6XjqnDH-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202601291924.z6XjqnDH-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

>> drivers/dma/idma64.c:690:68: error: macro "DEFINE_SIMPLE_DEV_PM_OPS" requires 3 arguments, but only 2 given
     690 | static DEFINE_SIMPLE_DEV_PM_OPS(idma64_pm_suspend, idma64_pm_resume);
         |                                                                    ^
   In file included from include/linux/device.h:25,
                    from include/linux/dmaengine.h:8,
                    from drivers/dma/idma64.c:11:
   include/linux/pm.h:416:9: note: macro "DEFINE_SIMPLE_DEV_PM_OPS" defined here
     416 | #define DEFINE_SIMPLE_DEV_PM_OPS(name, suspend_fn, resume_fn) \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/dma/idma64.c:690:8: error: type defaults to 'int' in declaration of 'DEFINE_SIMPLE_DEV_PM_OPS' [-Wimplicit-int]
     690 | static DEFINE_SIMPLE_DEV_PM_OPS(idma64_pm_suspend, idma64_pm_resume);
         |        ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/kernel.h:36,
                    from include/linux/random.h:7,
                    from include/linux/nodemask.h:94,
                    from include/linux/numa.h:6,
                    from include/linux/cpumask.h:15,
                    from include/linux/smp.h:13,
                    from include/linux/lockdep.h:14,
                    from include/linux/spinlock.h:63,
                    from include/linux/sched.h:37,
                    from include/linux/delay.h:13,
                    from drivers/dma/idma64.c:10:
>> drivers/dma/idma64.c:697:41: error: 'idma64_dev_pm_ops' undeclared here (not in a function)
     697 |                 .pm     = pm_sleep_ptr(&idma64_dev_pm_ops),
         |                                         ^~~~~~~~~~~~~~~~~
   include/linux/util_macros.h:136:44: note: in definition of macro 'PTR_IF'
     136 | #define PTR_IF(cond, ptr)       ((cond) ? (ptr) : NULL)
         |                                            ^~~
   drivers/dma/idma64.c:697:27: note: in expansion of macro 'pm_sleep_ptr'
     697 |                 .pm     = pm_sleep_ptr(&idma64_dev_pm_ops),
         |                           ^~~~~~~~~~~~
>> drivers/dma/idma64.c:690:8: warning: 'DEFINE_SIMPLE_DEV_PM_OPS' defined but not used [-Wunused-variable]
     690 | static DEFINE_SIMPLE_DEV_PM_OPS(idma64_pm_suspend, idma64_pm_resume);
         |        ^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/dma/idma64.c:682:12: warning: 'idma64_pm_resume' defined but not used [-Wunused-function]
     682 | static int idma64_pm_resume(struct device *dev)
         |            ^~~~~~~~~~~~~~~~
>> drivers/dma/idma64.c:674:12: warning: 'idma64_pm_suspend' defined but not used [-Wunused-function]
     674 | static int idma64_pm_suspend(struct device *dev)
         |            ^~~~~~~~~~~~~~~~~


vim +/DEFINE_SIMPLE_DEV_PM_OPS +690 drivers/dma/idma64.c

   673	
 > 674	static int idma64_pm_suspend(struct device *dev)
   675	{
   676		struct idma64_chip *chip = dev_get_drvdata(dev);
   677	
   678		idma64_off(chip->idma64);
   679		return 0;
   680	}
   681	
 > 682	static int idma64_pm_resume(struct device *dev)
   683	{
   684		struct idma64_chip *chip = dev_get_drvdata(dev);
   685	
   686		idma64_on(chip->idma64);
   687		return 0;
   688	}
   689	
 > 690	static DEFINE_SIMPLE_DEV_PM_OPS(idma64_pm_suspend, idma64_pm_resume);
   691	
   692	static struct platform_driver idma64_platform_driver = {
   693		.probe		= idma64_platform_probe,
   694		.remove		= idma64_platform_remove,
   695		.driver = {
   696			.name	= LPSS_IDMA64_DRIVER_NAME,
 > 697			.pm	= pm_sleep_ptr(&idma64_dev_pm_ops),
   698		},
   699	};
   700	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

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

* Re: [PATCH v1 1/1] dmaengine: idma64: switch to DEFINE_SIMPLE_DEV_PM_OPS()
  2026-01-29 10:49 [PATCH v1 1/1] dmaengine: idma64: switch to DEFINE_SIMPLE_DEV_PM_OPS() Andy Shevchenko
  2026-01-29 18:37 ` kernel test robot
@ 2026-01-29 18:49 ` kernel test robot
  2026-01-29 19:52 ` kernel test robot
  2026-01-30  5:16 ` Andy Shevchenko
  3 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2026-01-29 18:49 UTC (permalink / raw)
  To: Andy Shevchenko, dmaengine, linux-kernel; +Cc: llvm, oe-kbuild-all, Vinod Koul

Hi Andy,

kernel test robot noticed the following build errors:

[auto build test ERROR on vkoul-dmaengine/next]
[also build test ERROR on linus/master v6.19-rc7 next-20260129]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Andy-Shevchenko/dmaengine-idma64-switch-to-DEFINE_SIMPLE_DEV_PM_OPS/20260129-185309
base:   https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git next
patch link:    https://lore.kernel.org/r/20260129104916.200484-1-andriy.shevchenko%40linux.intel.com
patch subject: [PATCH v1 1/1] dmaengine: idma64: switch to DEFINE_SIMPLE_DEV_PM_OPS()
config: hexagon-randconfig-001-20260129 (https://download.01.org/0day-ci/archive/20260130/202601300212.Cjv94jx1-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 9b8addffa70cee5b2acc5454712d9cf78ce45710)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260130/202601300212.Cjv94jx1-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202601300212.Cjv94jx1-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/dma/idma64.c:690:68: error: too few arguments provided to function-like macro invocation
     690 | static DEFINE_SIMPLE_DEV_PM_OPS(idma64_pm_suspend, idma64_pm_resume);
         |                                                                    ^
   include/linux/pm.h:416:9: note: macro 'DEFINE_SIMPLE_DEV_PM_OPS' defined here
     416 | #define DEFINE_SIMPLE_DEV_PM_OPS(name, suspend_fn, resume_fn) \
         |         ^
>> drivers/dma/idma64.c:690:8: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
     690 | static DEFINE_SIMPLE_DEV_PM_OPS(idma64_pm_suspend, idma64_pm_resume);
         | ~~~~~~ ^
         | int
>> drivers/dma/idma64.c:697:23: error: use of undeclared identifier 'idma64_dev_pm_ops'
     697 |                 .pm     = pm_sleep_ptr(&idma64_dev_pm_ops),
         |                                         ^~~~~~~~~~~~~~~~~
   3 errors generated.


vim +690 drivers/dma/idma64.c

   689	
 > 690	static DEFINE_SIMPLE_DEV_PM_OPS(idma64_pm_suspend, idma64_pm_resume);
   691	
   692	static struct platform_driver idma64_platform_driver = {
   693		.probe		= idma64_platform_probe,
   694		.remove		= idma64_platform_remove,
   695		.driver = {
   696			.name	= LPSS_IDMA64_DRIVER_NAME,
 > 697			.pm	= pm_sleep_ptr(&idma64_dev_pm_ops),
   698		},
   699	};
   700	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

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

* Re: [PATCH v1 1/1] dmaengine: idma64: switch to DEFINE_SIMPLE_DEV_PM_OPS()
  2026-01-29 10:49 [PATCH v1 1/1] dmaengine: idma64: switch to DEFINE_SIMPLE_DEV_PM_OPS() Andy Shevchenko
  2026-01-29 18:37 ` kernel test robot
  2026-01-29 18:49 ` kernel test robot
@ 2026-01-29 19:52 ` kernel test robot
  2026-01-30  5:16 ` Andy Shevchenko
  3 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2026-01-29 19:52 UTC (permalink / raw)
  To: Andy Shevchenko, dmaengine, linux-kernel; +Cc: oe-kbuild-all, Vinod Koul

Hi Andy,

kernel test robot noticed the following build errors:

[auto build test ERROR on vkoul-dmaengine/next]
[also build test ERROR on linus/master v6.19-rc7 next-20260129]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Andy-Shevchenko/dmaengine-idma64-switch-to-DEFINE_SIMPLE_DEV_PM_OPS/20260129-185309
base:   https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git next
patch link:    https://lore.kernel.org/r/20260129104916.200484-1-andriy.shevchenko%40linux.intel.com
patch subject: [PATCH v1 1/1] dmaengine: idma64: switch to DEFINE_SIMPLE_DEV_PM_OPS()
config: x86_64-rhel-9.4 (https://download.01.org/0day-ci/archive/20260130/202601300349.PfvsP7uV-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260130/202601300349.PfvsP7uV-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202601300349.PfvsP7uV-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

>> drivers/dma/idma64.c:690:68: error: macro "DEFINE_SIMPLE_DEV_PM_OPS" requires 3 arguments, but only 2 given
     690 | static DEFINE_SIMPLE_DEV_PM_OPS(idma64_pm_suspend, idma64_pm_resume);
         |                                                                    ^
   In file included from include/linux/device.h:25,
                    from include/linux/dmaengine.h:8,
                    from drivers/dma/idma64.c:11:
   include/linux/pm.h:416:9: note: macro "DEFINE_SIMPLE_DEV_PM_OPS" defined here
     416 | #define DEFINE_SIMPLE_DEV_PM_OPS(name, suspend_fn, resume_fn) \
         |         ^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/dma/idma64.c:690:8: error: type defaults to 'int' in declaration of 'DEFINE_SIMPLE_DEV_PM_OPS' [-Wimplicit-int]
     690 | static DEFINE_SIMPLE_DEV_PM_OPS(idma64_pm_suspend, idma64_pm_resume);
         |        ^~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/kernel.h:36,
                    from include/linux/random.h:7,
                    from include/linux/nodemask.h:94,
                    from include/linux/numa.h:6,
                    from include/linux/cpumask.h:15,
                    from include/linux/smp.h:13,
                    from include/linux/lockdep.h:14,
                    from include/linux/spinlock.h:63,
                    from include/linux/sched.h:37,
                    from include/linux/delay.h:13,
                    from drivers/dma/idma64.c:10:
>> drivers/dma/idma64.c:697:41: error: 'idma64_dev_pm_ops' undeclared here (not in a function)
     697 |                 .pm     = pm_sleep_ptr(&idma64_dev_pm_ops),
         |                                         ^~~~~~~~~~~~~~~~~
   include/linux/util_macros.h:136:44: note: in definition of macro 'PTR_IF'
     136 | #define PTR_IF(cond, ptr)       ((cond) ? (ptr) : NULL)
         |                                            ^~~
   drivers/dma/idma64.c:697:27: note: in expansion of macro 'pm_sleep_ptr'
     697 |                 .pm     = pm_sleep_ptr(&idma64_dev_pm_ops),
         |                           ^~~~~~~~~~~~
>> drivers/dma/idma64.c:690:8: warning: 'DEFINE_SIMPLE_DEV_PM_OPS' defined but not used [-Wunused-variable]
     690 | static DEFINE_SIMPLE_DEV_PM_OPS(idma64_pm_suspend, idma64_pm_resume);
         |        ^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/dma/idma64.c:682:12: warning: 'idma64_pm_resume' defined but not used [-Wunused-function]
     682 | static int idma64_pm_resume(struct device *dev)
         |            ^~~~~~~~~~~~~~~~
>> drivers/dma/idma64.c:674:12: warning: 'idma64_pm_suspend' defined but not used [-Wunused-function]
     674 | static int idma64_pm_suspend(struct device *dev)
         |            ^~~~~~~~~~~~~~~~~


vim +/DEFINE_SIMPLE_DEV_PM_OPS +690 drivers/dma/idma64.c

   673	
 > 674	static int idma64_pm_suspend(struct device *dev)
   675	{
   676		struct idma64_chip *chip = dev_get_drvdata(dev);
   677	
   678		idma64_off(chip->idma64);
   679		return 0;
   680	}
   681	
 > 682	static int idma64_pm_resume(struct device *dev)
   683	{
   684		struct idma64_chip *chip = dev_get_drvdata(dev);
   685	
   686		idma64_on(chip->idma64);
   687		return 0;
   688	}
   689	
 > 690	static DEFINE_SIMPLE_DEV_PM_OPS(idma64_pm_suspend, idma64_pm_resume);
   691	
   692	static struct platform_driver idma64_platform_driver = {
   693		.probe		= idma64_platform_probe,
   694		.remove		= idma64_platform_remove,
   695		.driver = {
   696			.name	= LPSS_IDMA64_DRIVER_NAME,
 > 697			.pm	= pm_sleep_ptr(&idma64_dev_pm_ops),
   698		},
   699	};
   700	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

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

* Re: [PATCH v1 1/1] dmaengine: idma64: switch to DEFINE_SIMPLE_DEV_PM_OPS()
  2026-01-29 10:49 [PATCH v1 1/1] dmaengine: idma64: switch to DEFINE_SIMPLE_DEV_PM_OPS() Andy Shevchenko
                   ` (2 preceding siblings ...)
  2026-01-29 19:52 ` kernel test robot
@ 2026-01-30  5:16 ` Andy Shevchenko
  3 siblings, 0 replies; 5+ messages in thread
From: Andy Shevchenko @ 2026-01-30  5:16 UTC (permalink / raw)
  To: dmaengine, linux-kernel; +Cc: Vinod Koul

On Thu, Jan 29, 2026 at 11:49:16AM +0100, Andy Shevchenko wrote:
> SET_*_PM_OPS() are deprecated, replace it with DEFINE_SIMPLE_DEV_PM_OPS()
> and use pm_sleep_ptr() for setting the driver's PM routines. We can now
> remove the __maybe_unused qualifier in the suspend and resume functions.

Please, ignore this, it was sent without proper testing.

-- 
With Best Regards,
Andy Shevchenko



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

end of thread, other threads:[~2026-01-30  5:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-29 10:49 [PATCH v1 1/1] dmaengine: idma64: switch to DEFINE_SIMPLE_DEV_PM_OPS() Andy Shevchenko
2026-01-29 18:37 ` kernel test robot
2026-01-29 18:49 ` kernel test robot
2026-01-29 19:52 ` kernel test robot
2026-01-30  5:16 ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox