Fwd: [radeon-alex:drm-next-4.19-wip 126/132] drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c:150:1-3: WARNING: possible condition with no effect (if == else)

Julia Lawall Julia.Lawall at lip6.fr
Wed Jul 4 18:36:31 UTC 2018


Please check on lines 150-153.  Both branches appear to be the same.

thanks,
julia

-------- Courriel original --------
Objet: [radeon-alex:drm-next-4.19-wip 126/132] 
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c:150:1-3: WARNING: possible 
condition with no effect (if == else)
Date: 04.07.2018 15:10
De: kbuild test robot <lkp at intel.com>
À: kbuild at 01.org
Cc: Julia Lawall <julia.lawall at lip6.fr>

CC: kbuild-all at 01.org
CC: dri-devel at lists.freedesktop.org
TO: Alex Deucher <alexander.deucher at amd.com>
CC: Chunming Zhou <david1.zhou at amd.com>
CC: "Christian König" <christian.koenig at amd.com>

tree:   git://people.freedesktop.org/~agd5f/linux.git drm-next-4.19-wip
head:   6becad35ec8a249df9f8e8fe196316efbd40faf4
commit: 40b106f7e840f2434c42e8992b3a4871a19ddf1d [126/132] drm/amdgpu: 
switch firmware path for CIK parts
:::::: branch date: 6 hours ago
:::::: commit date: 6 hours ago

>> drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c:150:1-3: WARNING: possible 
>> condition with no effect (if == else)

git remote add radeon-alex git://people.freedesktop.org/~agd5f/linux.git
git remote update radeon-alex
git checkout 40b106f7e840f2434c42e8992b3a4871a19ddf1d
vim +150 drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c

a2e73f56 Alex Deucher    2015-04-20  115
a2e73f56 Alex Deucher    2015-04-20  116  /**
a2e73f56 Alex Deucher    2015-04-20  117   * gmc_v7_0_init_microcode - 
load ucode images from disk
a2e73f56 Alex Deucher    2015-04-20  118   *
a2e73f56 Alex Deucher    2015-04-20  119   * @adev: amdgpu_device 
pointer
a2e73f56 Alex Deucher    2015-04-20  120   *
a2e73f56 Alex Deucher    2015-04-20  121   * Use the firmware interface 
to load the ucode images into
a2e73f56 Alex Deucher    2015-04-20  122   * the driver (not loaded into 
hw).
a2e73f56 Alex Deucher    2015-04-20  123   * Returns 0 on success, error 
on failure.
a2e73f56 Alex Deucher    2015-04-20  124   */
a2e73f56 Alex Deucher    2015-04-20  125  static int 
gmc_v7_0_init_microcode(struct amdgpu_device *adev)
a2e73f56 Alex Deucher    2015-04-20  126  {
a2e73f56 Alex Deucher    2015-04-20  127  	const char *chip_name;
a2e73f56 Alex Deucher    2015-04-20  128  	char fw_name[30];
a2e73f56 Alex Deucher    2015-04-20  129  	int err;
a2e73f56 Alex Deucher    2015-04-20  130
a2e73f56 Alex Deucher    2015-04-20  131  	DRM_DEBUG("\n");
a2e73f56 Alex Deucher    2015-04-20  132
a2e73f56 Alex Deucher    2015-04-20  133  	switch (adev->asic_type) {
a2e73f56 Alex Deucher    2015-04-20  134  	case CHIP_BONAIRE:
a2e73f56 Alex Deucher    2015-04-20  135  		chip_name = "bonaire";
a2e73f56 Alex Deucher    2015-04-20  136  		break;
a2e73f56 Alex Deucher    2015-04-20  137  	case CHIP_HAWAII:
a2e73f56 Alex Deucher    2015-04-20  138  		chip_name = "hawaii";
a2e73f56 Alex Deucher    2015-04-20  139  		break;
429c45de Ken Wang        2016-02-03  140  	case CHIP_TOPAZ:
429c45de Ken Wang        2016-02-03  141  		chip_name = "topaz";
429c45de Ken Wang        2016-02-03  142  		break;
a2e73f56 Alex Deucher    2015-04-20  143  	case CHIP_KAVERI:
a2e73f56 Alex Deucher    2015-04-20  144  	case CHIP_KABINI:
b62774fc Alex Deucher    2016-07-29  145  	case CHIP_MULLINS:
a2e73f56 Alex Deucher    2015-04-20  146  		return 0;
a2e73f56 Alex Deucher    2015-04-20  147  	default: BUG();
a2e73f56 Alex Deucher    2015-04-20  148  	}
a2e73f56 Alex Deucher    2015-04-20  149
429c45de Ken Wang        2016-02-03 @150  	if (adev->asic_type == 
CHIP_TOPAZ)
429c45de Ken Wang        2016-02-03  151  		snprintf(fw_name, 
sizeof(fw_name), "amdgpu/%s_mc.bin", chip_name);
429c45de Ken Wang        2016-02-03  152  	else
40b106f7 Alex Deucher    2018-07-02  153  		snprintf(fw_name, 
sizeof(fw_name), "amdgpu/%s_mc.bin", chip_name);
429c45de Ken Wang        2016-02-03  154
770d13b1 Christian König 2018-01-12  155  	err = 
request_firmware(&adev->gmc.fw, fw_name, adev->dev);
a2e73f56 Alex Deucher    2015-04-20  156  	if (err)
a2e73f56 Alex Deucher    2015-04-20  157  		goto out;
770d13b1 Christian König 2018-01-12  158  	err = 
amdgpu_ucode_validate(adev->gmc.fw);
a2e73f56 Alex Deucher    2015-04-20  159
a2e73f56 Alex Deucher    2015-04-20  160  out:
a2e73f56 Alex Deucher    2015-04-20  161  	if (err) {
7ca85295 Joe Perches     2017-02-28  162  		pr_err("cik_mc: Failed to 
load firmware \"%s\"\n", fw_name);
770d13b1 Christian König 2018-01-12  163  
		release_firmware(adev->gmc.fw);
770d13b1 Christian König 2018-01-12  164  		adev->gmc.fw = NULL;
a2e73f56 Alex Deucher    2015-04-20  165  	}
a2e73f56 Alex Deucher    2015-04-20  166  	return err;
a2e73f56 Alex Deucher    2015-04-20  167  }
a2e73f56 Alex Deucher    2015-04-20  168

:::::: The code at line 150 was first introduced by commit
:::::: 429c45deae6e57f1bb91bfb05b671063fb0cef60 drm/amdgpu: iceland use 
CI based MC IP

:::::: TO: Ken Wang <Qingqing.Wang 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


More information about the dri-devel mailing list