llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Ludovic Desroches <ludovic.desroches@microchip.com>,
	Manikandan Muralidharan <manikandan.m@microchip.com>,
	Dharma Balasubiramani <dharma.b@microchip.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	Nicolas Ferre <nicolas.ferre@microchip.com>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Claudiu Beznea <claudiu.beznea@tuxon.dev>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	dri-devel@lists.freedesktop.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Ludovic Desroches <ludovic.desroches@microchip.com>
Subject: Re: [PATCH 5/8] drm/atmel-hlcdc: use devm_drm_of_get_bridge()
Date: Sun, 23 Nov 2025 02:40:35 +0800	[thread overview]
Message-ID: <202511230240.NYBAiUV4-lkp@intel.com> (raw)
In-Reply-To: <20251121-lcd_cleanup_mainline-v1-5-2587e6fe4d67@microchip.com>

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@intel.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

           reply	other threads:[~2025-11-22 18:41 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20251121-lcd_cleanup_mainline-v1-5-2587e6fe4d67@microchip.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202511230240.NYBAiUV4-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=airlied@gmail.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=claudiu.beznea@tuxon.dev \
    --cc=dharma.b@microchip.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=ludovic.desroches@microchip.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=manikandan.m@microchip.com \
    --cc=mripard@kernel.org \
    --cc=nicolas.ferre@microchip.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).