Commit fc38bc1d authored by Matthias Beyer's avatar Matthias Beyer Committed by Greg Kroah-Hartman

Staging: bcm: PHSModule.c: Reduced indentation by using jump label in PhsDeleteSFRules()

Signed-off-by: default avatarMatthias Beyer <mail@beyermatthias.de>
Reviewed-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 93cc6ae8
...@@ -639,49 +639,51 @@ ULONG PhsDeleteSFRules(IN void *pvContext, IN B_UINT16 uiVcid) ...@@ -639,49 +639,51 @@ ULONG PhsDeleteSFRules(IN void *pvContext, IN B_UINT16 uiVcid)
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, PHS_DISPATCH, DBG_LVL_ALL, BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, PHS_DISPATCH, DBG_LVL_ALL,
"====>\n"); "====>\n");
if (pDeviceExtension) { if (!pDeviceExtension)
/* Retrieve the SFID Entry Index for requested Service Flow */ goto out;
nSFIndex = GetServiceFlowEntry(pDeviceExtension->pstServiceFlowPhsRulesTable,
uiVcid, &pstServiceFlowEntry);
if (nSFIndex == PHS_INVALID_TABLE_INDEX) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, PHS_DISPATCH,
DBG_LVL_ALL, "SFID Match Failed\n");
return ERR_SF_MATCH_FAIL;
}
pstClassifierRulesTable = pstServiceFlowEntry->pstClassifierTable; /* Retrieve the SFID Entry Index for requested Service Flow */
if (pstClassifierRulesTable) { nSFIndex = GetServiceFlowEntry(pDeviceExtension->pstServiceFlowPhsRulesTable,
for (nClsidIndex = 0; nClsidIndex < MAX_PHSRULE_PER_SF; nClsidIndex++) { uiVcid, &pstServiceFlowEntry);
if (pstClassifierRulesTable->stActivePhsRulesList[nClsidIndex].pstPhsRule) { if (nSFIndex == PHS_INVALID_TABLE_INDEX) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, PHS_DISPATCH,
DBG_LVL_ALL, "SFID Match Failed\n");
return ERR_SF_MATCH_FAIL;
}
if (pstClassifierRulesTable->stActivePhsRulesList[nClsidIndex].pstPhsRule->u8RefCnt) pstClassifierRulesTable = pstServiceFlowEntry->pstClassifierTable;
pstClassifierRulesTable->stActivePhsRulesList[nClsidIndex].pstPhsRule->u8RefCnt--; if (pstClassifierRulesTable) {
for (nClsidIndex = 0; nClsidIndex < MAX_PHSRULE_PER_SF; nClsidIndex++) {
if (pstClassifierRulesTable->stActivePhsRulesList[nClsidIndex].pstPhsRule) {
if (0 == pstClassifierRulesTable->stActivePhsRulesList[nClsidIndex].pstPhsRule->u8RefCnt) if (pstClassifierRulesTable->stActivePhsRulesList[nClsidIndex].pstPhsRule->u8RefCnt)
kfree(pstClassifierRulesTable->stActivePhsRulesList[nClsidIndex].pstPhsRule); pstClassifierRulesTable->stActivePhsRulesList[nClsidIndex].pstPhsRule->u8RefCnt--;
pstClassifierRulesTable->stActivePhsRulesList[nClsidIndex].pstPhsRule = NULL; if (0 == pstClassifierRulesTable->stActivePhsRulesList[nClsidIndex].pstPhsRule->u8RefCnt)
} kfree(pstClassifierRulesTable->stActivePhsRulesList[nClsidIndex].pstPhsRule);
memset(&pstClassifierRulesTable->stActivePhsRulesList[nClsidIndex],
0, sizeof(struct bcm_phs_classifier_entry)); pstClassifierRulesTable->stActivePhsRulesList[nClsidIndex].pstPhsRule = NULL;
if (pstClassifierRulesTable->stOldPhsRulesList[nClsidIndex].pstPhsRule) { }
memset(&pstClassifierRulesTable->stActivePhsRulesList[nClsidIndex],
0, sizeof(struct bcm_phs_classifier_entry));
if (pstClassifierRulesTable->stOldPhsRulesList[nClsidIndex].pstPhsRule) {
if (pstClassifierRulesTable->stOldPhsRulesList[nClsidIndex].pstPhsRule->u8RefCnt) if (pstClassifierRulesTable->stOldPhsRulesList[nClsidIndex].pstPhsRule->u8RefCnt)
pstClassifierRulesTable->stOldPhsRulesList[nClsidIndex].pstPhsRule->u8RefCnt--; pstClassifierRulesTable->stOldPhsRulesList[nClsidIndex].pstPhsRule->u8RefCnt--;
if (0 == pstClassifierRulesTable->stOldPhsRulesList[nClsidIndex].pstPhsRule->u8RefCnt) if (0 == pstClassifierRulesTable->stOldPhsRulesList[nClsidIndex].pstPhsRule->u8RefCnt)
kfree(pstClassifierRulesTable->stOldPhsRulesList[nClsidIndex].pstPhsRule); kfree(pstClassifierRulesTable->stOldPhsRulesList[nClsidIndex].pstPhsRule);
pstClassifierRulesTable->stOldPhsRulesList[nClsidIndex].pstPhsRule = NULL; pstClassifierRulesTable->stOldPhsRulesList[nClsidIndex].pstPhsRule = NULL;
}
memset(&pstClassifierRulesTable->stOldPhsRulesList[nClsidIndex],
0, sizeof(struct bcm_phs_classifier_entry));
} }
memset(&pstClassifierRulesTable->stOldPhsRulesList[nClsidIndex],
0, sizeof(struct bcm_phs_classifier_entry));
} }
pstServiceFlowEntry->bUsed = false;
pstServiceFlowEntry->uiVcid = 0;
} }
pstServiceFlowEntry->bUsed = false;
pstServiceFlowEntry->uiVcid = 0;
out:
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment