All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: [linux-next:master 3766/4884] drivers/gpu/drm/i915/display/intel_fbdev_fb.c:111 intel_fbdev_fb_fill_info() error: uninitialized symbol 'vaddr'.
Date: Wed, 6 Dec 2023 11:52:23 +0800	[thread overview]
Message-ID: <202312061126.zeFuqvVC-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: "Jouni Högander" <jouni.hogander@intel.com>
CC: Vinod Govindapillai <vinod.govindapillai@intel.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   0f5f12ac05f36f117e793656c3f560625e927f1b
commit: 80d20fd99124800749d605c733911a8d9da78e2b [3766/4884] drm/i915/display: split i915 specific code from intel_fbdev
:::::: branch date: 25 hours ago
:::::: commit date: 5 days ago
config: x86_64-randconfig-161-20231206 (https://download.01.org/0day-ci/archive/20231206/202312061126.zeFuqvVC-lkp@intel.com/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce: (https://download.01.org/0day-ci/archive/20231206/202312061126.zeFuqvVC-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>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202312061126.zeFuqvVC-lkp@intel.com/

New smatch warnings:
drivers/gpu/drm/i915/display/intel_fbdev_fb.c:111 intel_fbdev_fb_fill_info() error: uninitialized symbol 'vaddr'.

Old smatch warnings:
drivers/gpu/drm/i915/gem/i915_gem_object.h:183 __i915_gem_object_lock() error: we previously assumed 'ww' could be null (see line 172)

vim +/vaddr +111 drivers/gpu/drm/i915/display/intel_fbdev_fb.c

80d20fd9912480 Jouni Högander 2023-11-15   68  
80d20fd9912480 Jouni Högander 2023-11-15   69  int intel_fbdev_fb_fill_info(struct drm_i915_private *i915, struct fb_info *info,
80d20fd9912480 Jouni Högander 2023-11-15   70  			     struct drm_i915_gem_object *obj, struct i915_vma *vma)
80d20fd9912480 Jouni Högander 2023-11-15   71  {
80d20fd9912480 Jouni Högander 2023-11-15   72  	struct i915_gem_ww_ctx ww;
80d20fd9912480 Jouni Högander 2023-11-15   73  	void __iomem *vaddr;
80d20fd9912480 Jouni Högander 2023-11-15   74  	int ret;
80d20fd9912480 Jouni Högander 2023-11-15   75  
80d20fd9912480 Jouni Högander 2023-11-15   76  	if (i915_gem_object_is_lmem(obj)) {
80d20fd9912480 Jouni Högander 2023-11-15   77  		struct intel_memory_region *mem = obj->mm.region;
80d20fd9912480 Jouni Högander 2023-11-15   78  
80d20fd9912480 Jouni Högander 2023-11-15   79  		/* Use fbdev's framebuffer from lmem for discrete */
80d20fd9912480 Jouni Högander 2023-11-15   80  		info->fix.smem_start =
80d20fd9912480 Jouni Högander 2023-11-15   81  			(unsigned long)(mem->io_start +
80d20fd9912480 Jouni Högander 2023-11-15   82  					i915_gem_object_get_dma_address(obj, 0));
80d20fd9912480 Jouni Högander 2023-11-15   83  		info->fix.smem_len = obj->base.size;
80d20fd9912480 Jouni Högander 2023-11-15   84  	} else {
80d20fd9912480 Jouni Högander 2023-11-15   85  		struct i915_ggtt *ggtt = to_gt(i915)->ggtt;
80d20fd9912480 Jouni Högander 2023-11-15   86  
80d20fd9912480 Jouni Högander 2023-11-15   87  		/* Our framebuffer is the entirety of fbdev's system memory */
80d20fd9912480 Jouni Högander 2023-11-15   88  		info->fix.smem_start =
80d20fd9912480 Jouni Högander 2023-11-15   89  			(unsigned long)(ggtt->gmadr.start + i915_ggtt_offset(vma));
80d20fd9912480 Jouni Högander 2023-11-15   90  		info->fix.smem_len = vma->size;
80d20fd9912480 Jouni Högander 2023-11-15   91  	}
80d20fd9912480 Jouni Högander 2023-11-15   92  
80d20fd9912480 Jouni Högander 2023-11-15   93  	for_i915_gem_ww(&ww, ret, false) {
80d20fd9912480 Jouni Högander 2023-11-15   94  		ret = i915_gem_object_lock(vma->obj, &ww);
80d20fd9912480 Jouni Högander 2023-11-15   95  
80d20fd9912480 Jouni Högander 2023-11-15   96  		if (ret)
80d20fd9912480 Jouni Högander 2023-11-15   97  			continue;
80d20fd9912480 Jouni Högander 2023-11-15   98  
80d20fd9912480 Jouni Högander 2023-11-15   99  		vaddr = i915_vma_pin_iomap(vma);
80d20fd9912480 Jouni Högander 2023-11-15  100  		if (IS_ERR(vaddr)) {
80d20fd9912480 Jouni Högander 2023-11-15  101  			drm_err(&i915->drm,
80d20fd9912480 Jouni Högander 2023-11-15  102  				"Failed to remap framebuffer into virtual memory (%pe)\n", vaddr);
80d20fd9912480 Jouni Högander 2023-11-15  103  			ret = PTR_ERR(vaddr);
80d20fd9912480 Jouni Högander 2023-11-15  104  			continue;
80d20fd9912480 Jouni Högander 2023-11-15  105  		}
80d20fd9912480 Jouni Högander 2023-11-15  106  	}
80d20fd9912480 Jouni Högander 2023-11-15  107  
80d20fd9912480 Jouni Högander 2023-11-15  108  	if (ret)
80d20fd9912480 Jouni Högander 2023-11-15  109  		return ret;
80d20fd9912480 Jouni Högander 2023-11-15  110  
80d20fd9912480 Jouni Högander 2023-11-15 @111  	info->screen_base = vaddr;

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

                 reply	other threads:[~2023-12-06  3:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202312061126.zeFuqvVC-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=error27@gmail.com \
    --cc=oe-kbuild@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.