[radeon-alex:amd-staging-4.9 3/17] drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dce_calcs.c:1328:3-5: WARNING: possible condition with no effect (if == else) (fwd)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The if on line 1327 only exists to allow the comment in the else case.
Perhaps check on whether it is really useful.

The lines also look quite long.  Perhaps this could be cleaned up as well.

julia

---------- Forwarded message ----------
Date: Fri, 3 Mar 2017 05:06:14 +0800
From: kbuild test robot <fengguang.wu@xxxxxxxxx>
To: kbuild@xxxxxx
Cc: Julia Lawall <julia.lawall@xxxxxxx>
Subject: [radeon-alex:amd-staging-4.9 3/17]
    drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dce_calcs.c:1328:3-5:
    WARNING: possible condition with no effect (if == else)


tree:   git://people.freedesktop.org/~agd5f/linux.git amd-staging-4.9
head:   677efd69b448d24dd74e0dfb1d74fb6408c9df81
commit: 9ca8070c97b1eb2b948f065fdbccc15b6e8be639 [3/17] drm/amd/display: rename bandwidth_calcs.c to dce_calcs.c (v2)
:::::: branch date: 4 hours ago
:::::: commit date: 4 hours ago

>> drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dce_calcs.c:1328:3-5: 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 9ca8070c97b1eb2b948f065fdbccc15b6e8be639
vim +1328 drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dce_calcs.c

bad4c165 drivers/gpu/drm/amd/display/dc/calcs/bandwidth_calcs.c Harry Wentland 2015-11-25  1312  			data->cpuc_state_change_enable = bw_def_no;
bad4c165 drivers/gpu/drm/amd/display/dc/calcs/bandwidth_calcs.c Harry Wentland 2015-11-25  1313  		}
bad4c165 drivers/gpu/drm/amd/display/dc/calcs/bandwidth_calcs.c Harry Wentland 2015-11-25  1314  	}
bad4c165 drivers/gpu/drm/amd/display/dc/calcs/bandwidth_calcs.c Harry Wentland 2015-11-25  1315  	else {
bad4c165 drivers/gpu/drm/amd/display/dc/calcs/bandwidth_calcs.c Harry Wentland 2015-11-25  1316  		data->cpup_state_change_enable = bw_def_no;
bad4c165 drivers/gpu/drm/amd/display/dc/calcs/bandwidth_calcs.c Harry Wentland 2015-11-25  1317  		data->cpuc_state_change_enable = bw_def_no;
bad4c165 drivers/gpu/drm/amd/display/dc/calcs/bandwidth_calcs.c Harry Wentland 2015-11-25  1318  	}
bad4c165 drivers/gpu/drm/amd/display/dc/calcs/bandwidth_calcs.c Harry Wentland 2015-11-25  1319  	/*nb p-state change enable*/
bad4c165 drivers/gpu/drm/amd/display/dc/calcs/bandwidth_calcs.c Harry Wentland 2015-11-25  1320  	/*for dram speed/p-state change to be possible for a yclk(pclk) and sclk level there has to be positive margin and the dispclk required has to be*/
bad4c165 drivers/gpu/drm/amd/display/dc/calcs/bandwidth_calcs.c Harry Wentland 2015-11-25  1321  	/*below the maximum.*/
bad4c165 drivers/gpu/drm/amd/display/dc/calcs/bandwidth_calcs.c Harry Wentland 2015-11-25  1322  	/*the dram speed/p-state change margin is the minimum for all surfaces of the maximum latency hiding minus the dram speed/p-state change latency,*/
bad4c165 drivers/gpu/drm/amd/display/dc/calcs/bandwidth_calcs.c Harry Wentland 2015-11-25  1323  	/*minus the dmif burst time, minus the source line transfer time*/
bad4c165 drivers/gpu/drm/amd/display/dc/calcs/bandwidth_calcs.c Harry Wentland 2015-11-25  1324  	/*the maximum latency hiding is the minimum latency hiding plus one source line used for de-tiling in the line buffer, plus half the urgent latency*/
bad4c165 drivers/gpu/drm/amd/display/dc/calcs/bandwidth_calcs.c Harry Wentland 2015-11-25  1325  	/*if stutter and dram clock state change are gated before cursor then the cursor latency hiding does not limit stutter or dram clock state change*/
bad4c165 drivers/gpu/drm/amd/display/dc/calcs/bandwidth_calcs.c Harry Wentland 2015-11-25  1326  	for (i = 0; i <= maximum_number_of_surfaces - 1; i++) {
bad4c165 drivers/gpu/drm/amd/display/dc/calcs/bandwidth_calcs.c Harry Wentland 2015-11-25  1327  		if (data->enable[i]) {
bad4c165 drivers/gpu/drm/amd/display/dc/calcs/bandwidth_calcs.c Harry Wentland 2015-11-25 @1328  			if ((dceip->graphics_lb_nodownscaling_multi_line_prefetching == 1)) {
bad4c165 drivers/gpu/drm/amd/display/dc/calcs/bandwidth_calcs.c Harry Wentland 2015-11-25  1329  				data->maximum_latency_hiding[i] = bw_add(data->minimum_latency_hiding[i], bw_mul(bw_frc_to_fixed(8, 10), data->total_dmifmc_urgent_latency));
bad4c165 drivers/gpu/drm/amd/display/dc/calcs/bandwidth_calcs.c Harry Wentland 2015-11-25  1330  			}
bad4c165 drivers/gpu/drm/amd/display/dc/calcs/bandwidth_calcs.c Harry Wentland 2015-11-25  1331  			else {
bad4c165 drivers/gpu/drm/amd/display/dc/calcs/bandwidth_calcs.c Harry Wentland 2015-11-25  1332  				/*maximum_latency_hiding(i) = minimum_latency_hiding(i) + 1 / vsr(i) * h_total(i) / pixel_rate(i) + 0.5 * total_dmifmc_urgent_latency*/
bad4c165 drivers/gpu/drm/amd/display/dc/calcs/bandwidth_calcs.c Harry Wentland 2015-11-25  1333  				data->maximum_latency_hiding[i] = bw_add(data->minimum_latency_hiding[i], bw_mul(bw_frc_to_fixed(8, 10), data->total_dmifmc_urgent_latency));
bad4c165 drivers/gpu/drm/amd/display/dc/calcs/bandwidth_calcs.c Harry Wentland 2015-11-25  1334  			}
bad4c165 drivers/gpu/drm/amd/display/dc/calcs/bandwidth_calcs.c Harry Wentland 2015-11-25  1335  			data->maximum_latency_hiding_with_cursor[i] = bw_min2(data->maximum_latency_hiding[i], data->cursor_latency_hiding[i]);
bad4c165 drivers/gpu/drm/amd/display/dc/calcs/bandwidth_calcs.c Harry Wentland 2015-11-25  1336  		}

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

:::::: TO: Harry Wentland <harry.wentland@xxxxxxx>
:::::: CC: Alex Deucher <alexander.deucher@xxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux