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] [day] [month] [year] [list]
Message-ID: <20191227084444.GA3041@jenkins-Celadon-RN>
Date:   Fri, 27 Dec 2019 16:44:47 +0800
From:   Huang Rui <ray.huang@....com>
To:     yu kuai <yukuai3@...wei.com>
Cc:     alexander.deucher@....com, christian.koenig@....com,
        David1.Zhou@....com, airlied@...ux.ie, daniel@...ll.ch,
        yi.zhang@...wei.com, linux-kernel@...r.kernel.org,
        dri-devel@...ts.freedesktop.org, zhengbin13@...wei.com,
        amd-gfx@...ts.freedesktop.org
Subject: Re: [PATCH] drm/radeon: remove three set but not used variable

On Thu, Dec 26, 2019 at 08:07:50PM +0800, yu kuai wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/gpu/drm/radeon/radeon_atombios.c: In function
> ‘radeon_get_atom_connector_info_from_object_table’:
> drivers/gpu/drm/radeon/radeon_atombios.c:651:26: warning: variable
> ‘grph_obj_num’ set but not used [-Wunused-but-set-variable]
> drivers/gpu/drm/radeon/radeon_atombios.c:651:13: warning: variable
> ‘grph_obj_id’ set but not used [-Wunused-but-set-variable]
> drivers/gpu/drm/radeon/radeon_atombios.c:573:37: warning: variable
> ‘con_obj_type’ set but not used [-Wunused-but-set-variable]
> 
> They are never used, and so can be removed.
> 
> Signed-off-by: yu kuai <yukuai3@...wei.com>

Thanks!

Acked-by: Huang Rui <ray.huang@....com>

> ---
>  drivers/gpu/drm/radeon/radeon_atombios.c | 15 ++-------------
>  1 file changed, 2 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c
> index 072e6daedf7a..848ef68d9086 100644
> --- a/drivers/gpu/drm/radeon/radeon_atombios.c
> +++ b/drivers/gpu/drm/radeon/radeon_atombios.c
> @@ -570,7 +570,7 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev)
>  		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;
> +			uint8_t con_obj_id, con_obj_num;
>  
>  			con_obj_id =
>  			    (le16_to_cpu(path->usConnObjectId) & OBJECT_ID_MASK)
> @@ -578,9 +578,6 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev)
>  			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;
>  
>  			/* TODO CV support */
>  			if (le16_to_cpu(path->usDeviceTag) ==
> @@ -648,15 +645,7 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev)
>  			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;
> -				grph_obj_type =
> +				uint8_t grph_obj_type =
>  				    (le16_to_cpu(path->usGraphicObjIds[j]) &
>  				     OBJECT_TYPE_MASK) >> OBJECT_TYPE_SHIFT;
>  
> -- 
> 2.17.2
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@...ts.freedesktop.org
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7Cray.huang%40amd.com%7C8d9d146eebca472e5e5908d78a10933f%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637129676103813665&amp;sdata=0xRhHO2UOIbfEzYV8HTGtSTHFw%2F8R66Tfy44YviKpmQ%3D&amp;reserved=0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ