From: Daniel Golle Date: Fri, 1 Mar 2024 00:06:47 +0000 (+0000) Subject: mediatek: mt7622: rtl8367c: add casts to fix compiler warnings X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=a86ff06d2e26cac388581b75b574bc5a9237c417;p=openwrt%2Fopenwrt.git mediatek: mt7622: rtl8367c: add casts to fix compiler warnings Use type casts to prevent compiler warnings which are going to turn into errors when we switch to Linux 6.6. In the long run we should try to get rid of this downstream driver now that RTL8367S is support by the rtl8365mb DSA driver. Signed-off-by: Daniel Golle --- diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/stat.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/stat.c index 3a328b0ca4..2fed6d9fc8 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/stat.c +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/stat.c @@ -140,7 +140,7 @@ rtk_api_ret_t rtk_stat_global_get(rtk_stat_global_type_t cntr_idx, rtk_stat_coun if (cntr_idx!=DOT1D_TP_LEARNED_ENTRY_DISCARDS_INDEX) return RT_ERR_STAT_INVALID_GLOBAL_CNTR; - if ((retVal = rtl8367c_getAsicMIBsCounter(0, cntr_idx, pCntr)) != RT_ERR_OK) + if ((retVal = rtl8367c_getAsicMIBsCounter(0, (RTL8367C_MIBCOUNTER)cntr_idx, pCntr)) != RT_ERR_OK) return retVal; return RT_ERR_OK; @@ -172,7 +172,7 @@ rtk_api_ret_t rtk_stat_global_getAll(rtk_stat_global_cntr_t *pGlobal_cntrs) if(NULL == pGlobal_cntrs) return RT_ERR_NULL_POINTER; - if ((retVal = rtl8367c_getAsicMIBsCounter(0,DOT1D_TP_LEARNED_ENTRY_DISCARDS_INDEX, &pGlobal_cntrs->dot1dTpLearnedEntryDiscards)) != RT_ERR_OK) + if ((retVal = rtl8367c_getAsicMIBsCounter(0, dot1dTpLearnedEntryDiscards, &pGlobal_cntrs->dot1dTpLearnedEntryDiscards)) != RT_ERR_OK) return retVal; return RT_ERR_OK; diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/vlan.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/vlan.c index f7480c4906..031eabf2ef 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/vlan.c +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/vlan.c @@ -950,7 +950,7 @@ rtk_api_ret_t rtk_vlan_protoAndPortBasedVlan_add(rtk_port_t port, rtk_vlan_proto { if ((retVal = rtl8367c_getAsicVlanProtocolBasedGroupData(i, &ppb_data_cfg)) != RT_ERR_OK) return retVal; - tmp = pInfo->frame_type; + tmp = (rtl8367c_provlan_frametype)pInfo->frame_type; if (ppb_data_cfg.etherType == pInfo->proto_type && ppb_data_cfg.frameType == tmp) { /*Already exist*/ @@ -976,7 +976,7 @@ rtk_api_ret_t rtk_vlan_protoAndPortBasedVlan_add(rtk_port_t port, rtk_vlan_proto else if (emptyframe_type; + ppb_data_cfg.frameType = (rtl8367c_provlan_frametype)pInfo->frame_type; ppb_data_cfg.etherType = pInfo->proto_type; if ((retVal = rtl8367c_setAsicVlanProtocolBasedGroupData(empty, &ppb_data_cfg)) != RT_ERR_OK) return retVal; @@ -1267,7 +1267,7 @@ rtk_api_ret_t rtk_vlan_tagMode_set(rtk_port_t port, rtk_vlan_tagMode_t tag_mode) if (tag_mode >= VLAN_TAG_MODE_END) return RT_ERR_PORT_ID; - if ((retVal = rtl8367c_setAsicVlanEgressTagMode(rtk_switch_port_L2P_get(port), tag_mode)) != RT_ERR_OK) + if ((retVal = rtl8367c_setAsicVlanEgressTagMode(rtk_switch_port_L2P_get(port), (rtl8367c_egtagmode)tag_mode)) != RT_ERR_OK) return retVal; return RT_ERR_OK;