[PATCH] drm/simpledrm: Add support for multiple "power-domains"

kernel test robot lkp at intel.com
Tue Sep 12 14:33:38 UTC 2023


Hi Janne,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 15d30b46573d75f5cb58cfacded8ebab9c76a2b0]

url:    https://github.com/intel-lab-lkp/linux/commits/Janne-Grunau-via-B4-Relay/drm-simpledrm-Add-support-for-multiple-power-domains/20230911-004026
base:   15d30b46573d75f5cb58cfacded8ebab9c76a2b0
patch link:    https://lore.kernel.org/r/20230910-simpledrm-multiple-power-domains-v1-1-f8718aefc685%40jannau.net
patch subject: [PATCH] drm/simpledrm: Add support for multiple "power-domains"
config: arm64-randconfig-r003-20230912 (https://download.01.org/0day-ci/archive/20230912/202309122212.MetCn4UK-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230912/202309122212.MetCn4UK-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 at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202309122212.MetCn4UK-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/tiny/simpledrm.c:506:24: warning: flag ' ' results in undefined behavior with 'p' conversion specifier [-Wformat]
     506 |         drm_err(&sdev->dev, "% power-domains count:%d\n", __func__, sdev->pwr_dom_count);
         |                              ~^~
   include/drm/drm_print.h:469:39: note: expanded from macro 'drm_err'
     469 |         __drm_printk((drm), err,, "*ERROR* " fmt, ##__VA_ARGS__)
         |                                              ^~~
   include/drm/drm_print.h:456:41: note: expanded from macro '__drm_printk'
     456 |         dev_##level##type((drm)->dev, "[drm] " fmt, ##__VA_ARGS__)
         |                                                ^~~
   include/linux/dev_printk.h:144:57: note: expanded from macro 'dev_err'
     144 |         dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
         |                                                                ^~~
   include/linux/dev_printk.h:19:22: note: expanded from macro 'dev_fmt'
      19 | #define dev_fmt(fmt) fmt
         |                      ^~~
   include/linux/dev_printk.h:110:16: note: expanded from macro 'dev_printk_index_wrap'
     110 |                 _p_func(dev, fmt, ##__VA_ARGS__);                       \
         |                              ^~~
   1 warning generated.


vim +506 drivers/gpu/drm/tiny/simpledrm.c

   477	
   478	#if defined CONFIG_OF && defined CONFIG_PM_GENERIC_DOMAINS
   479	/*
   480	 * Generic power domain handling code.
   481	 *
   482	 * Here we handle the power-domains properties of our "simple-framebuffer"
   483	 * dt node. This is only necessary if there is more than one power-domain.
   484	 * A single power-domains is handled automatically by the driver core. Multiple
   485	 * power-domains have to be handled by drivers since the driver core can't know
   486	 * the correct power sequencing. Power sequencing is not an issue for simpledrm
   487	 * since the bootloader has put the power domains already in the correct state.
   488	 * simpledrm has only to ensure they remain active for its lifetime.
   489	 *
   490	 * When the driver unloads, we detach from the power-domains.
   491	 *
   492	 * We only complain about errors here, no action is taken as the most likely
   493	 * error can only happen due to a mismatch between the bootloader which set
   494	 * up the "simple-framebuffer" dt node, and the PM domain providers in the
   495	 * device tree. Chances are that there are no adverse effects, and if there are,
   496	 * a clean teardown of the fb probe will not help us much either. So just
   497	 * complain and carry on, and hope that the user actually gets a working fb at
   498	 * the end of things.
   499	 */
   500	static void simpledrm_device_detach_genpd(void *res)
   501	{
   502		int i;
   503		struct simpledrm_device *sdev = /*(struct simpledrm_device *)*/res;
   504	
   505	
 > 506		drm_err(&sdev->dev, "% power-domains count:%d\n", __func__, sdev->pwr_dom_count);
   507		if (sdev->pwr_dom_count <= 1)
   508			return;
   509	
   510		for (i = sdev->pwr_dom_count - 1; i >= 0; i--) {
   511			if (!sdev->pwr_dom_links[i])
   512				device_link_del(sdev->pwr_dom_links[i]);
   513			if (!IS_ERR_OR_NULL(sdev->pwr_dom_devs[i]))
   514				dev_pm_domain_detach(sdev->pwr_dom_devs[i], true);
   515		}
   516	}
   517	

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


More information about the dri-devel mailing list