dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org, Philipp Zabel <p.zabel@pengutronix.de>,
	dri-devel@lists.freedesktop.org
Cc: Thomas Zimmermann <tzimmermann@suse.de>,
	kbuild-all@lists.01.org, lkp@intel.com, kernel@pengutronix.de
Subject: Re: [PATCH 4/4] drm/crtc: add drmm_crtc_alloc_with_planes()
Date: Mon, 31 Aug 2020 12:39:53 +0300	[thread overview]
Message-ID: <20200831093953.GB8299@kadam> (raw)
In-Reply-To: <20200826123506.19560-4-p.zabel@pengutronix.de>

[-- Attachment #1: Type: text/plain, Size: 5645 bytes --]

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@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

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@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 40635 bytes --]

[-- Attachment #3: Type: text/plain, Size: 160 bytes --]

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

      parent reply	other threads:[~2020-08-31  9:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-26 12:35 [PATCH 1/4] drm: add drmm_encoder_alloc() Philipp Zabel
2020-08-26 12:35 ` [PATCH 2/4] drm/simple_kms_helper: add drmm_simple_encoder_alloc() Philipp Zabel
2020-08-26 12:35 ` [PATCH 3/4] drm/plane: add drmm_universal_plane_alloc() Philipp Zabel
2020-08-26 15:26   ` kernel test robot
2020-08-26 15:26   ` [RFC PATCH] drm/plane: __drm_universal_plane_init() can be static kernel test robot
2020-08-26 16:58   ` [PATCH 3/4] drm/plane: add drmm_universal_plane_alloc() kernel test robot
2020-08-26 19:47   ` kernel test robot
2020-08-31  9:37   ` Dan Carpenter
2020-08-26 12:35 ` [PATCH 4/4] drm/crtc: add drmm_crtc_alloc_with_planes() Philipp Zabel
2020-08-26 18:04   ` kernel test robot
2020-08-26 21:29   ` kernel test robot
2020-08-27  7:32   ` [drm/crtc] 236b7bc44a: BUG:stack_guard_page_was_hit_at(____ptrval____)(stack_is(____ptrval____)..(____ptrval____)) kernel test robot
2020-08-31  9:39   ` Dan Carpenter [this message]

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=20200831093953.GB8299@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kbuild-all@lists.01.org \
    --cc=kbuild@lists.01.org \
    --cc=kernel@pengutronix.de \
    --cc=lkp@intel.com \
    --cc=p.zabel@pengutronix.de \
    --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