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: <OSAPR01MB3667601BEAABB5AF95FB799592FC0@OSAPR01MB3667.jpnprd01.prod.outlook.com>
Date:   Wed, 11 Mar 2020 09:07:47 +0000
From:   <nobuhiro1.iwamatsu@...hiba.co.jp>
To:     <gregkh@...uxfoundation.org>, <linux-kernel@...r.kernel.org>
CC:     <stable@...r.kernel.org>, <yukuai3@...wei.com>,
        <alexander.deucher@....com>, <sashal@...nel.org>
Subject: RE: [PATCH 4.4 035/113] drm/amdgpu: remove 4 set but not used
 variable in amdgpu_atombios_get_connector_info_from_object_table

Hi,

This commit has a issue with duplicate grph_obj_type declarations.
And this has been fixed in commit:d785476c608c621b345dd9396e8b21e90375cb0.

----
commit d785476c608c621b345dd9396e8b21e90375cb0e
Author: Colin Ian King <colin.king@...onical.com>
Date:   Fri Nov 8 14:45:27 2019 +0000

    drm/amd/display: remove duplicated assignment to grph_obj_type
    
    Variable grph_obj_type is being assigned twice, one of these is
    redundant so remove it.
    
    Addresses-Coverity: ("Evaluation order violation")
    Signed-off-by: Colin Ian King <colin.king@...onical.com>
    Signed-off-by: Alex Deucher <alexander.deucher@....com>                                                                                                                    
----

Please apply to all LTS without 3.16.y.

Best regards,
  Nobuhiro

> -----Original Message-----
> From: stable-owner@...r.kernel.org
> [mailto:stable-owner@...r.kernel.org] On Behalf Of Greg Kroah-Hartman
> Sent: Thursday, February 27, 2020 10:36 PM
> To: linux-kernel@...r.kernel.org
> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>;
> stable@...r.kernel.org; yu kuai <yukuai3@...wei.com>; Alex Deucher
> <alexander.deucher@....com>; Sasha Levin <sashal@...nel.org>
> Subject: [PATCH 4.4 035/113] drm/amdgpu: remove 4 set but not used
> variable in amdgpu_atombios_get_connector_info_from_object_table
> 
> From: yu kuai <yukuai3@...wei.com>
> 
> [ Upstream commit bae028e3e521e8cb8caf2cc16a455ce4c55f2332 ]
> 
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c: In function
> 'amdgpu_atombios_get_connector_info_from_object_table':
> drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c:376:26: warning:
> variable 'grph_obj_num' set but not used [-Wunused-but-set-variable]
> drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c:376:13: warning:
> variable 'grph_obj_id' set but not used [-Wunused-but-set-variable]
> drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c:341:37: warning:
> variable 'con_obj_type' set but not used [-Wunused-but-set-variable]
> drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c:341:24: warning:
> variable 'con_obj_num' set but not used [-Wunused-but-set-variable]
> 
> They are never used, so can be removed.
> 
> Fixes: d38ceaf99ed0 ("drm/amdgpu: add core driver (v4)")
> Signed-off-by: yu kuai <yukuai3@...wei.com>
> Signed-off-by: Alex Deucher <alexander.deucher@....com>
> Signed-off-by: Sasha Levin <sashal@...nel.org>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c | 19 ++-----------------
>  1 file changed, 2 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c
> index 3e90ddcbb24a7..d799927d3a5de 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c
> @@ -319,17 +319,9 @@ bool
> amdgpu_atombios_get_connector_info_from_object_table(struct
> amdgpu_device *
>  		path_size += le16_to_cpu(path->usSize);
> 
>  		if (device_support & le16_to_cpu(path->usDeviceTag)) {
> -			uint8_t con_obj_id, con_obj_num, con_obj_type;
> -
> -			con_obj_id =
> +			uint8_t con_obj_id =
>  			    (le16_to_cpu(path->usConnObjectId) &
> OBJECT_ID_MASK)
>  			    >> OBJECT_ID_SHIFT;
> -			con_obj_num =
> -			    (le16_to_cpu(path->usConnObjectId) &
> ENUM_ID_MASK)
> -			    >> ENUM_ID_SHIFT;
> -			con_obj_type =
> -			    (le16_to_cpu(path->usConnObjectId) &
> -			     OBJECT_TYPE_MASK) >> OBJECT_TYPE_SHIFT;
> 
>  			/* Skip TV/CV support */
>  			if ((le16_to_cpu(path->usDeviceTag) == @@
> -354,14 +346,7 @@ bool
> amdgpu_atombios_get_connector_info_from_object_table(struct
> amdgpu_device *
>  			router.ddc_valid = false;
>  			router.cd_valid = false;
>  			for (j = 0; j < ((le16_to_cpu(path->usSize) - 8)
> / 2); j++) {
> -				uint8_t grph_obj_id, grph_obj_num,
> grph_obj_type;
> -
> -				grph_obj_id =
> -
> (le16_to_cpu(path->usGraphicObjIds[j]) &
> -				     OBJECT_ID_MASK) >>
> OBJECT_ID_SHIFT;
> -				grph_obj_num =
> -
> (le16_to_cpu(path->usGraphicObjIds[j]) &
> -				     ENUM_ID_MASK) >> ENUM_ID_SHIFT;
> +				uint8_t grph_obj_type=
>  				grph_obj_type =
> 
> (le16_to_cpu(path->usGraphicObjIds[j]) &
>  				     OBJECT_TYPE_MASK) >>
> OBJECT_TYPE_SHIFT;
> --
> 2.20.1
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ