linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [linux-next:master 5237/7353] drivers/gpu/drm/xe/xe_ggtt.c:714:3: error: variable 'total' is uninitialized when used here
@ 2024-08-29  2:01 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-08-29  2:01 UTC (permalink / raw)
  To: Rodrigo Vivi
  Cc: llvm, oe-kbuild-all, Linux Memory Management List, Jonathan Cavitt

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   195a402a75791e6e0d96d9da27ca77671bc656a8
commit: 136367290ea5d7b5d05696189e9fd6162b9d9742 [5237/7353] drm/xe: Introduce xe_ggtt_print_holes
config: x86_64-randconfig-002-20240829 (https://download.01.org/0day-ci/archive/20240829/202408290916.B9yUmPQD-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240829/202408290916.B9yUmPQD-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/202408290916.B9yUmPQD-lkp@intel.com/

Note: the linux-next/master HEAD 195a402a75791e6e0d96d9da27ca77671bc656a8 builds fine.
      It may have been fixed somewhere.

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/xe/xe_ggtt.c:714:3: error: variable 'total' is uninitialized when used here [-Werror,-Wuninitialized]
     714 |                 total += hole_size;
         |                 ^~~~~
   drivers/gpu/drm/xe/xe_ggtt.c:702:11: note: initialize the variable 'total' to silence this warning
     702 |         u64 total;
         |                  ^
         |                   = 0
   1 error generated.


vim +/total +714 drivers/gpu/drm/xe/xe_ggtt.c

   685	
   686	/**
   687	 * xe_ggtt_print_holes - Print holes
   688	 * @ggtt: the &xe_ggtt to be inspected
   689	 * @alignment: min alignment
   690	 * @p: the &drm_printer
   691	 *
   692	 * Print GGTT ranges that are available and return total size available.
   693	 *
   694	 * Return: Total available size.
   695	 */
   696	u64 xe_ggtt_print_holes(struct xe_ggtt *ggtt, u64 alignment, struct drm_printer *p)
   697	{
   698		const struct drm_mm *mm = &ggtt->mm;
   699		const struct drm_mm_node *entry;
   700		u64 hole_min_start = xe_wopcm_size(tile_to_xe(ggtt->tile));
   701		u64 hole_start, hole_end, hole_size;
   702		u64 total;
   703		char buf[10];
   704	
   705		mutex_lock(&ggtt->lock);
   706	
   707		drm_mm_for_each_hole(entry, mm, hole_start, hole_end) {
   708			hole_start = max(hole_start, hole_min_start);
   709			hole_start = ALIGN(hole_start, alignment);
   710			hole_end = ALIGN_DOWN(hole_end, alignment);
   711			if (hole_start >= hole_end)
   712				continue;
   713			hole_size = hole_end - hole_start;
 > 714			total += hole_size;

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-08-29  2:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-29  2:01 [linux-next:master 5237/7353] drivers/gpu/drm/xe/xe_ggtt.c:714:3: error: variable 'total' is uninitialized when used here kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox