CC: [email protected]
CC: [email protected]
TO: Christoph Hellwig <[email protected]>
CC: Andrew Morton <[email protected]>
CC: Linux Memory Management List <[email protected]>
CC: Tvrtko Ursulin <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   ed8780e3f2ecc82645342d070c6b4e530532e680
commit: bfed6708d6c97406d14420f3288ee775c284ff8a drm/i915: use vmap in 
shmem_pin_map
date:   10 days ago
:::::: branch date: 19 hours ago
:::::: commit date: 10 days ago
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 <[email protected]>


cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

>> drivers/gpu/drm/i915/gt/shmem_utils.c:76:13: warning: Unsigned variable '--' 
>> can't be negative so it is unnecessary to test it. [unsignedPositive]
    while (--i >= 0)
               ^

vim +76 drivers/gpu/drm/i915/gt/shmem_utils.c

be1cb55a07bfc5 Chris Wilson      2020-04-29  51  
be1cb55a07bfc5 Chris Wilson      2020-04-29  52  void *shmem_pin_map(struct 
file *file)
be1cb55a07bfc5 Chris Wilson      2020-04-29  53  {
bfed6708d6c974 Christoph Hellwig 2020-10-17  54         struct page **pages;
bfed6708d6c974 Christoph Hellwig 2020-10-17  55         size_t n_pages, i;
bfed6708d6c974 Christoph Hellwig 2020-10-17  56         void *vaddr;
be1cb55a07bfc5 Chris Wilson      2020-04-29  57  
bfed6708d6c974 Christoph Hellwig 2020-10-17  58         n_pages = 
file->f_mapping->host->i_size >> PAGE_SHIFT;
bfed6708d6c974 Christoph Hellwig 2020-10-17  59         pages = 
kvmalloc_array(n_pages, sizeof(*pages), GFP_KERNEL);
bfed6708d6c974 Christoph Hellwig 2020-10-17  60         if (!pages)
be1cb55a07bfc5 Chris Wilson      2020-04-29  61                 return NULL;
be1cb55a07bfc5 Chris Wilson      2020-04-29  62  
bfed6708d6c974 Christoph Hellwig 2020-10-17  63         for (i = 0; i < 
n_pages; i++) {
bfed6708d6c974 Christoph Hellwig 2020-10-17  64                 pages[i] = 
shmem_read_mapping_page_gfp(file->f_mapping, i,
be1cb55a07bfc5 Chris Wilson      2020-04-29  65                                 
                       GFP_KERNEL);
bfed6708d6c974 Christoph Hellwig 2020-10-17  66                 if 
(IS_ERR(pages[i]))
be1cb55a07bfc5 Chris Wilson      2020-04-29  67                         goto 
err_page;
be1cb55a07bfc5 Chris Wilson      2020-04-29  68         }
be1cb55a07bfc5 Chris Wilson      2020-04-29  69  
bfed6708d6c974 Christoph Hellwig 2020-10-17  70         vaddr = vmap(pages, 
n_pages, VM_MAP_PUT_PAGES, PAGE_KERNEL);
bfed6708d6c974 Christoph Hellwig 2020-10-17  71         if (!vaddr)
bfed6708d6c974 Christoph Hellwig 2020-10-17  72                 goto err_page;
be1cb55a07bfc5 Chris Wilson      2020-04-29  73         
mapping_set_unevictable(file->f_mapping);
bfed6708d6c974 Christoph Hellwig 2020-10-17  74         return vaddr;
be1cb55a07bfc5 Chris Wilson      2020-04-29  75  err_page:
bfed6708d6c974 Christoph Hellwig 2020-10-17 @76         while (--i >= 0)
bfed6708d6c974 Christoph Hellwig 2020-10-17  77                 
put_page(pages[i]);
bfed6708d6c974 Christoph Hellwig 2020-10-17  78         kvfree(pages);
be1cb55a07bfc5 Chris Wilson      2020-04-29  79         return NULL;
be1cb55a07bfc5 Chris Wilson      2020-04-29  80  }
be1cb55a07bfc5 Chris Wilson      2020-04-29  81  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to