[][kernel][common][eth][Fix compile warning messages]

[Description]
Fix compile warning messages.

If without this patch, the compiler may generate numerous warning
messages during the compilation process.

[Release-log]
N/A


Change-Id: I3316e84f70aa091ccc8a23221e800c0827c1a1ad
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/7636005
diff --git a/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_eth_dbg.c b/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_eth_dbg.c
index 189d409..1b5d356 100755
--- a/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_eth_dbg.c
+++ b/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_eth_dbg.c
@@ -304,10 +304,10 @@
 	if (kstrtoul(token, 16, (unsigned long *)&value))
 		return -EINVAL;
 
-	pr_info("%s:phy=%d, reg=0x%x, val=0x%x\n", __func__,
+	pr_info("%s:phy=%d, reg=0x%lx, val=0x%lx\n", __func__,
 		0x1f, reg, value);
 	mt7530_mdio_w32(eth, reg, value);
-	pr_info("%s:phy=%d, reg=0x%x, val=0x%x confirm..\n", __func__,
+	pr_info("%s:phy=%d, reg=0x%lx, val=0x%x confirm..\n", __func__,
 		0x1f, reg, mt7530_mdio_r32(eth, reg));
 
 	return len;
@@ -352,12 +352,12 @@
 	if (kstrtoul(token, 16, (unsigned long *)&value))
 		return -EINVAL;
 
-	pr_info("%s:phy=%d, reg=0x%x, val=0x%x\n", __func__,
+	pr_info("%s:phy=%ld, reg=0x%lx, val=0x%lx\n", __func__,
 		phy, reg, value);
 
 	_mtk_mdio_write(eth, phy,  reg, value);
 
-	pr_info("%s:phy=%d, reg=0x%x, val=0x%x confirm..\n", __func__,
+	pr_info("%s:phy=%ld, reg=0x%lx, val=0x%x confirm..\n", __func__,
 		phy, reg, _mtk_mdio_read(eth, phy, reg));
 
 	return len;
@@ -371,7 +371,7 @@
 	int count = len;
 	unsigned long dbg_level = 0;
 
-	len = min(count, sizeof(buf) - 1);
+	len = min((size_t)count, sizeof(buf) - 1);
 	if (copy_from_user(buf, ptr, len))
 		return -EFAULT;
 
@@ -697,8 +697,6 @@
 
 int esw_cnt_read(struct seq_file *seq, void *v)
 {
-	unsigned int pkt_cnt = 0;
-	int i = 0;
 	struct mtk_eth *eth = g_eth;
 
 	gdm_cnt_read(eth);
diff --git a/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_eth_reset.c b/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_eth_reset.c
index 5ab74ad..66b4646 100644
--- a/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_eth_reset.c
+++ b/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_eth_reset.c
@@ -326,7 +326,7 @@
 {
 	static u32 err_cnt_qtx;
 	u32 err_flag = 0;
-	u32 i = 0, is_rx_fc = 0;
+	u32 is_rx_fc = 0;
 
 	u32 is_qfsm_hang = (mtk_r32(eth, MTK_QDMA_FSM) & 0xF00) != 0;
 	u32 is_qfwd_hang = mtk_r32(eth, MTK_QDMA_FWD_CNT) == 0;
@@ -624,7 +624,7 @@
 	switch (event) {
 	case MTK_WIFI_RESET_DONE:
 	case MTK_FE_STOP_TRAFFIC_DONE:
-		pr_info("%s rcv done event:%x\n", __func__, event);
+		pr_info("%s rcv done event:%lx\n", __func__, event);
 		mtk_rest_cnt--;
 		if(!mtk_rest_cnt) {
 			complete(&wait_ser_done);
@@ -642,7 +642,7 @@
 	case MTK_FE_STOP_TRAFFIC_DONE_FAIL:
 		mtk_stop_fail = true;
 		mtk_reset_flag = MTK_FE_START_RESET;
-		pr_info("%s rcv done event:%x\n", __func__, event);
+		pr_info("%s rcv done event:%lx\n", __func__, event);
 		complete(&wait_ser_done);
 		mtk_rest_cnt = mtk_wifi_num;
 		break;
diff --git a/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index 8f94fc5..78ac67e 100755
--- a/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -1053,11 +1053,11 @@
 		/* fall through */
 	case PHY_INTERFACE_MODE_1000BASEX:
 		phylink_set(mask, 1000baseX_Full);
-		/* fall through; */
+		/* fall through */
 	case PHY_INTERFACE_MODE_2500BASEX:
 		phylink_set(mask, 2500baseX_Full);
 		phylink_set(mask, 2500baseT_Full);
-		/* fall through; */
+		/* fall through */
 	case PHY_INTERFACE_MODE_GMII:
 	case PHY_INTERFACE_MODE_RGMII:
 	case PHY_INTERFACE_MODE_RGMII_ID:
@@ -3983,8 +3983,6 @@
 static void mtk_pending_work(struct work_struct *work)
 {
 	struct mtk_eth *eth = container_of(work, struct mtk_eth, pending_work);
-	struct device_node *phy_node = NULL;
-	struct mtk_mac *mac = NULL;
 	int err, i = 0;
 	unsigned long restart = 0;
 	u32 val = 0;
@@ -4357,7 +4355,6 @@
 static int mtk_set_eee(struct net_device *dev, struct ethtool_eee *eee)
 {
 	struct mtk_mac *mac = netdev_priv(dev);
-	struct mtk_eth *eth = mac->hw;
 
 	if (mac->type == MTK_GDM_TYPE) {
 		if (eee->tx_lpi_enabled && eee->tx_lpi_timer > 255)
diff --git a/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_usxgmii.c b/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_usxgmii.c
index e6007f6..a181fc2 100644
--- a/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_usxgmii.c
+++ b/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_usxgmii.c
@@ -792,7 +792,8 @@
 	unsigned int cur = offset;
 	unsigned int val1 = 0, val2 = 0, val3 = 0, val4 = 0;
 
-	pr_info("\n============ %s ============ pmap:%x\n", name, pmap);
+	pr_info("\n============ %s ============ pmap:%lx\n",
+		name, (unsigned long)pmap);
 	while (cur < offset + range) {
 		regmap_read(pmap, cur, &val1);
 		regmap_read(pmap, cur + 0x4, &val2);