Skip to content

Commit

Permalink
Staging: bcm: Remove typedef for _S_CLASSIFIER_ENTRY and call directly.
Browse files Browse the repository at this point in the history
This patch removes typedef for _S_CLASSIFIER_ENTRY, and
changes the name of the struct to bcm_phs_classifier_entry. In
addition, any calls to struct "_S_CLASSIFIER_ENTRY" are
changed to call directly.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Kevin McKinney authored and Greg Kroah-Hartman committed Jan 7, 2013
1 parent a700dbd commit 2212e93
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
8 changes: 4 additions & 4 deletions drivers/staging/bcm/PHSDefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,18 @@ typedef enum _E_CLASSIFIER_ENTRY_CONTEXT {
eOldClassifierRuleContext
} E_CLASSIFIER_ENTRY_CONTEXT;

typedef struct _S_CLASSIFIER_ENTRY {
struct bcm_phs_classifier_entry {
u8 bUsed;
u16 uiClassifierRuleId;
u8 u8PHSI;
S_PHS_RULE *pstPhsRule;
u8 bUnclassifiedPHSRule;
} S_CLASSIFIER_ENTRY;
};

struct bcm_phs_classifier_table {
u16 uiTotalClassifiers;
S_CLASSIFIER_ENTRY stActivePhsRulesList[MAX_PHSRULE_PER_SF];
S_CLASSIFIER_ENTRY stOldPhsRulesList[MAX_PHSRULE_PER_SF];
struct bcm_phs_classifier_entry stActivePhsRulesList[MAX_PHSRULE_PER_SF];
struct bcm_phs_classifier_entry stOldPhsRulesList[MAX_PHSRULE_PER_SF];
u16 uiOldestPhsRuleIndex;
};

Expand Down
32 changes: 16 additions & 16 deletions drivers/staging/bcm/PHSModule.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ static UINT CreateClassiferToPHSRuleMapping(B_UINT16 uiVcid,B_UINT16 uiClsId, s

static UINT CreateClassifierPHSRule(B_UINT16 uiClsId, struct bcm_phs_classifier_table *psaClassifiertable ,S_PHS_RULE *psPhsRule,E_CLASSIFIER_ENTRY_CONTEXT eClsContext,B_UINT8 u8AssociatedPHSI);

static UINT UpdateClassifierPHSRule(B_UINT16 uiClsId,S_CLASSIFIER_ENTRY *pstClassifierEntry, struct bcm_phs_classifier_table *psaClassifiertable ,S_PHS_RULE *psPhsRule,B_UINT8 u8AssociatedPHSI);
static UINT UpdateClassifierPHSRule(B_UINT16 uiClsId, struct bcm_phs_classifier_entry *pstClassifierEntry, struct bcm_phs_classifier_table *psaClassifiertable ,S_PHS_RULE *psPhsRule,B_UINT8 u8AssociatedPHSI);

static BOOLEAN ValidatePHSRuleComplete(S_PHS_RULE *psPhsRule);

static BOOLEAN DerefPhsRule(B_UINT16 uiClsId, struct bcm_phs_classifier_table *psaClassifiertable,S_PHS_RULE *pstPhsRule);

static UINT GetClassifierEntry(struct bcm_phs_classifier_table *pstClassifierTable,B_UINT32 uiClsid,E_CLASSIFIER_ENTRY_CONTEXT eClsContext, S_CLASSIFIER_ENTRY **ppstClassifierEntry);
static UINT GetClassifierEntry(struct bcm_phs_classifier_table *pstClassifierTable,B_UINT32 uiClsid,E_CLASSIFIER_ENTRY_CONTEXT eClsContext, struct bcm_phs_classifier_entry **ppstClassifierEntry);

static UINT GetPhsRuleEntry(struct bcm_phs_classifier_table *pstClassifierTable,B_UINT32 uiPHSI,E_CLASSIFIER_ENTRY_CONTEXT eClsContext,S_PHS_RULE **ppstPhsRule);

Expand Down Expand Up @@ -495,7 +495,7 @@ ULONG PhsDeletePHSRule(IN void* pvContext,IN B_UINT16 uiVcid,IN B_UINT8 u8PHSI)
if(0 == pstClassifierRulesTable->stActivePhsRulesList[nClsidIndex].pstPhsRule->u8RefCnt)
kfree(pstClassifierRulesTable->stActivePhsRulesList[nClsidIndex].pstPhsRule);
memset(&pstClassifierRulesTable->stActivePhsRulesList[nClsidIndex], 0,
sizeof(S_CLASSIFIER_ENTRY));
sizeof(struct bcm_phs_classifier_entry));
}
}
}
Expand Down Expand Up @@ -527,7 +527,7 @@ ULONG PhsDeleteClassifierRule(IN void* pvContext,IN B_UINT16 uiVcid ,IN B_UINT16
ULONG lStatus =0;
UINT nSFIndex =0, nClsidIndex =0 ;
struct bcm_phs_entry *pstServiceFlowEntry = NULL;
S_CLASSIFIER_ENTRY *pstClassifierEntry = NULL;
struct bcm_phs_classifier_entry *pstClassifierEntry = NULL;
struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
struct bcm_phs_extension *pDeviceExtension= (struct bcm_phs_extension *)pvContext;

Expand All @@ -554,7 +554,7 @@ ULONG PhsDeleteClassifierRule(IN void* pvContext,IN B_UINT16 uiVcid ,IN B_UINT16
kfree(pstClassifierEntry->pstPhsRule);

}
memset(pstClassifierEntry, 0, sizeof(S_CLASSIFIER_ENTRY));
memset(pstClassifierEntry, 0, sizeof(struct bcm_phs_classifier_entry));
}

nClsidIndex = GetClassifierEntry(pstServiceFlowEntry->pstClassifierTable,
Expand All @@ -563,7 +563,7 @@ ULONG PhsDeleteClassifierRule(IN void* pvContext,IN B_UINT16 uiVcid ,IN B_UINT16
if((nClsidIndex != PHS_INVALID_TABLE_INDEX) && (!pstClassifierEntry->bUnclassifiedPHSRule))
{
kfree(pstClassifierEntry->pstPhsRule);
memset(pstClassifierEntry, 0, sizeof(S_CLASSIFIER_ENTRY));
memset(pstClassifierEntry, 0, sizeof(struct bcm_phs_classifier_entry));
}
}
return lStatus;
Expand Down Expand Up @@ -624,7 +624,7 @@ ULONG PhsDeleteSFRules(IN void* pvContext,IN B_UINT16 uiVcid)
pstClassifierRulesTable->stActivePhsRulesList[nClsidIndex]
.pstPhsRule = NULL;
}
memset(&pstClassifierRulesTable->stActivePhsRulesList[nClsidIndex], 0, sizeof(S_CLASSIFIER_ENTRY));
memset(&pstClassifierRulesTable->stActivePhsRulesList[nClsidIndex], 0, sizeof(struct bcm_phs_classifier_entry));
if(pstClassifierRulesTable->stOldPhsRulesList[nClsidIndex].pstPhsRule)
{
if(pstClassifierRulesTable->stOldPhsRulesList[nClsidIndex]
Expand All @@ -638,7 +638,7 @@ ULONG PhsDeleteSFRules(IN void* pvContext,IN B_UINT16 uiVcid)
pstClassifierRulesTable->stOldPhsRulesList[nClsidIndex]
.pstPhsRule = NULL;
}
memset(&pstClassifierRulesTable->stOldPhsRulesList[nClsidIndex], 0, sizeof(S_CLASSIFIER_ENTRY));
memset(&pstClassifierRulesTable->stOldPhsRulesList[nClsidIndex], 0, sizeof(struct bcm_phs_classifier_entry));
}
}
pstServiceFlowEntry->bUsed = FALSE;
Expand Down Expand Up @@ -681,7 +681,7 @@ ULONG PhsCompress(IN void* pvContext,
{
UINT nSFIndex =0, nClsidIndex =0 ;
struct bcm_phs_entry *pstServiceFlowEntry = NULL;
S_CLASSIFIER_ENTRY *pstClassifierEntry = NULL;
struct bcm_phs_classifier_entry *pstClassifierEntry = NULL;
S_PHS_RULE *pstPhsRule = NULL;
ULONG lStatus =0;
struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
Expand Down Expand Up @@ -950,10 +950,10 @@ UINT GetServiceFlowEntry(IN struct bcm_phs_table *psServiceFlowTable,

UINT GetClassifierEntry(IN struct bcm_phs_classifier_table *pstClassifierTable,
IN B_UINT32 uiClsid,E_CLASSIFIER_ENTRY_CONTEXT eClsContext,
OUT S_CLASSIFIER_ENTRY **ppstClassifierEntry)
OUT struct bcm_phs_classifier_entry **ppstClassifierEntry)
{
int i;
S_CLASSIFIER_ENTRY *psClassifierRules = NULL;
struct bcm_phs_classifier_entry *psClassifierRules = NULL;
for(i=0;i<MAX_PHSRULE_PER_SF;i++)
{

Expand Down Expand Up @@ -986,7 +986,7 @@ static UINT GetPhsRuleEntry(IN struct bcm_phs_classifier_table *pstClassifierTab
OUT S_PHS_RULE **ppstPhsRule)
{
int i;
S_CLASSIFIER_ENTRY *pstClassifierRule = NULL;
struct bcm_phs_classifier_entry *pstClassifierRule = NULL;
for(i=0;i<MAX_PHSRULE_PER_SF;i++)
{
if(eClsContext == eActiveClassifierRuleContext)
Expand Down Expand Up @@ -1053,7 +1053,7 @@ UINT CreateClassiferToPHSRuleMapping(IN B_UINT16 uiVcid,
IN B_UINT16 uiClsId,IN struct bcm_phs_entry *pstServiceFlowEntry,
S_PHS_RULE *psPhsRule,B_UINT8 u8AssociatedPHSI)
{
S_CLASSIFIER_ENTRY *pstClassifierEntry = NULL;
struct bcm_phs_classifier_entry *pstClassifierEntry = NULL;
UINT uiStatus =PHS_SUCCESS;
UINT nClassifierIndex = 0;
struct bcm_phs_classifier_table *psaClassifiertable = NULL;
Expand Down Expand Up @@ -1146,7 +1146,7 @@ static UINT CreateClassifierPHSRule(IN B_UINT16 uiClsId,
{
UINT iClassifierIndex = 0;
BOOLEAN bFreeEntryFound = FALSE;
S_CLASSIFIER_ENTRY *psClassifierRules = NULL;
struct bcm_phs_classifier_entry *psClassifierRules = NULL;
UINT nStatus = PHS_SUCCESS;
struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, PHS_DISPATCH, DBG_LVL_ALL,"Inside CreateClassifierPHSRule");
Expand Down Expand Up @@ -1252,7 +1252,7 @@ static UINT CreateClassifierPHSRule(IN B_UINT16 uiClsId,


static UINT UpdateClassifierPHSRule(IN B_UINT16 uiClsId,
IN S_CLASSIFIER_ENTRY *pstClassifierEntry,
IN struct bcm_phs_classifier_entry *pstClassifierEntry,
struct bcm_phs_classifier_table *psaClassifiertable ,S_PHS_RULE *psPhsRule,
B_UINT8 u8AssociatedPHSI)
{
Expand Down Expand Up @@ -1346,7 +1346,7 @@ void DumpPhsRules(struct bcm_phs_extension *pDeviceExtension)
{
for(l=0;l<2;l++)
{
S_CLASSIFIER_ENTRY stClsEntry;
struct bcm_phs_classifier_entry stClsEntry;
if(l==0)
{
stClsEntry = stServFlowEntry.pstClassifierTable->stActivePhsRulesList[j];
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/bcm/hostmibs.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ INT ProcessGetHostMibs(struct bcm_mini_adapter *Adapter, struct bcm_host_stats_m
struct bcm_phs_entry *pstServiceFlowEntry = NULL;
S_PHS_RULE *pstPhsRule = NULL;
struct bcm_phs_classifier_table *pstClassifierTable = NULL;
S_CLASSIFIER_ENTRY *pstClassifierRule = NULL;
struct bcm_phs_classifier_entry *pstClassifierRule = NULL;
struct bcm_phs_extension *pDeviceExtension = (struct bcm_phs_extension *) &Adapter->stBCMPhsContext;

UINT nClassifierIndex = 0, nPhsTableIndex = 0, nSfIndex = 0, uiIndex = 0;
Expand Down

0 comments on commit 2212e93

Please sign in to comment.