lkml.org 
[lkml]   [2011]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] radeon: Fix wrong boolean operator
From
On Fri, Jan 28, 2011 at 5:35 PM, Stefan Weil <weil@mail.berlios.de> wrote:
> This error is reported by cppcheck:
> drivers/gpu/drm/radeon/radeon_encoders.c:1066: warning: Mutual exclusion over || always evaluates to true. Did you intend to use && instead?

Yes, should be &&.

Thanks,

Reviewed-by: Alex Deucher <alexdeucher@gmail.com>

>
> It looks like cppcheck is correct, so fix this. No test was run.
>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Alex Deucher <alexdeucher@gmail.com>
> Cc: dri-devel@lists.freedesktop.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Stefan Weil <weil@mail.berlios.de>
> ---
>  drivers/gpu/drm/radeon/radeon_encoders.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_encoders.c b/drivers/gpu/drm/radeon/radeon_encoders.c
> index 5e90984..d4a5422 100644
> --- a/drivers/gpu/drm/radeon/radeon_encoders.c
> +++ b/drivers/gpu/drm/radeon/radeon_encoders.c
> @@ -1063,7 +1063,7 @@ atombios_set_edp_panel_power(struct drm_connector *connector, int action)
>        if (!ASIC_IS_DCE4(rdev))
>                return;
>
> -       if ((action != ATOM_TRANSMITTER_ACTION_POWER_ON) ||
> +       if ((action != ATOM_TRANSMITTER_ACTION_POWER_ON) &&
>            (action != ATOM_TRANSMITTER_ACTION_POWER_OFF))
>                return;
>
> --
> 1.7.2.3
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-01-29 00:05    [W:0.027 / U:25.832 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site