lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <AANLkTikVDKwqpNXZnLARA+-20-Gx7McZL6O=fro0RZiw@mail.gmail.com>
Date:	Fri, 28 Jan 2011 18:03:27 -0500
From:	Alex Deucher <alexdeucher@...il.com>
To:	Stefan Weil <weil@...l.berlios.de>
Cc:	David Airlie <airlied@...ux.ie>, dri-devel@...ts.freedesktop.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] radeon: Fix wrong boolean operator

On Fri, Jan 28, 2011 at 5:35 PM, Stefan Weil <weil@...l.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@...il.com>

>
> It looks like cppcheck is correct, so fix this. No test was run.
>
> Cc: David Airlie <airlied@...ux.ie>
> Cc: Alex Deucher <alexdeucher@...il.com>
> Cc: dri-devel@...ts.freedesktop.org
> Cc: linux-kernel@...r.kernel.org
> Signed-off-by: Stefan Weil <weil@...l.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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ