[PATCH 41/46] panel/widechips-ws2401: Use refcounted allocation in place of devm_kzalloc()

kernel test robot lkp at intel.com
Sat Apr 5 02:01:40 UTC 2025


Hi Anusha,

kernel test robot noticed the following build errors:

[auto build test ERROR on de04bb0089a96cc00d13b12cbf66a088befe3057]

url:    https://github.com/intel-lab-lkp/linux/commits/Anusha-Srivatsa/panel-orisetech-otm8009a-Use-refcounted-allocation-in-place-of-devm_kzalloc/20250404-052751
base:   de04bb0089a96cc00d13b12cbf66a088befe3057
patch link:    https://lore.kernel.org/r/20250403-b4-drm_panel_mass_driver_convert_part3-v1-41-965b15ad5b8e%40redhat.com
patch subject: [PATCH 41/46] panel/widechips-ws2401: Use refcounted allocation in place of devm_kzalloc()
config: x86_64-buildonly-randconfig-001-20250405 (https://download.01.org/0day-ci/archive/20250405/202504050919.KlKBUNDh-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250405/202504050919.KlKBUNDh-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/202504050919.KlKBUNDh-lkp@intel.com/

All errors (new ones prefixed by >>):

   ld: drivers/gpu/drm/panel/panel-widechips-ws2401.o: in function `ws2401_probe':
>> drivers/gpu/drm/panel/panel-widechips-ws2401.c:350: undefined reference to `__devm_drm_panel_alloc'


vim +350 drivers/gpu/drm/panel/panel-widechips-ws2401.c

   343	
   344	static int ws2401_probe(struct spi_device *spi)
   345	{
   346		struct device *dev = &spi->dev;
   347		struct ws2401 *ws;
   348		int ret;
   349	
 > 350		ws = devm_drm_panel_alloc(dev, struct ws2401, panel, &ws2401_drm_funcs,
   351					   DRM_MODE_CONNECTOR_DPI);
   352		if (IS_ERR(ws))
   353			return PTR_ERR(ws);
   354	
   355		ws->dev = dev;
   356	
   357		/*
   358		 * VCI   is the analog voltage supply
   359		 * VCCIO is the digital I/O voltage supply
   360		 */
   361		ws->regulators[0].supply = "vci";
   362		ws->regulators[1].supply = "vccio";
   363		ret = devm_regulator_bulk_get(dev,
   364					      ARRAY_SIZE(ws->regulators),
   365					      ws->regulators);
   366		if (ret)
   367			return dev_err_probe(dev, ret, "failed to get regulators\n");
   368	
   369		ws->reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH);
   370		if (IS_ERR(ws->reset)) {
   371			ret = PTR_ERR(ws->reset);
   372			return dev_err_probe(dev, ret, "no RESET GPIO\n");
   373		}
   374	
   375		ret = mipi_dbi_spi_init(spi, &ws->dbi, NULL);
   376		if (ret)
   377			return dev_err_probe(dev, ret, "MIPI DBI init failed\n");
   378		ws->dbi.read_commands = ws2401_dbi_read_commands;
   379	
   380		ws2401_power_on(ws);
   381		ws2401_read_mtp_id(ws);
   382		ws2401_power_off(ws);
   383	
   384		ret = drm_panel_of_backlight(&ws->panel);
   385		if (ret)
   386			return dev_err_probe(dev, ret,
   387					"failed to get external backlight device\n");
   388	
   389		if (!ws->panel.backlight) {
   390			dev_dbg(dev, "no external backlight, using internal backlight\n");
   391			ws->panel.backlight =
   392				devm_backlight_device_register(dev, "ws2401", dev, ws,
   393					&ws2401_bl_ops, &ws2401_bl_props);
   394			if (IS_ERR(ws->panel.backlight))
   395				return dev_err_probe(dev, PTR_ERR(ws->panel.backlight),
   396					"failed to register backlight device\n");
   397		} else {
   398			dev_dbg(dev, "using external backlight\n");
   399		}
   400	
   401		spi_set_drvdata(spi, ws);
   402	
   403		drm_panel_add(&ws->panel);
   404		dev_dbg(dev, "added panel\n");
   405	
   406		return 0;
   407	}
   408	

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


More information about the dri-devel mailing list