diff mbox

[1/5] ALUA prioritizer: Remove an unused variable

Message ID 53C9189A.3070204@acm.org (mailing list archive)
State Not Applicable, archived
Delegated to: Mike Snitzer
Headers show

Commit Message

Bart Van Assche July 18, 2014, 12:52 p.m. UTC
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 libmultipath/prioritizers/alua.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Sebastian Herbszt July 24, 2014, 2:37 p.m. UTC | #1
Bart Van Assche wrote:
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> ---
>  libmultipath/prioritizers/alua.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/libmultipath/prioritizers/alua.c b/libmultipath/prioritizers/alua.c
> index b967ec7..39ed1c8 100644
> --- a/libmultipath/prioritizers/alua.c
> +++ b/libmultipath/prioritizers/alua.c
> @@ -55,7 +55,6 @@ get_alua_info(int fd)
>  {
>  	int	rc;
>  	int	tpg;
> -	int	aas;
>  
>  	rc = get_target_port_group_support(fd);
>  	if (rc < 0)
> @@ -72,7 +71,6 @@ get_alua_info(int fd)
>  	rc = get_asymmetric_access_state(fd, tpg);
>  	if (rc < 0)
>  		return -ALUA_PRIO_GETAAS_FAILED;
> -	aas = (rc & 0x0f);
>  
>  	condlog(3, "aas = %02x [%s]%s", rc, aas_print_string(rc),
>  		(rc & 0x80) ? " [preferred]" : "");

Question is what Hannes intended to output here with his change in a87a2aa4.

The aas field is just 4 bits. The rc variable contains more than the aas
field. If I don't mistake it is d->b0 & 0x8f. So it does contain pref and
aas, but not rtpg_fmt. aas_print_string on the other hand tries to check
the format, but always gets rtpg_fmt as 0.

Sebastian

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
diff mbox

Patch

diff --git a/libmultipath/prioritizers/alua.c b/libmultipath/prioritizers/alua.c
index b967ec7..39ed1c8 100644
--- a/libmultipath/prioritizers/alua.c
+++ b/libmultipath/prioritizers/alua.c
@@ -55,7 +55,6 @@  get_alua_info(int fd)
 {
 	int	rc;
 	int	tpg;
-	int	aas;
 
 	rc = get_target_port_group_support(fd);
 	if (rc < 0)
@@ -72,7 +71,6 @@  get_alua_info(int fd)
 	rc = get_asymmetric_access_state(fd, tpg);
 	if (rc < 0)
 		return -ALUA_PRIO_GETAAS_FAILED;
-	aas = (rc & 0x0f);
 
 	condlog(3, "aas = %02x [%s]%s", rc, aas_print_string(rc),
 		(rc & 0x80) ? " [preferred]" : "");