From: kbuild test robot Date: Thu, 12 Nov 2015 17:58:34 +0000 (-0500) Subject: drm/amd/powerplay: fix boolreturn.cocci warnings X-Git-Tag: v4.14-rc1~3993^2~19^2~49 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=62a03f6d58dafd3d25f527e75589d45ba4b3a537;p=platform%2Fkernel%2Flinux-rpi.git drm/amd/powerplay: fix boolreturn.cocci warnings drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/tonga_hwmgr.c:2653:9-10: WARNING: return of 0/1 in function 'is_pcie_gen2_supported' with return type bool drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/tonga_hwmgr.c:2645:9-10: WARNING: return of 0/1 in function 'is_pcie_gen3_supported' with return type bool Return statements in functions returning bool should use true/false instead of 1/0. Generated by: scripts/coccinelle/misc/boolreturn.cocci CC: yanyang1 Signed-off-by: Fengguang Wu Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/include/amd_pcie_helpers.h b/drivers/gpu/drm/amd/include/amd_pcie_helpers.h index 2cfdf05..5725bf8 100644 --- a/drivers/gpu/drm/amd/include/amd_pcie_helpers.h +++ b/drivers/gpu/drm/amd/include/amd_pcie_helpers.h @@ -28,17 +28,17 @@ static inline bool is_pcie_gen3_supported(uint32_t pcie_link_speed_cap) { if (pcie_link_speed_cap & CAIL_PCIE_LINK_SPEED_SUPPORT_GEN3) - return 1; + return true; - return 0; + return false; } static inline bool is_pcie_gen2_supported(uint32_t pcie_link_speed_cap) { if (pcie_link_speed_cap & CAIL_PCIE_LINK_SPEED_SUPPORT_GEN2) - return 1; + return true; - return 0; + return false; } /* Get the new PCIE speed given the ASIC PCIE Cap and the NewState's requested PCIE speed*/