[PATCH RESEND] tools-powerpc: Return false instead of -1

2016-11-09 Thread Andrew Shadura
, replace -1 by false, and 0 by true. This issue was found by the following Coccinelle semantic patch: @@ identifier f, ret; constant C; typedef bool; @@ bool f (...){ <+... ret = -C; ... * return ret; ...+> } Signed-off-by: Peter Senna Tschudin Signed-off-by: Andrew Shadura --- tools/t

Re: [PATCH] drm/amd/powerplay: return false instead of -EINVAL

2016-11-03 Thread Andrew Shadura
ct a boolean value here. >> >> This issue has been found using the following Coccinelle semantic patch >> written by Peter Senna Tschudin: >> >> @@ >> identifier f; >> constant C; >> typedef bool; >> @@ >> bool f (...){ >> <+...

[PATCH] drm/amd/powerplay: return false instead of -EINVAL

2016-11-03 Thread Andrew Shadura
<+... * return -C; ...+> } Signed-off-by: Andrew Shadura --- drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c index 7

[PATCH] drm/amd/powerplay: return false instead of -EINVAL

2016-09-02 Thread Andrew Shadura
<+... * return -C; ...+> } Signed-off-by: Andrew Shadura --- drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c index 7

Re: tools-powerpc: Return false instead of -1

2016-09-02 Thread Andrew Shadura
On 17/09/15 13:03, Peter Senna Tschudin wrote: > Returning a negative value for a boolean function seem to have the > undesired effect of returning true. require_paranoia_below() is a > boolean function, but the variable used to store the return value is an > integer, receiving -1 or 0. This patch