Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: qualcomm: rmnet: Remove set but not used variable 'cmd'

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/net/ethernet/qualcomm/rmnet/rmnet_map_command.c: In function 'rmnet_map_do_flow_control':
drivers/net/ethernet/qualcomm/rmnet/rmnet_map_command.c:23:36: warning:
variable 'cmd' set but not used [-Wunused-but-set-variable]
struct rmnet_map_control_command *cmd;

'cmd' not used anymore now, should also be removed.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

YueHaibing and committed by
David S. Miller
315c9e83 26d31925

-2
-2
drivers/net/ethernet/qualcomm/rmnet/rmnet_map_command.c
··· 20 20 struct rmnet_port *port, 21 21 int enable) 22 22 { 23 - struct rmnet_map_control_command *cmd; 24 23 struct rmnet_endpoint *ep; 25 24 struct net_device *vnd; 26 25 u8 mux_id; 27 26 int r; 28 27 29 28 mux_id = RMNET_MAP_GET_MUX_ID(skb); 30 - cmd = RMNET_MAP_GET_CMD_START(skb); 31 29 32 30 if (mux_id >= RMNET_MAX_LOGICAL_EP) { 33 31 kfree_skb(skb);