Re: [PATCH 4/4] drm/crtc: add drmm_crtc_alloc_with_planes()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Philipp,

https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Philipp-Zabel/drm-add-drmm_encoder_alloc/20200826-203629
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-randconfig-m001-20200826 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

smatch warnings:
drivers/gpu/drm/drm_crtc.c:343 drm_crtc_init_with_planes() error: uninitialized symbol 'ap'.
drivers/gpu/drm/drm_crtc.c:383 __drmm_crtc_alloc_with_planes() error: uninitialized symbol 'ap'.

# https://github.com/0day-ci/linux/commit/236b7bc44ae0fdecc8e80c5aba0655ca14fdfb23
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Philipp-Zabel/drm-add-drmm_encoder_alloc/20200826-203629
git checkout 236b7bc44ae0fdecc8e80c5aba0655ca14fdfb23
vim +/ap +343 drivers/gpu/drm/drm_crtc.c

236b7bc44ae0fd Philipp Zabel 2020-08-26  331  int drm_crtc_init_with_planes(struct drm_device *dev, struct drm_crtc *crtc,
236b7bc44ae0fd Philipp Zabel 2020-08-26  332  			      struct drm_plane *primary,
236b7bc44ae0fd Philipp Zabel 2020-08-26  333  			      struct drm_plane *cursor,
236b7bc44ae0fd Philipp Zabel 2020-08-26  334  			      const struct drm_crtc_funcs *funcs,
236b7bc44ae0fd Philipp Zabel 2020-08-26  335  			      const char *name, ...)
236b7bc44ae0fd Philipp Zabel 2020-08-26  336  {
236b7bc44ae0fd Philipp Zabel 2020-08-26  337  	va_list ap;
236b7bc44ae0fd Philipp Zabel 2020-08-26  338  	int ret;
236b7bc44ae0fd Philipp Zabel 2020-08-26  339  
236b7bc44ae0fd Philipp Zabel 2020-08-26  340  	if (name)
236b7bc44ae0fd Philipp Zabel 2020-08-26  341  		va_start(ap, name);
236b7bc44ae0fd Philipp Zabel 2020-08-26  342  	ret = drm_crtc_init_with_planes(dev, crtc, primary, cursor, funcs,
236b7bc44ae0fd Philipp Zabel 2020-08-26 @343  					name, ap);
                                                                                      ^^

236b7bc44ae0fd Philipp Zabel 2020-08-26  344  	if (name)
236b7bc44ae0fd Philipp Zabel 2020-08-26  345  		va_end(ap);
236b7bc44ae0fd Philipp Zabel 2020-08-26  346  
236b7bc44ae0fd Philipp Zabel 2020-08-26  347  	return ret;
236b7bc44ae0fd Philipp Zabel 2020-08-26  348  }
e13161af80c185 Matt Roper    2014-04-01  349  EXPORT_SYMBOL(drm_crtc_init_with_planes);
f453ba0460742a Dave Airlie   2008-11-07  350  
236b7bc44ae0fd Philipp Zabel 2020-08-26  351  static void drmm_crtc_alloc_with_planes_cleanup(struct drm_device *dev,
236b7bc44ae0fd Philipp Zabel 2020-08-26  352  						void *ptr)
236b7bc44ae0fd Philipp Zabel 2020-08-26  353  {
236b7bc44ae0fd Philipp Zabel 2020-08-26  354  	struct drm_crtc *crtc = ptr;
236b7bc44ae0fd Philipp Zabel 2020-08-26  355  
236b7bc44ae0fd Philipp Zabel 2020-08-26  356  	drm_crtc_cleanup(crtc);
236b7bc44ae0fd Philipp Zabel 2020-08-26  357  }
236b7bc44ae0fd Philipp Zabel 2020-08-26  358  
236b7bc44ae0fd Philipp Zabel 2020-08-26  359  void *__drmm_crtc_alloc_with_planes(struct drm_device *dev,
236b7bc44ae0fd Philipp Zabel 2020-08-26  360  				    size_t size, size_t offset,
236b7bc44ae0fd Philipp Zabel 2020-08-26  361  				    struct drm_plane *primary,
236b7bc44ae0fd Philipp Zabel 2020-08-26  362  				    struct drm_plane *cursor,
236b7bc44ae0fd Philipp Zabel 2020-08-26  363  				    const struct drm_crtc_funcs *funcs,
236b7bc44ae0fd Philipp Zabel 2020-08-26  364  				    const char *name, ...)
236b7bc44ae0fd Philipp Zabel 2020-08-26  365  {
236b7bc44ae0fd Philipp Zabel 2020-08-26  366  	void *container;
236b7bc44ae0fd Philipp Zabel 2020-08-26  367  	struct drm_crtc *crtc;
236b7bc44ae0fd Philipp Zabel 2020-08-26  368  	va_list ap;
236b7bc44ae0fd Philipp Zabel 2020-08-26  369  	int ret;
236b7bc44ae0fd Philipp Zabel 2020-08-26  370  
236b7bc44ae0fd Philipp Zabel 2020-08-26  371  	if (!funcs || funcs->destroy)
236b7bc44ae0fd Philipp Zabel 2020-08-26  372  		return ERR_PTR(-EINVAL);
236b7bc44ae0fd Philipp Zabel 2020-08-26  373  
236b7bc44ae0fd Philipp Zabel 2020-08-26  374  	container = drmm_kzalloc(dev, size, GFP_KERNEL);
236b7bc44ae0fd Philipp Zabel 2020-08-26  375  	if (!container)
236b7bc44ae0fd Philipp Zabel 2020-08-26  376  		return ERR_PTR(-ENOMEM);
236b7bc44ae0fd Philipp Zabel 2020-08-26  377  
236b7bc44ae0fd Philipp Zabel 2020-08-26  378  	crtc = container + offset;
236b7bc44ae0fd Philipp Zabel 2020-08-26  379  
236b7bc44ae0fd Philipp Zabel 2020-08-26  380  	if (name)
236b7bc44ae0fd Philipp Zabel 2020-08-26  381  		va_start(ap, name);
236b7bc44ae0fd Philipp Zabel 2020-08-26  382  	ret = __drm_crtc_init_with_planes(dev, crtc, primary, cursor, funcs,
236b7bc44ae0fd Philipp Zabel 2020-08-26 @383  					  name, ap);
236b7bc44ae0fd Philipp Zabel 2020-08-26  384  	if (name)
236b7bc44ae0fd Philipp Zabel 2020-08-26  385  		va_end(ap);
236b7bc44ae0fd Philipp Zabel 2020-08-26  386  	if (ret)
236b7bc44ae0fd Philipp Zabel 2020-08-26  387  		return ERR_PTR(ret);
236b7bc44ae0fd Philipp Zabel 2020-08-26  388  
236b7bc44ae0fd Philipp Zabel 2020-08-26  389  	ret = drmm_add_action_or_reset(dev, drmm_crtc_alloc_with_planes_cleanup,
236b7bc44ae0fd Philipp Zabel 2020-08-26  390  				       crtc);
236b7bc44ae0fd Philipp Zabel 2020-08-26  391  	if (ret)
236b7bc44ae0fd Philipp Zabel 2020-08-26  392  		return ERR_PTR(ret);
236b7bc44ae0fd Philipp Zabel 2020-08-26  393  
236b7bc44ae0fd Philipp Zabel 2020-08-26  394  	return container;
236b7bc44ae0fd Philipp Zabel 2020-08-26  395  }

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux