net/sched: cbs: remove redundant assignment to variable port_rate
Subsystems (5)
PATCH 1/1 net/sched: cbs: remove redundant assignment to variable port_rate
From: Colin Ian King <[email protected]>
Variable port_rate is being initialized with a value that is never read and is being re-assigned a little later on. The assignment is redundant and hence can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by Colin Ian King <[email protected]>
--- net/sched/sch_cbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/sched/sch_cbs.c +1 -1
@@ -299,7 +299,7 @@ static void cbs_set_port_rate(struct net_device *dev, struct cbs_sched_data *q) {struct ethtool_link_ksettings ecmd;int speed =SPEED_10 ; -int port_rate =-1 ; +int port_rate;int err; err =__ethtool_get_link_ksettings (dev, &ecmd);
Signature · 1 line
2.20.1
From: Colin King <[email protected]>
Date: Mon, 2 Sep 2019 19:26:37 +0100
Quoted 8 lines
From: Colin Ian King <[email protected]>
Variable
port_rateis being initialized with a value that is never read and is being re-assigned a little later on. The assignment is redundant and hence can be removed.Addresses-Coverity: ("Unused value")
Signed-off-by Colin Ian King <[email protected]>
Applied.