From 707d19d98548c0385021a42e8dc291fca4bf85e5 Mon Sep 17 00:00:00 2001 From: Santoshkumar Zalake Date: Fri, 23 Apr 2021 17:33:25 +0530 Subject: [PATCH] net: stmmac: Update unused variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Re-arrange the ‘is_udp’ variable to avoid mark as unused variable. Change-Id: I09c85e0467a42d34b49a54a91c3e23bcdf42a15c Signed-off-by: Santoshkumar Zalake --- drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c index 1f143ee94c3c..3231320531c3 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c @@ -220,7 +220,6 @@ void dwmac_qcom_program_avb_algorithm(struct stmmac_priv *priv, unsigned int dwmac_qcom_get_plat_tx_coal_frames(struct sk_buff *skb) { - bool is_udp; unsigned int eth_type; eth_type = dwmac_qcom_get_eth_type(skb->data); @@ -234,7 +233,7 @@ unsigned int dwmac_qcom_get_plat_tx_coal_frames(struct sk_buff *skb) return AVB_INT_MOD; if (eth_type == ETH_P_IP || eth_type == ETH_P_IPV6) { #ifdef CONFIG_PTPSUPPORT_OBJ - is_udp = (((eth_type == ETH_P_IP) && + bool is_udp = (((eth_type == ETH_P_IP) && (ip_hdr(skb)->protocol == IPPROTO_UDP)) || ((eth_type == ETH_P_IPV6) &&