Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AE5659468 for ; Tue, 7 Nov 2023 00:31:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="kwv1fcqx" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1699317073; x=1730853073; h=date:from:to:cc:subject:message-id:mime-version; bh=Zcv9x05maCf/CYujdKZkcx+fm0HV+G2rDoHfMisTmlU=; b=kwv1fcqxqGm2mQQ0jZuJVFd+fOQom7MXSQArPt269RWEjnCaWCYgLXbD ygNBQz5ZAhQtJECsET55wD0wubSRgtJOcX4O1bIT9s27UUi0gnWXCeFae mJiJ7XRVNpLVrZZBCQav5P1hJO86dPKxUm616MSyY+QheeZame6ZbkFpb AfyG/dt1Z7jxiz9POQR0mzheEyWC1eFI7LQdNClHRYJff7iMCo81schP5 lmQuvpdn3gVYfP1pn4hXm1BjcY4pBkmx7lfoouRwl2MBHaMd8+JiBM0bN Gr7Vqfn8131u7D9zHutZ3AiBF06J1lq1qRP4naVW/5RDl775rk14DXEln A==; X-IronPort-AV: E=McAfee;i="6600,9927,10886"; a="374426341" X-IronPort-AV: E=Sophos;i="6.03,282,1694761200"; d="scan'208";a="374426341" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Nov 2023 16:31:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10886"; a="906227419" X-IronPort-AV: E=Sophos;i="6.03,282,1694761200"; d="scan'208";a="906227419" Received: from lkp-server01.sh.intel.com (HELO 17d9e85e5079) ([10.239.97.150]) by fmsmga001.fm.intel.com with ESMTP; 06 Nov 2023 16:31:11 -0800 Received: from kbuild by 17d9e85e5079 with local (Exim 4.96) (envelope-from ) id 1r09zp-0006qV-1o; Tue, 07 Nov 2023 00:31:09 +0000 Date: Tue, 7 Nov 2023 08:30:15 +0800 From: kernel test robot To: oe-kbuild@lists.linux.dev Cc: lkp@intel.com, Dan Carpenter Subject: drivers/video/fbdev/hyperv_fb.c:1077 hvfb_getmem() error: uninitialized symbol 'base'. Message-ID: <202311070802.YCpvehaz-lkp@intel.com> Precedence: bulk X-Mailing-List: oe-kbuild@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline BCC: lkp@intel.com CC: oe-kbuild-all@lists.linux.dev CC: linux-kernel@vger.kernel.org TO: Arnd Bergmann CC: "Greg Kroah-Hartman" CC: Javier Martinez Canillas tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: d2f51b3516dade79269ff45eae2a7668ae711b25 commit: a07b50d80ab621f4f18d429068a43cffec26691f hyperv: avoid dependency on screen_info date: 3 weeks ago :::::: branch date: 21 hours ago :::::: commit date: 3 weeks ago config: x86_64-randconfig-161-20231106 (https://download.01.org/0day-ci/archive/20231107/202311070802.YCpvehaz-lkp@intel.com/config) compiler: gcc-11 (Debian 11.3.0-12) 11.3.0 reproduce: (https://download.01.org/0day-ci/archive/20231107/202311070802.YCpvehaz-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 | Reported-by: Dan Carpenter | Closes: https://lore.kernel.org/r/202311070802.YCpvehaz-lkp@intel.com/ smatch warnings: drivers/video/fbdev/hyperv_fb.c:1077 hvfb_getmem() error: uninitialized symbol 'base'. drivers/video/fbdev/hyperv_fb.c:1077 hvfb_getmem() error: uninitialized symbol 'size'. vim +/base +1077 drivers/video/fbdev/hyperv_fb.c 3a6fb6c4255c38 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-12-09 989 68a2d20b79b105 drivers/video/hyperv_fb.c Haiyang Zhang 2013-04-29 990 68a2d20b79b105 drivers/video/hyperv_fb.c Haiyang Zhang 2013-04-29 991 /* Get framebuffer memory from Hyper-V video pci space */ 3546448338e76a drivers/video/fbdev/hyperv_fb.c Jake Oshins 2015-08-05 992 static int hvfb_getmem(struct hv_device *hdev, struct fb_info *info) 68a2d20b79b105 drivers/video/hyperv_fb.c Haiyang Zhang 2013-04-29 993 { 9069fd54960304 drivers/video/hyperv_fb.c Gerd Hoffmann 2014-02-26 994 struct hvfb_par *par = info->par; 9069fd54960304 drivers/video/hyperv_fb.c Gerd Hoffmann 2014-02-26 995 struct pci_dev *pdev = NULL; 68a2d20b79b105 drivers/video/hyperv_fb.c Haiyang Zhang 2013-04-29 996 void __iomem *fb_virt; 9069fd54960304 drivers/video/hyperv_fb.c Gerd Hoffmann 2014-02-26 997 int gen2vm = efi_enabled(EFI_BOOT); 81d2393485f099 drivers/video/fbdev/hyperv_fb.c Thomas Zimmermann 2022-12-19 998 resource_size_t base, size; 3a6fb6c4255c38 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-12-09 999 phys_addr_t paddr; 9069fd54960304 drivers/video/hyperv_fb.c Gerd Hoffmann 2014-02-26 1000 int ret; 68a2d20b79b105 drivers/video/hyperv_fb.c Haiyang Zhang 2013-04-29 1001 3a6fb6c4255c38 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-12-09 1002 if (!gen2vm) { 68a2d20b79b105 drivers/video/hyperv_fb.c Haiyang Zhang 2013-04-29 1003 pdev = pci_get_device(PCI_VENDOR_ID_MICROSOFT, 68a2d20b79b105 drivers/video/hyperv_fb.c Haiyang Zhang 2013-04-29 1004 PCI_DEVICE_ID_HYPERV_VIDEO, NULL); 68a2d20b79b105 drivers/video/hyperv_fb.c Haiyang Zhang 2013-04-29 1005 if (!pdev) { 68a2d20b79b105 drivers/video/hyperv_fb.c Haiyang Zhang 2013-04-29 1006 pr_err("Unable to find PCI Hyper-V video\n"); 68a2d20b79b105 drivers/video/hyperv_fb.c Haiyang Zhang 2013-04-29 1007 return -ENODEV; 68a2d20b79b105 drivers/video/hyperv_fb.c Haiyang Zhang 2013-04-29 1008 } 68a2d20b79b105 drivers/video/hyperv_fb.c Haiyang Zhang 2013-04-29 1009 81d2393485f099 drivers/video/fbdev/hyperv_fb.c Thomas Zimmermann 2022-12-19 1010 base = pci_resource_start(pdev, 0); 81d2393485f099 drivers/video/fbdev/hyperv_fb.c Thomas Zimmermann 2022-12-19 1011 size = pci_resource_len(pdev, 0); 3a6fb6c4255c38 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-12-09 1012 3a6fb6c4255c38 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-12-09 1013 /* 3a6fb6c4255c38 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-12-09 1014 * For Gen 1 VM, we can directly use the contiguous memory 3a6fb6c4255c38 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-12-09 1015 * from VM. If we succeed, deferred IO happens directly 3a6fb6c4255c38 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-12-09 1016 * on this allocated framebuffer memory, avoiding extra 3a6fb6c4255c38 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-12-09 1017 * memory copy. 3a6fb6c4255c38 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-12-09 1018 */ 3a6fb6c4255c38 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-12-09 1019 paddr = hvfb_get_phymem(hdev, screen_fb_size); 3a6fb6c4255c38 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-12-09 1020 if (paddr != (phys_addr_t) -1) { 3a6fb6c4255c38 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-12-09 1021 par->mmio_pp = paddr; 3a6fb6c4255c38 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-12-09 1022 par->mmio_vp = par->dio_vp = __va(paddr); 3a6fb6c4255c38 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-12-09 1023 3a6fb6c4255c38 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-12-09 1024 info->fix.smem_start = paddr; 3a6fb6c4255c38 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-12-09 1025 info->fix.smem_len = screen_fb_size; 3a6fb6c4255c38 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-12-09 1026 info->screen_base = par->mmio_vp; 3a6fb6c4255c38 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-12-09 1027 info->screen_size = screen_fb_size; 3a6fb6c4255c38 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-12-09 1028 3a6fb6c4255c38 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-12-09 1029 par->need_docopy = false; 3a6fb6c4255c38 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-12-09 1030 goto getmem_done; 3a6fb6c4255c38 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-12-09 1031 } 3a6fb6c4255c38 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-12-09 1032 pr_info("Unable to allocate enough contiguous physical memory on Gen 1 VM. Using MMIO instead.\n"); a07b50d80ab621 drivers/video/fbdev/hyperv_fb.c Arnd Bergmann 2023-10-09 1033 } else if (IS_ENABLED(CONFIG_SYSFB)) { 81d2393485f099 drivers/video/fbdev/hyperv_fb.c Thomas Zimmermann 2022-12-19 1034 base = screen_info.lfb_base; 81d2393485f099 drivers/video/fbdev/hyperv_fb.c Thomas Zimmermann 2022-12-19 1035 size = screen_info.lfb_size; 3a6fb6c4255c38 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-12-09 1036 } 3a6fb6c4255c38 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-12-09 1037 3a6fb6c4255c38 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-12-09 1038 /* 3a6fb6c4255c38 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-12-09 1039 * Cannot use the contiguous physical memory. 3a6fb6c4255c38 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-12-09 1040 * Allocate mmio space for framebuffer. 3a6fb6c4255c38 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-12-09 1041 */ 3a6fb6c4255c38 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-12-09 1042 dio_fb_size = 3a6fb6c4255c38 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-12-09 1043 screen_width * screen_height * screen_depth / 8; 3a6fb6c4255c38 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-12-09 1044 c4b4d7047f16a8 drivers/video/fbdev/hyperv_fb.c Saurabh Sengar 2022-04-27 1045 ret = vmbus_allocate_mmio(&par->mem, hdev, 0, -1, 3546448338e76a drivers/video/fbdev/hyperv_fb.c Jake Oshins 2015-08-05 1046 screen_fb_size, 0x100000, true); 9069fd54960304 drivers/video/hyperv_fb.c Gerd Hoffmann 2014-02-26 1047 if (ret != 0) { 3546448338e76a drivers/video/fbdev/hyperv_fb.c Jake Oshins 2015-08-05 1048 pr_err("Unable to allocate framebuffer memory\n"); 68a2d20b79b105 drivers/video/hyperv_fb.c Haiyang Zhang 2013-04-29 1049 goto err1; 9069fd54960304 drivers/video/hyperv_fb.c Gerd Hoffmann 2014-02-26 1050 } 68a2d20b79b105 drivers/video/hyperv_fb.c Haiyang Zhang 2013-04-29 1051 5f1251a48c17b5 drivers/video/fbdev/hyperv_fb.c Dexuan Cui 2020-11-17 1052 /* 5f1251a48c17b5 drivers/video/fbdev/hyperv_fb.c Dexuan Cui 2020-11-17 1053 * Map the VRAM cacheable for performance. This is also required for 5f1251a48c17b5 drivers/video/fbdev/hyperv_fb.c Dexuan Cui 2020-11-17 1054 * VM Connect to display properly for ARM64 Linux VM, as the host also 5f1251a48c17b5 drivers/video/fbdev/hyperv_fb.c Dexuan Cui 2020-11-17 1055 * maps the VRAM cacheable. 5f1251a48c17b5 drivers/video/fbdev/hyperv_fb.c Dexuan Cui 2020-11-17 1056 */ 5f1251a48c17b5 drivers/video/fbdev/hyperv_fb.c Dexuan Cui 2020-11-17 1057 fb_virt = ioremap_cache(par->mem->start, screen_fb_size); 68a2d20b79b105 drivers/video/hyperv_fb.c Haiyang Zhang 2013-04-29 1058 if (!fb_virt) 68a2d20b79b105 drivers/video/hyperv_fb.c Haiyang Zhang 2013-04-29 1059 goto err2; 68a2d20b79b105 drivers/video/hyperv_fb.c Haiyang Zhang 2013-04-29 1060 d21987d709e807 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-09-18 1061 /* Allocate memory for deferred IO */ d21987d709e807 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-09-18 1062 par->dio_vp = vzalloc(round_up(dio_fb_size, PAGE_SIZE)); d21987d709e807 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-09-18 1063 if (par->dio_vp == NULL) d21987d709e807 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-09-18 1064 goto err3; d21987d709e807 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-09-18 1065 d21987d709e807 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-09-18 1066 /* Physical address of FB device */ d21987d709e807 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-09-18 1067 par->mmio_pp = par->mem->start; d21987d709e807 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-09-18 1068 /* Virtual address of FB device */ d21987d709e807 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-09-18 1069 par->mmio_vp = (unsigned char *) fb_virt; d21987d709e807 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-09-18 1070 3546448338e76a drivers/video/fbdev/hyperv_fb.c Jake Oshins 2015-08-05 1071 info->fix.smem_start = par->mem->start; d21987d709e807 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-09-18 1072 info->fix.smem_len = dio_fb_size; d21987d709e807 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-09-18 1073 info->screen_base = par->dio_vp; d21987d709e807 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-09-18 1074 info->screen_size = dio_fb_size; 68a2d20b79b105 drivers/video/hyperv_fb.c Haiyang Zhang 2013-04-29 1075 3a6fb6c4255c38 drivers/video/fbdev/hyperv_fb.c Wei Hu 2019-12-09 1076 getmem_done: 5fbcc6708fe32e drivers/video/fbdev/hyperv_fb.c Daniel Vetter 2023-04-06 @1077 aperture_remove_conflicting_devices(base, size, KBUILD_MODNAME); 3cb73bc3fa2a3c drivers/video/fbdev/hyperv_fb.c Kairui Song 2020-10-14 1078 a07b50d80ab621 drivers/video/fbdev/hyperv_fb.c Arnd Bergmann 2023-10-09 1079 if (!gen2vm) { a07b50d80ab621 drivers/video/fbdev/hyperv_fb.c Arnd Bergmann 2023-10-09 1080 pci_dev_put(pdev); a07b50d80ab621 drivers/video/fbdev/hyperv_fb.c Arnd Bergmann 2023-10-09 1081 } else if (IS_ENABLED(CONFIG_SYSFB)) { 3cb73bc3fa2a3c drivers/video/fbdev/hyperv_fb.c Kairui Song 2020-10-14 1082 /* framebuffer is reallocated, clear screen_info to avoid misuse from kexec */ 3cb73bc3fa2a3c drivers/video/fbdev/hyperv_fb.c Kairui Song 2020-10-14 1083 screen_info.lfb_size = 0; 3cb73bc3fa2a3c drivers/video/fbdev/hyperv_fb.c Kairui Song 2020-10-14 1084 screen_info.lfb_base = 0; 3cb73bc3fa2a3c drivers/video/fbdev/hyperv_fb.c Kairui Song 2020-10-14 1085 screen_info.orig_video_isVGA = 0; 3cb73bc3fa2a3c drivers/video/fbdev/hyperv_fb.c Kairui Song 2020-10-14 1086 } 9069fd54960304 drivers/video/hyperv_fb.c Gerd Hoffmann 2014-02-26 1087 68a2d20b79b105 drivers/video/hyperv_fb.c Haiyang Zhang 2013-04-29 1088 return 0; 68a2d20b79b105 drivers/video/hyperv_fb.c Haiyang Zhang 2013-04-29 1089 68a2d20b79b105 drivers/video/hyperv_fb.c Haiyang Zhang 2013-04-29 1090 err3: 68a2d20b79b105 drivers/video/hyperv_fb.c Haiyang Zhang 2013-04-29 1091 iounmap(fb_virt); 68a2d20b79b105 drivers/video/hyperv_fb.c Haiyang Zhang 2013-04-29 1092 err2: 696ca5e82c057a drivers/video/fbdev/hyperv_fb.c Jake Oshins 2016-04-05 1093 vmbus_free_mmio(par->mem->start, screen_fb_size); 3546448338e76a drivers/video/fbdev/hyperv_fb.c Jake Oshins 2015-08-05 1094 par->mem = NULL; 68a2d20b79b105 drivers/video/hyperv_fb.c Haiyang Zhang 2013-04-29 1095 err1: 9069fd54960304 drivers/video/hyperv_fb.c Gerd Hoffmann 2014-02-26 1096 if (!gen2vm) 68a2d20b79b105 drivers/video/hyperv_fb.c Haiyang Zhang 2013-04-29 1097 pci_dev_put(pdev); 9069fd54960304 drivers/video/hyperv_fb.c Gerd Hoffmann 2014-02-26 1098 68a2d20b79b105 drivers/video/hyperv_fb.c Haiyang Zhang 2013-04-29 1099 return -ENOMEM; 68a2d20b79b105 drivers/video/hyperv_fb.c Haiyang Zhang 2013-04-29 1100 } 68a2d20b79b105 drivers/video/hyperv_fb.c Haiyang Zhang 2013-04-29 1101 :::::: The code at line 1077 was first introduced by commit :::::: 5fbcc6708fe32ef80122cd2a59ddca9d18b24d6e video/aperture: Drop primary argument :::::: TO: Daniel Vetter :::::: CC: Thomas Zimmermann -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki