stm32/ethernet: fix build warning
chip/stm32_ethernet.c:2014:7: warning: variable 'i' set but not used [-Wunused-but-set-variable] 2014 | int i; | ^ 1 warning generated. Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
parent
1ce1a19afd
commit
27bfdf68ae
@ -1898,7 +1898,6 @@ static void stm32_receive(struct stm32_ethmac_s *priv)
|
||||
static void stm32_freeframe(struct stm32_ethmac_s *priv)
|
||||
{
|
||||
struct eth_txdesc_s *txdesc;
|
||||
int i;
|
||||
|
||||
ninfo("txhead: %p txtail: %p inflight: %d\n",
|
||||
priv->txhead, priv->txtail, priv->inflight);
|
||||
@ -1915,7 +1914,7 @@ static void stm32_freeframe(struct stm32_ethmac_s *priv)
|
||||
up_invalidate_dcache((uintptr_t)txdesc,
|
||||
(uintptr_t)txdesc + sizeof(struct eth_txdesc_s));
|
||||
|
||||
for (i = 0; (txdesc->tdes0 & ETH_TDES0_OWN) == 0; i++)
|
||||
while ((txdesc->tdes0 & ETH_TDES0_OWN) == 0)
|
||||
{
|
||||
/* There should be a buffer assigned to all in-flight
|
||||
* TX descriptors.
|
||||
|
@ -2011,7 +2011,6 @@ static void stm32_freeframe(struct stm32_ethmac_s *priv)
|
||||
{
|
||||
struct eth_desc_s *txdesc;
|
||||
uint32_t des3_tmp;
|
||||
int i;
|
||||
|
||||
ninfo("txhead: %p txtail: %p inflight: %d\n",
|
||||
priv->txhead, priv->txtail, priv->inflight);
|
||||
@ -2028,7 +2027,7 @@ static void stm32_freeframe(struct stm32_ethmac_s *priv)
|
||||
up_invalidate_dcache((uintptr_t)txdesc,
|
||||
(uintptr_t)txdesc + sizeof(struct eth_desc_s));
|
||||
|
||||
for (i = 0; (txdesc->des3 & ETH_TDES3_RD_OWN) == 0; i++)
|
||||
while ((txdesc->des3 & ETH_TDES3_RD_OWN) == 0)
|
||||
{
|
||||
/* There should be a buffer assigned to all in-flight
|
||||
* TX descriptors.
|
||||
|
Loading…
Reference in New Issue
Block a user