mirror of
https://github.com/openwrt/openwrt.git
synced 2025-02-20 17:32:57 +00:00
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 <daniel@makrotopia.org>
This commit is contained in:
parent
7c468e5e64
commit
a86ff06d2e
@ -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;
|
||||
|
@ -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 (empty<RTL8367C_PROTOVLAN_GROUPNO)
|
||||
{
|
||||
/*No exist index, but have empty index*/
|
||||
ppb_data_cfg.frameType = pInfo->frame_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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user