CC: [email protected]
CC: [email protected]
TO: Matthew Auld <[email protected]>
CC: "Thomas Hellström" <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   2a987e65025e2b79c6d453b78cb5985ac6e5eb26
commit: a6c5b891252143ee9bc02f649282905954d6705c drm/i915/ttm: remove unused 
function
date:   6 months ago
:::::: branch date: 2 days ago
:::::: commit date: 6 months ago
config: i386-randconfig-m021-20211207 
(https://download.01.org/0day-ci/archive/20211210/[email protected]/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>

smatch warnings:
drivers/gpu/drm/i915/intel_region_ttm.c:176 intel_region_ttm_resource_alloc() 
error: uninitialized symbol 'res'.

vim +/res +176 drivers/gpu/drm/i915/intel_region_ttm.c

d148738923fdb50 Thomas Hellström 2021-06-02  141  
213d5092776345a Thomas Hellström 2021-06-10  142  #ifdef 
CONFIG_DRM_I915_SELFTEST
d148738923fdb50 Thomas Hellström 2021-06-02  143  /**
a6c5b891252143e Matthew Auld     2021-06-17  144   * 
intel_region_ttm_resource_alloc - Allocate memory resources from a region
d148738923fdb50 Thomas Hellström 2021-06-02  145   * @mem: The memory region,
d148738923fdb50 Thomas Hellström 2021-06-02  146   * @size: The requested size 
in bytes
d148738923fdb50 Thomas Hellström 2021-06-02  147   * @flags: Allocation flags
d148738923fdb50 Thomas Hellström 2021-06-02  148   *
d148738923fdb50 Thomas Hellström 2021-06-02  149   * This functionality is 
provided only for callers that need to allocate
d148738923fdb50 Thomas Hellström 2021-06-02  150   * memory from standalone TTM 
range managers, without the TTM eviction
d148738923fdb50 Thomas Hellström 2021-06-02  151   * functionality. Don't use 
if you are not completely sure that's the
d148738923fdb50 Thomas Hellström 2021-06-02  152   * case. The returned opaque 
node can be converted to an sg_table using
a6c5b891252143e Matthew Auld     2021-06-17  153   * 
intel_region_ttm_resource_to_st(), and can be freed using
a6c5b891252143e Matthew Auld     2021-06-17  154   * 
intel_region_ttm_resource_free().
d148738923fdb50 Thomas Hellström 2021-06-02  155   *
d148738923fdb50 Thomas Hellström 2021-06-02  156   * Return: A valid pointer on 
success, an error pointer on failure.
d148738923fdb50 Thomas Hellström 2021-06-02  157   */
2a7005c8a3982ba Dave Airlie      2021-06-11  158  struct ttm_resource *
687c7d0fcf8014a Matthew Auld     2021-06-16  159  
intel_region_ttm_resource_alloc(struct intel_memory_region *mem,
d148738923fdb50 Thomas Hellström 2021-06-02  160                                
resource_size_t size,
d148738923fdb50 Thomas Hellström 2021-06-02  161                                
unsigned int flags)
d148738923fdb50 Thomas Hellström 2021-06-02  162  {
d148738923fdb50 Thomas Hellström 2021-06-02  163        struct 
ttm_resource_manager *man = mem->region_private;
d148738923fdb50 Thomas Hellström 2021-06-02  164        struct ttm_place place 
= {};
d148738923fdb50 Thomas Hellström 2021-06-02  165        struct 
ttm_buffer_object mock_bo = {};
2a7005c8a3982ba Dave Airlie      2021-06-11  166        struct ttm_resource 
*res;
d148738923fdb50 Thomas Hellström 2021-06-02  167        int ret;
d148738923fdb50 Thomas Hellström 2021-06-02  168  
2a7005c8a3982ba Dave Airlie      2021-06-11  169        mock_bo.base.size = 
size;
13c2ceb6addb6b1 Matthew Auld     2021-06-16  170        mock_bo.page_alignment 
= mem->min_page_size >> PAGE_SHIFT;
d53ec322dc7de32 Matthew Auld     2021-06-16  171        place.flags = flags;
d148738923fdb50 Thomas Hellström 2021-06-02  172  
d148738923fdb50 Thomas Hellström 2021-06-02  173        ret = 
man->func->alloc(man, &mock_bo, &place, &res);
d148738923fdb50 Thomas Hellström 2021-06-02  174        if (ret == -ENOSPC)
d148738923fdb50 Thomas Hellström 2021-06-02  175                ret = -ENXIO;
2a7005c8a3982ba Dave Airlie      2021-06-11 @176        return ret ? 
ERR_PTR(ret) : res;
d148738923fdb50 Thomas Hellström 2021-06-02  177  }
d53ec322dc7de32 Matthew Auld     2021-06-16  178  

:::::: The code at line 176 was first introduced by commit
:::::: 2a7005c8a3982ba27fab237d85c27da446484e9c Merge tag 
'drm-intel-gt-next-2021-06-10' of git://anongit.freedesktop.org/drm/drm-intel 
into drm-next

:::::: TO: Dave Airlie <[email protected]>
:::::: CC: Dave Airlie <[email protected]>

---
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