drm/amd/powerplay: fix boolreturn.cocci warnings
authorkbuild test robot <fengguang.wu@intel.com>
Sat, 5 Dec 2015 00:13:27 +0000 (19:13 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 21 Dec 2015 21:42:49 +0000 (16:42 -0500)
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/ppatomctrl.c:475:10-11: WARNING: return of 0/1 in function 'atomctrl_lookup_gpio_pin' 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 <young.yang@amd.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c

index ea87c9088b32e1c5f16fec1b387dc696cbbd37f4..2a83a4af2904ca2ed9057a1f46947bcdfa4bcc30 100644 (file)
@@ -521,13 +521,13 @@ static bool atomctrl_lookup_gpio_pin(
                                pin_assignment->ucGpioPinBitShift;
                        gpio_pin_assignment->us_gpio_pin_aindex =
                                le16_to_cpu(pin_assignment->usGpioPin_AIndex);
-                       return 0;
+                       return false;
                }
 
                offset += offsetof(ATOM_GPIO_PIN_ASSIGNMENT, ucGPIO_ID) + 1;
        }
 
-       return 1;
+       return true;
 }
 
 /**