[PATCH 5/7] net: fec_imx: Drop frame_length

Andrey Smirnov andrew.smirnov at gmail.com
Mon Sep 17 22:21:20 PDT 2018


Drop frame_length in favour of just using len

Signed-off-by: Andrey Smirnov <andrew.smirnov at gmail.com>
---
 drivers/net/fec_imx.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/fec_imx.c b/drivers/net/fec_imx.c
index ff5a64174..843eba71f 100644
--- a/drivers/net/fec_imx.c
+++ b/drivers/net/fec_imx.c
@@ -523,7 +523,7 @@ static int fec_recv(struct eth_device *dev)
 	struct fec_priv *fec = (struct fec_priv *)dev->priv;
 	struct buffer_descriptor __iomem *rbd = &fec->rbd_base[fec->rbd_index];
 	uint32_t ievent;
-	int frame_length, len = 0;
+	int len = 0;
 	uint16_t bd_status;
 
 	/*
@@ -579,9 +579,8 @@ static int fec_recv(struct eth_device *dev)
 			/*
 			 * Get buffer address and size
 			 */
-			frame_length = data_length - 4;
-			net_receive(dev, frame, frame_length);
-			len = frame_length;
+			len = data_length - 4;
+			net_receive(dev, frame, len);
 		}
 	}
 	/*
-- 
2.17.1




More information about the barebox mailing list