[PATCH 1/6] drm/amd/powerplay: incorrectly use of the function return value

Michel Dänzer michel at daenzer.net
Wed Jul 6 01:31:17 UTC 2016


On 05.07.2016 18:48, Rex Zhu wrote:
> '0' means true.
> 
> Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
> 
> Change-Id: I04510f8c726a57fc4a7867954cfb2f4fba659150
> ---
>  drivers/gpu/drm/amd/powerplay/hwmgr/tonga_processpptables.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_processpptables.c b/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_processpptables.c
> index 94d6b47..6d9d9ed 100644
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_processpptables.c
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_processpptables.c
> @@ -302,7 +302,7 @@ static int init_dpm_2_parameters(
>  			(((unsigned long)powerplay_table) + le16_to_cpu(powerplay_table->usPPMTableOffset));
>  
>  		if (0 != powerplay_table->usPPMTableOffset) {
> -			if (1 == get_platform_power_management_table(hwmgr, atom_ppm_table)) {
> +			if (0 == get_platform_power_management_table(hwmgr, atom_ppm_table)) {

Please fix the order to match the coding style while you're at it:

			if (get_platform_power_management_table(hwmgr, atom_ppm_table) == 0) {

With that fixed,

Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the amd-gfx mailing list