[PATCH v2 3/8] drm/etnaviv: iommuv1: fold pagetable alloc and free into caller

kbuild test robot lkp at intel.com
Sat Sep 30 05:20:13 UTC 2017


Hi Lucas,

[auto build test WARNING on drm/drm-next]
[also build test WARNING on v4.14-rc2 next-20170929]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Lucas-Stach/drm-etnaviv-remove-iommu-fault-handler/20170930-080416
base:   git://people.freedesktop.org/~airlied/linux.git drm-next
config: arm-allmodconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=arm 

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   drivers/gpu/drm/etnaviv/etnaviv_iommu.c: In function 'etnaviv_iommuv1_domain_alloc':
>> drivers/gpu/drm/etnaviv/etnaviv_iommu.c:208:5: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
     if (ret)
        ^

vim +/ret +208 drivers/gpu/drm/etnaviv/etnaviv_iommu.c

a8c21a54 The etnaviv authors 2015-12-03  189  
dd34bb96 Lucas Stach         2016-08-16  190  struct iommu_domain *etnaviv_iommuv1_domain_alloc(struct etnaviv_gpu *gpu)
a8c21a54 The etnaviv authors 2015-12-03  191  {
a8c21a54 The etnaviv authors 2015-12-03  192  	struct etnaviv_iommu_domain *etnaviv_domain;
a8c21a54 The etnaviv authors 2015-12-03  193  	int ret;
a8c21a54 The etnaviv authors 2015-12-03  194  
a8c21a54 The etnaviv authors 2015-12-03  195  	etnaviv_domain = kzalloc(sizeof(*etnaviv_domain), GFP_KERNEL);
a8c21a54 The etnaviv authors 2015-12-03  196  	if (!etnaviv_domain)
a8c21a54 The etnaviv authors 2015-12-03  197  		return NULL;
a8c21a54 The etnaviv authors 2015-12-03  198  
a8c21a54 The etnaviv authors 2015-12-03  199  	etnaviv_domain->dev = gpu->dev;
a8c21a54 The etnaviv authors 2015-12-03  200  
a8c21a54 The etnaviv authors 2015-12-03  201  	etnaviv_domain->domain.type = __IOMMU_DOMAIN_PAGING;
a8c21a54 The etnaviv authors 2015-12-03  202  	etnaviv_domain->domain.ops = &etnaviv_iommu_ops.ops;
13c34fe5 Lucas Stach         2016-06-13  203  	etnaviv_domain->domain.pgsize_bitmap = SZ_4K;
a8c21a54 The etnaviv authors 2015-12-03  204  	etnaviv_domain->domain.geometry.aperture_start = GPU_MEM_START;
a8c21a54 The etnaviv authors 2015-12-03  205  	etnaviv_domain->domain.geometry.aperture_end = GPU_MEM_START + PT_ENTRIES * SZ_4K - 1;
a8c21a54 The etnaviv authors 2015-12-03  206  
a8c21a54 The etnaviv authors 2015-12-03  207  	ret = __etnaviv_iommu_init(etnaviv_domain);
a8c21a54 The etnaviv authors 2015-12-03 @208  	if (ret)

:::::: The code at line 208 was first introduced by commit
:::::: a8c21a5451d831e67b7a6fb910f9ca8bc7b43554 drm/etnaviv: add initial etnaviv DRM driver

:::::: TO: The etnaviv authors <dri-devel at lists.freedesktop.org>
:::::: CC: Lucas Stach <l.stach at pengutronix.de>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 64047 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20170930/1d27b8ed/attachment-0001.gz>


More information about the dri-devel mailing list