Skip to content

Commit

Permalink
Staging: bcm: Remove typedef for _stLocalSFAddIndication and call dir…
Browse files Browse the repository at this point in the history
…ectly.

This patch removes typedef for _stLocalSFAddIndication,
and changes the name of the struct to
bcm_add_indication. In addition, any
calls to typedefs "stLocalSFAddIndication,
*pstLocalSFAddIndication, stLocalSFChangeRequest,
*pstLocalSFChangeRequest, stLocalSFChangeIndication,
or *pstLocalSFChangeIndication " are changed to
call the struct directly.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Kevin McKinney authored and Greg Kroah-Hartman committed Sep 26, 2012
1 parent ec5bb99 commit da529f0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 23 deletions.
14 changes: 7 additions & 7 deletions drivers/staging/bcm/CmHost.c
Original file line number Diff line number Diff line change
Expand Up @@ -1334,7 +1334,7 @@ static ULONG StoreSFParam(struct bcm_mini_adapter *Adapter, PUCHAR pucSrcBuffer,
ULONG StoreCmControlResponseMessage(struct bcm_mini_adapter *Adapter, PVOID pvBuffer, UINT *puBufferLength)
{
stLocalSFAddIndicationAlt *pstAddIndicationAlt = NULL;
stLocalSFAddIndication *pstAddIndication = NULL;
struct bcm_add_indication *pstAddIndication = NULL;
struct bcm_del_request *pstDeletionRequest;
UINT uiSearchRuleIndex;
ULONG ulSFID;
Expand Down Expand Up @@ -1365,7 +1365,7 @@ ULONG StoreCmControlResponseMessage(struct bcm_mini_adapter *Adapter, PVOID pvBu
}
/* For DSA_REQ, only up to "psfAuthorizedSet" parameter should be accessed by driver! */

pstAddIndication = kmalloc(sizeof(*pstAddIndication), GFP_KERNEL);
pstAddIndication = kmalloc(sizeof(struct bcm_add_indication), GFP_KERNEL);
if (pstAddIndication == NULL)
return 0;

Expand Down Expand Up @@ -1439,8 +1439,8 @@ ULONG StoreCmControlResponseMessage(struct bcm_mini_adapter *Adapter, PVOID pvBu

pstAddIndication->psfActiveSet = (stServiceFlowParamSI *)ntohl((ULONG)pstAddIndication->psfActiveSet);

(*puBufferLength) = sizeof(stLocalSFAddIndication);
*(stLocalSFAddIndication *)pvBuffer = *pstAddIndication;
(*puBufferLength) = sizeof(struct bcm_add_indication);
*(struct bcm_add_indication *)pvBuffer = *pstAddIndication;
kfree(pstAddIndication);
return 1;
}
Expand All @@ -1449,10 +1449,10 @@ static inline stLocalSFAddIndicationAlt
*RestoreCmControlResponseMessage(register struct bcm_mini_adapter *Adapter, register PVOID pvBuffer)
{
ULONG ulStatus = 0;
stLocalSFAddIndication *pstAddIndication = NULL;
struct bcm_add_indication *pstAddIndication = NULL;
stLocalSFAddIndicationAlt *pstAddIndicationDest = NULL;

pstAddIndication = (stLocalSFAddIndication *)(pvBuffer);
pstAddIndication = (struct bcm_add_indication *)(pvBuffer);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "=====>");
if ((pstAddIndication->u8Type == DSD_REQ) ||
(pstAddIndication->u8Type == DSD_RSP) ||
Expand Down Expand Up @@ -1644,7 +1644,7 @@ BOOLEAN CmControlResponseMessage(struct bcm_mini_adapter *Adapter, /* <Pointer
*/
pstAddIndication = RestoreCmControlResponseMessage(Adapter, pvBuffer);
if (pstAddIndication == NULL) {
ClearTargetDSXBuffer(Adapter, ((stLocalSFAddIndication *)pvBuffer)->u16TID, FALSE);
ClearTargetDSXBuffer(Adapter, ((struct bcm_add_indication *)pvBuffer)->u16TID, FALSE);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Error in restoring Service Flow param structure from DSx message");
return FALSE;
}
Expand Down
18 changes: 2 additions & 16 deletions drivers/staging/bcm/cntrl_SignalingInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,7 @@ typedef struct _stLocalSFAddRequest {

} stLocalSFAddRequest, *pstLocalSFAddRequest;

/*
* structure stLocalSFAddIndication
*/
typedef struct _stLocalSFAddIndication {
struct bcm_add_indication {
B_UINT8 u8Type; /* < Type */
B_UINT8 eConnectionDir; /* < Connection Direction */
/* brief 16 bit TID */
Expand All @@ -299,18 +296,7 @@ typedef struct _stLocalSFAddIndication {
B_UINT8 u8CC; /* <Confirmation Code */
B_UINT8 u8Padd; /* < 8-bit Padding */
B_UINT16 u16Padd; /* < 16 bit Padding */

} stLocalSFAddIndication;

typedef struct _stLocalSFAddIndication *pstLocalSFAddIndication;
/*
* structure stLocalSFChangeRequest is same as structure stLocalSFAddIndication
*/
typedef struct _stLocalSFAddIndication stLocalSFChangeRequest, *pstLocalSFChangeRequest;
/*
* structure stLocalSFChangeIndication is same as structure stLocalSFAddIndication
*/
typedef struct _stLocalSFAddIndication stLocalSFChangeIndication, *pstLocalSFChangeIndication;
};

struct bcm_del_request {
B_UINT8 u8Type; /* < Type */
Expand Down

0 comments on commit da529f0

Please sign in to comment.