usb: typec: ucsi: remove redundant assignment to variable num
Subsystems (3)
PATCH 1/1 usb: typec: ucsi: remove redundant assignment to variable num
From: Colin Ian King <[email protected]>
Variable num is being assigned with a value that is never read, it is assigned a new value later in a for-loop. The assignment is redundant and can be removed.
Addresses-Coverity: ("Unused value")
--- drivers/usb/typec/ucsi/ucsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/typec/ucsi/ucsi.c +1 -1
@@ -400,7 +400,7 @@ static int ucsi_register_altmodes(struct ucsi_connector *con, u8 recipient)struct typec_altmode_desc desc;struct ucsi_altmode alt[2 ];u64 command; -int num =1 ; +int num;int ret;int len;int j;
Signature · 1 line
2.25.0
Heikki Krogerus
maintainerQuoted 17 lines · Colin King
From: Colin Ian King <[email protected]>
Variable num is being assigned with a value that is never read, it is assigned a new value later in a for-loop. The assignment is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by Colin Ian King <[email protected]>--- drivers/usb/typec/ucsi/ucsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/usb/typec/ucsi/ucsi.c +0
-0
drivers/usb/typec/ucsi/ucsi.c static int ucsi_register_altmodes(struct ucsi_connector *con, u8 recipient) · line 406
Quoted 8 lines
drivers/usb/typec/ucsi/ucsi.c +1
-1@@ -400,7 +400,7 @@ static int ucsi_register_altmodes(struct ucsi_connector *con, u8 recipient)struct typec_altmode_desc desc;struct ucsi_altmode alt[2 ];u64 command; -int num =1 ; +int num;int ret;int len;int j;
Greg! I'll pick this, and to you with a few other patches that I have in my queue for the ucsi driver. I hope that's OK.
thanks,
Signature · 1 line
heikki
Greg Kroah-Hartman
maintainerQuoted 13 lines · Heikki Krogerus
Quoted 12 lines · Colin King
From: Colin Ian King <[email protected]>
Variable num is being assigned with a value that is never read, it is assigned a new value later in a for-loop. The assignment is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by Colin Ian King <[email protected]>--- drivers/usb/typec/ucsi/ucsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 16 lines
drivers/usb/typec/ucsi/ucsi.c static int ucsi_register_altmodes(struct ucsi_connector *con, u8 recipient) · line 406
Quoted 13 lines
drivers/usb/typec/ucsi/ucsi.c +1
-1@@ -400,7 +400,7 @@ static int ucsi_register_altmodes(struct ucsi_connector *con, u8 recipient)struct typec_altmode_desc desc;struct ucsi_altmode alt[2 ];u64 command; -int num =1 ; +int num;int ret;int len;int j;Greg! I'll pick this, and to you with a few other patches that I have in my queue for the ucsi driver. I hope that's OK.
Thats fine.