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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6b1a4f85-bf6e-2b0f-7b7d-2eef9756113b@amd.com>
Date:   Wed, 17 May 2017 10:22:59 +0200
From:   Christian König <christian.koenig@....com>
To:     "Gustavo A. R. Silva" <garsilva@...eddedor.com>,
        Alex Deucher <alexander.deucher@....com>,
        David Airlie <airlied@...ux.ie>
CC:     <amd-gfx@...ts.freedesktop.org>, <dri-devel@...ts.freedesktop.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] gpu: drm: radeon: refactor code

Am 17.05.2017 um 04:20 schrieb Gustavo A. R. Silva:
> Local variable _color_ is assigned to a constant value and it is
> never updated again. Remove this variable and refactor the code it
> affects.
>
> Addresses-Coverity-ID: 1226745
> Signed-off-by: Gustavo A. R. Silva <garsilva@...eddedor.com>

Mhm, on the one hand it looks like a valid cleanup. On the other that is 
legacy code we haven't touched in a while.

Feel free to put my Reviewed-by: Christian König 
<christian.koenig@....com> on it, but I'm not sure if Alex will pick it up.

Regards,
Christian.

> ---
>   drivers/gpu/drm/radeon/radeon_legacy_encoders.c | 8 +-------
>   1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
> index 222a1fa..7235d0c 100644
> --- a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
> +++ b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
> @@ -640,7 +640,6 @@ static enum drm_connector_status radeon_legacy_primary_dac_detect(struct drm_enc
>   	uint32_t vclk_ecp_cntl, crtc_ext_cntl;
>   	uint32_t dac_ext_cntl, dac_cntl, dac_macro_cntl, tmp;
>   	enum drm_connector_status found = connector_status_disconnected;
> -	bool color = true;
>   
>   	/* just don't bother on RN50 those chip are often connected to remoting
>   	 * console hw and often we get failure to load detect those. So to make
> @@ -665,12 +664,7 @@ static enum drm_connector_status radeon_legacy_primary_dac_detect(struct drm_enc
>   	WREG32(RADEON_CRTC_EXT_CNTL, tmp);
>   
>   	tmp = RADEON_DAC_FORCE_BLANK_OFF_EN |
> -		RADEON_DAC_FORCE_DATA_EN;
> -
> -	if (color)
> -		tmp |= RADEON_DAC_FORCE_DATA_SEL_RGB;
> -	else
> -		tmp |= RADEON_DAC_FORCE_DATA_SEL_G;
> +		RADEON_DAC_FORCE_DATA_EN | RADEON_DAC_FORCE_DATA_SEL_RGB;
>   
>   	if (ASIC_IS_R300(rdev))
>   		tmp |= (0x1b6 << RADEON_DAC_FORCE_DATA_SHIFT);


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ