lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202401101401.bi7U74fr-lkp@intel.com>
Date: Wed, 10 Jan 2024 15:06:50 +0800
From: kernel test robot <lkp@...el.com>
To: Philipp Stanner <pstanner@...hat.com>,
	Laurentiu Palcu <laurentiu.palcu@....nxp.com>,
	Lucas Stach <l.stach@...gutronix.de>,
	Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
	Maxime Ripard <mripard@...nel.org>,
	Thomas Zimmermann <tzimmermann@...e.de>,
	David Airlie <airlied@...il.com>, Daniel Vetter <daniel@...ll.ch>,
	Shawn Guo <shawnguo@...nel.org>,
	Sascha Hauer <s.hauer@...gutronix.de>,
	Pengutronix Kernel Team <kernel@...gutronix.de>,
	Fabio Estevam <festevam@...il.com>
Cc: oe-kbuild-all@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org,
	Philipp Stanner <pstanner@...hat.com>,
	NXP Linux Team <linux-imx@....com>, dri-devel@...ts.freedesktop.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] drm/imx/dcss: have all init functions use devres

Hi Philipp,

kernel test robot noticed the following build errors:

[auto build test ERROR on v6.7]
[also build test ERROR on linus/master]
[cannot apply to drm-misc/drm-misc-next next-20240109]
[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/Philipp-Stanner/drm-dcss-request-memory-region/20240109-182239
base:   v6.7
patch link:    https://lore.kernel.org/r/20240109102032.16165-3-pstanner%40redhat.com
patch subject: [PATCH v2 2/2] drm/imx/dcss: have all init functions use devres
config: arm64-defconfig (https://download.01.org/0day-ci/archive/20240110/202401101401.bi7U74fr-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240110/202401101401.bi7U74fr-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202401101401.bi7U74fr-lkp@intel.com/

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

   In file included from include/linux/device.h:17,
                    from include/linux/platform_device.h:13,
                    from drivers/gpu/drm/imx/dcss/dcss-dev.c:9:
   drivers/gpu/drm/imx/dcss/dcss-dev.c: In function 'dcss_dev_create':
   drivers/gpu/drm/imx/dcss/dcss-dev.c:186:42: error: incompatible type for argument 1 of '__devm_request_region'
     186 |         if (!devm_request_mem_region(pdev->dev, res->start, res_len, "dcss")) {
         |                                      ~~~~^~~~~
         |                                          |
         |                                          struct device
   include/linux/ioport.h:306:31: note: in definition of macro 'devm_request_mem_region'
     306 |         __devm_request_region(dev, &iomem_resource, (start), (n), (name))
         |                               ^~~
   include/linux/ioport.h:308:63: note: expected 'struct device *' but argument is of type 'struct device'
     308 | extern struct resource * __devm_request_region(struct device *dev,
         |                                                ~~~~~~~~~~~~~~~^~~
>> drivers/gpu/drm/imx/dcss/dcss-dev.c:202:24: warning: returning 'int' from a function with return type 'struct dcss_dev *' makes pointer from integer without a cast [-Wint-conversion]
     202 |                 return ret;
         |                        ^~~
--
   drivers/gpu/drm/imx/dcss/dcss-scaler.c: In function 'dcss_scaler_ch_init_all':
>> drivers/gpu/drm/imx/dcss/dcss-scaler.c:305:45: error: 'dev' undeclared (first use in this function); did you mean 'cdev'?
     305 |                 ch->base_reg = devm_ioremap(dev, ch->base_ofs, SZ_4K);
         |                                             ^~~
         |                                             cdev
   drivers/gpu/drm/imx/dcss/dcss-scaler.c:305:45: note: each undeclared identifier is reported only once for each function it appears in
   drivers/gpu/drm/imx/dcss/dcss-scaler.c: In function 'dcss_scaler_init':
>> drivers/gpu/drm/imx/dcss/dcss-scaler.c:331:37: error: passing argument 1 of 'dcss_scaler_ch_init_all' from incompatible pointer type [-Werror=incompatible-pointer-types]
     331 |         if (dcss_scaler_ch_init_all(dev, scaler, scaler_base))
         |                                     ^~~
         |                                     |
         |                                     struct device *
   drivers/gpu/drm/imx/dcss/dcss-scaler.c:294:56: note: expected 'struct dcss_scaler *' but argument is of type 'struct device *'
     294 | static int dcss_scaler_ch_init_all(struct dcss_scaler *scl,
         |                                    ~~~~~~~~~~~~~~~~~~~~^~~
>> drivers/gpu/drm/imx/dcss/dcss-scaler.c:331:42: warning: passing argument 2 of 'dcss_scaler_ch_init_all' makes integer from pointer without a cast [-Wint-conversion]
     331 |         if (dcss_scaler_ch_init_all(dev, scaler, scaler_base))
         |                                          ^~~~~~
         |                                          |
         |                                          struct dcss_scaler *
   drivers/gpu/drm/imx/dcss/dcss-scaler.c:295:50: note: expected 'long unsigned int' but argument is of type 'struct dcss_scaler *'
     295 |                                    unsigned long scaler_base)
         |                                    ~~~~~~~~~~~~~~^~~~~~~~~~~
>> drivers/gpu/drm/imx/dcss/dcss-scaler.c:331:13: error: too many arguments to function 'dcss_scaler_ch_init_all'
     331 |         if (dcss_scaler_ch_init_all(dev, scaler, scaler_base))
         |             ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/imx/dcss/dcss-scaler.c:294:12: note: declared here
     294 | static int dcss_scaler_ch_init_all(struct dcss_scaler *scl,
         |            ^~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +305 drivers/gpu/drm/imx/dcss/dcss-scaler.c

   293	
   294	static int dcss_scaler_ch_init_all(struct dcss_scaler *scl,
   295					   unsigned long scaler_base)
   296	{
   297		struct dcss_scaler_ch *ch;
   298		int i;
   299	
   300		for (i = 0; i < 3; i++) {
   301			ch = &scl->ch[i];
   302	
   303			ch->base_ofs = scaler_base + i * 0x400;
   304	
 > 305			ch->base_reg = devm_ioremap(dev, ch->base_ofs, SZ_4K);
   306			if (!ch->base_reg) {
   307				dev_err(scl->dev, "scaler: unable to remap ch base\n");
   308				return -ENOMEM;
   309			}
   310	
   311			ch->scl = scl;
   312		}
   313	
   314		return 0;
   315	}
   316	
   317	int dcss_scaler_init(struct dcss_dev *dcss, unsigned long scaler_base)
   318	{
   319		struct dcss_scaler *scaler;
   320		struct device *dev = dcss->dev;
   321	
   322		scaler = devm_kzalloc(dev, sizeof(*scaler), GFP_KERNEL);
   323		if (!scaler)
   324			return -ENOMEM;
   325	
   326		dcss->scaler = scaler;
   327		scaler->dev = dcss->dev;
   328		scaler->ctxld = dcss->ctxld;
   329		scaler->ctx_id = CTX_SB_HP;
   330	
 > 331		if (dcss_scaler_ch_init_all(dev, scaler, scaler_base))
   332			return -ENOMEM;
   333	
   334		return 0;
   335	}
   336	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ