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: <202511230240.NYBAiUV4-lkp@intel.com>
Date: Sun, 23 Nov 2025 02:40:35 +0800
From: kernel test robot <lkp@...el.com>
To: Ludovic Desroches <ludovic.desroches@...rochip.com>,
	Manikandan Muralidharan <manikandan.m@...rochip.com>,
	Dharma Balasubiramani <dharma.b@...rochip.com>,
	Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
	Maxime Ripard <mripard@...nel.org>,
	Thomas Zimmermann <tzimmermann@...e.de>,
	David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
	Nicolas Ferre <nicolas.ferre@...rochip.com>,
	Alexandre Belloni <alexandre.belloni@...tlin.com>,
	Claudiu Beznea <claudiu.beznea@...on.dev>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
	dri-devel@...ts.freedesktop.org,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	Ludovic Desroches <ludovic.desroches@...rochip.com>
Subject: Re: [PATCH 5/8] drm/atmel-hlcdc: use devm_drm_of_get_bridge()

Hi Ludovic,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 88cbd8ac379cf5ce68b7efcfd4d1484a6871ee0b]

url:    https://github.com/intel-lab-lkp/linux/commits/Ludovic-Desroches/drm-atmel-hlcdc-use-managed-device-resources-for-the-display-controller/20251121-231107
base:   88cbd8ac379cf5ce68b7efcfd4d1484a6871ee0b
patch link:    https://lore.kernel.org/r/20251121-lcd_cleanup_mainline-v1-5-2587e6fe4d67%40microchip.com
patch subject: [PATCH 5/8] drm/atmel-hlcdc: use devm_drm_of_get_bridge()
config: arm-randconfig-001-20251123 (https://download.01.org/0day-ci/archive/20251123/202511230240.NYBAiUV4-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 9e9fe08b16ea2c4d9867fb4974edf2a3776d6ece)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251123/202511230240.NYBAiUV4-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/202511230240.NYBAiUV4-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c:100:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
     100 |         if (bridge) {
         |             ^~~~~~
   drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c:106:9: note: uninitialized use occurs here
     106 |         return ret;
         |                ^~~
   drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c:100:2: note: remove the 'if' if its condition is always true
     100 |         if (bridge) {
         |         ^~~~~~~~~~~
   drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c:75:9: note: initialize the variable 'ret' to silence this warning
      75 |         int ret;
         |                ^
         |                 = 0
   1 warning generated.


vim +100 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c

b6e075c3cb6e57d Peter Rosin       2018-08-25   67  
6bee9b78a7a5ea2 Boris Brezillon   2017-05-18   68  static int atmel_hlcdc_attach_endpoint(struct drm_device *dev, int endpoint)
17a8e03e7e97d34 Boris Brezillon   2016-01-06   69  {
b6e075c3cb6e57d Peter Rosin       2018-08-25   70  	struct atmel_hlcdc_rgb_output *output;
b6e075c3cb6e57d Peter Rosin       2018-08-25   71  	struct device_node *ep;
17a8e03e7e97d34 Boris Brezillon   2016-01-06   72  	struct drm_bridge *bridge;
ec29c94011469e7 Ludovic Desroches 2025-11-21   73  	struct atmel_hlcdc_dc *dc = dev->dev_private;
ec29c94011469e7 Ludovic Desroches 2025-11-21   74  	struct drm_crtc *crtc = dc->crtc;
17a8e03e7e97d34 Boris Brezillon   2016-01-06   75  	int ret;
1a396789f65a227 Boris Brezillon   2015-01-06   76  
524bfe4ade6dbed Ludovic Desroches 2025-11-21   77  	bridge = devm_drm_of_get_bridge(dev->dev, dev->dev->of_node, 0, endpoint);
524bfe4ade6dbed Ludovic Desroches 2025-11-21   78  	if (IS_ERR(bridge))
524bfe4ade6dbed Ludovic Desroches 2025-11-21   79  		return PTR_ERR(bridge);
6bee9b78a7a5ea2 Boris Brezillon   2017-05-18   80  
e38758ed5aece5d Ludovic Desroches 2025-11-21   81  	output = drmm_simple_encoder_alloc(dev, struct atmel_hlcdc_rgb_output,
e38758ed5aece5d Ludovic Desroches 2025-11-21   82  					   encoder, DRM_MODE_ENCODER_NONE);
e38758ed5aece5d Ludovic Desroches 2025-11-21   83  	if (IS_ERR(output))
e38758ed5aece5d Ludovic Desroches 2025-11-21   84  		return PTR_ERR(output);
e38758ed5aece5d Ludovic Desroches 2025-11-21   85  
e38758ed5aece5d Ludovic Desroches 2025-11-21   86  	ep = of_graph_get_endpoint_by_regs(dev->dev->of_node, 0, endpoint);
e38758ed5aece5d Ludovic Desroches 2025-11-21   87  	if (!ep)
e38758ed5aece5d Ludovic Desroches 2025-11-21   88  		return -ENODEV;
b6e075c3cb6e57d Peter Rosin       2018-08-25   89  
b6e075c3cb6e57d Peter Rosin       2018-08-25   90  	output->bus_fmt = atmel_hlcdc_of_bus_fmt(ep);
b6e075c3cb6e57d Peter Rosin       2018-08-25   91  	of_node_put(ep);
b6e075c3cb6e57d Peter Rosin       2018-08-25   92  	if (output->bus_fmt < 0) {
3379655524e613e Eslam Khafagy     2025-08-14   93  		drm_err(dev, "endpoint %d: invalid bus width\n", endpoint);
17a8e03e7e97d34 Boris Brezillon   2016-01-06   94  		return -EINVAL;
b6e075c3cb6e57d Peter Rosin       2018-08-25   95  	}
1a396789f65a227 Boris Brezillon   2015-01-06   96  
1a396789f65a227 Boris Brezillon   2015-01-06   97  
ec29c94011469e7 Ludovic Desroches 2025-11-21   98  	output->encoder.possible_crtcs = drm_crtc_mask(crtc);
17a8e03e7e97d34 Boris Brezillon   2016-01-06   99  
17a8e03e7e97d34 Boris Brezillon   2016-01-06 @100  	if (bridge) {
a25b988ff83f3ca Laurent Pinchart  2020-02-26  101  		ret = drm_bridge_attach(&output->encoder, bridge, NULL, 0);
17a8e03e7e97d34 Boris Brezillon   2016-01-06  102  		if (!ret)
17a8e03e7e97d34 Boris Brezillon   2016-01-06  103  			return 0;
17a8e03e7e97d34 Boris Brezillon   2016-01-06  104  	}
1a396789f65a227 Boris Brezillon   2015-01-06  105  
1a396789f65a227 Boris Brezillon   2015-01-06  106  	return ret;
1a396789f65a227 Boris Brezillon   2015-01-06  107  }
1a396789f65a227 Boris Brezillon   2015-01-06  108  

-- 
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