[radeon-alex:amd-staging-4.9 10/12] drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_surface.c:125:2: warning: ISO C90 forbids mixed declarations and code

kbuild test robot fengguang.wu at intel.com
Wed Jan 25 03:10:39 UTC 2017


tree:   git://people.freedesktop.org/~agd5f/linux.git amd-staging-4.9
head:   dce3400e6fac5104768f224d71ab69be224d25ff
commit: d098432c4c6fd555c8040fcac45e7e28d2fbd26d [10/12] drm/amd/display: clean up redundant logic
config: i386-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        git checkout d098432c4c6fd555c8040fcac45e7e28d2fbd26d
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_surface.c: In function 'dc_surface_get_status':
>> drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_surface.c:125:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
     struct core_dc *core_dc;
     ^~~~~~

vim +125 drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_surface.c

4c7f5ded Andrey Grodzovsky 2016-12-20  109  	++surface->ref_count;
bad4c165 Harry Wentland    2015-11-25  110  
bad4c165 Harry Wentland    2015-11-25  111  	return &surface->protected.public;
bad4c165 Harry Wentland    2015-11-25  112  
bad4c165 Harry Wentland    2015-11-25  113  construct_fail:
bad4c165 Harry Wentland    2015-11-25  114  	dm_free(surface);
bad4c165 Harry Wentland    2015-11-25  115  
bad4c165 Harry Wentland    2015-11-25  116  alloc_fail:
bad4c165 Harry Wentland    2015-11-25  117  	return NULL;
bad4c165 Harry Wentland    2015-11-25  118  }
bad4c165 Harry Wentland    2015-11-25  119  
bad4c165 Harry Wentland    2015-11-25  120  const struct dc_surface_status *dc_surface_get_status(
bad4c165 Harry Wentland    2015-11-25  121  		const struct dc_surface *dc_surface)
bad4c165 Harry Wentland    2015-11-25  122  {
bad4c165 Harry Wentland    2015-11-25  123  	struct dc_surface_status *surface_status;
d098432c Tony Cheng        2017-01-19  124  	struct core_surface *core_surface = DC_SURFACE_TO_CORE(dc_surface);;
bad4c165 Harry Wentland    2015-11-25 @125  	struct core_dc *core_dc;
bad4c165 Harry Wentland    2015-11-25  126  	int i;
bad4c165 Harry Wentland    2015-11-25  127  
d098432c Tony Cheng        2017-01-19  128  	if (!dc_surface ||
d098432c Tony Cheng        2017-01-19  129  		!core_surface->ctx ||
d098432c Tony Cheng        2017-01-19  130  		!core_surface->ctx->dc) {
d098432c Tony Cheng        2017-01-19  131  		ASSERT(0);
d098432c Tony Cheng        2017-01-19  132  		return NULL; /* remove this if above assert never hit */
d098432c Tony Cheng        2017-01-19  133  	}

:::::: The code at line 125 was first introduced by commit
:::::: bad4c165a6986a131cdd1455507ba3857baaa561 drm/amd/dc: Add dc display driver

:::::: TO: Harry Wentland <harry.wentland at amd.com>
:::::: CC: Alex Deucher <alexander.deucher at amd.com>

---
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: 56846 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20170125/2241e81f/attachment-0001.gz>


More information about the dri-devel mailing list