Commit 20f48653 authored by Stephen Hemminger's avatar Stephen Hemminger

beceem: get rid of unnecessary inline usage

Many routines were tagged with inline_ but GCC does a better
job of deciding this.
Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
parent 26a0e39a
...@@ -28,7 +28,7 @@ typedef enum _E_CLASSIFIER_ACTION ...@@ -28,7 +28,7 @@ typedef enum _E_CLASSIFIER_ACTION
* Returns - Queue index for this SFID(If matched) * Returns - Queue index for this SFID(If matched)
Else Invalid Queue Index(If Not matched) Else Invalid Queue Index(If Not matched)
************************************************************/ ************************************************************/
__inline INT SearchSfid(PMINI_ADAPTER Adapter,UINT uiSfid) INT SearchSfid(PMINI_ADAPTER Adapter,UINT uiSfid)
{ {
INT iIndex=0; INT iIndex=0;
for(iIndex=(NO_OF_QUEUES-1); iIndex>=0; iIndex--) for(iIndex=(NO_OF_QUEUES-1); iIndex>=0; iIndex--)
...@@ -47,18 +47,20 @@ __inline INT SearchSfid(PMINI_ADAPTER Adapter,UINT uiSfid) ...@@ -47,18 +47,20 @@ __inline INT SearchSfid(PMINI_ADAPTER Adapter,UINT uiSfid)
* Returns - Queue index for the free SFID * Returns - Queue index for the free SFID
* Else returns Invalid Index. * Else returns Invalid Index.
****************************************************************/ ****************************************************************/
__inline INT SearchFreeSfid(PMINI_ADAPTER Adapter) static INT SearchFreeSfid(PMINI_ADAPTER Adapter)
{ {
UINT uiIndex=0; UINT uiIndex=0;
for(uiIndex=0; uiIndex < (NO_OF_QUEUES-1); uiIndex++) for(uiIndex=0; uiIndex < (NO_OF_QUEUES-1); uiIndex++)
if(Adapter->PackInfo[uiIndex].ulSFID==0) if(Adapter->PackInfo[uiIndex].ulSFID==0)
return uiIndex; return uiIndex;
return NO_OF_QUEUES+1; return NO_OF_QUEUES+1;
} }
__inline int SearchVcid(PMINI_ADAPTER Adapter,unsigned short usVcid) int SearchVcid(PMINI_ADAPTER Adapter,unsigned short usVcid)
{ {
int iIndex=0; int iIndex=0;
for(iIndex=(NO_OF_QUEUES-1);iIndex>=0;iIndex--) for(iIndex=(NO_OF_QUEUES-1);iIndex>=0;iIndex--)
if(Adapter->PackInfo[iIndex].usVCID_Value == usVcid) if(Adapter->PackInfo[iIndex].usVCID_Value == usVcid)
return iIndex; return iIndex;
...@@ -76,7 +78,7 @@ Input parameters: PMINI_ADAPTER Adapter - Adapter Context ...@@ -76,7 +78,7 @@ Input parameters: PMINI_ADAPTER Adapter - Adapter Context
Return: int :Classifier table index of matching entry Return: int :Classifier table index of matching entry
*/ */
__inline int SearchClsid(PMINI_ADAPTER Adapter,ULONG ulSFID,B_UINT16 uiClassifierID) static int SearchClsid(PMINI_ADAPTER Adapter,ULONG ulSFID,B_UINT16 uiClassifierID)
{ {
unsigned int uiClassifierIndex = 0; unsigned int uiClassifierIndex = 0;
for(uiClassifierIndex=0;uiClassifierIndex<MAX_CLASSIFIERS;uiClassifierIndex++) for(uiClassifierIndex=0;uiClassifierIndex<MAX_CLASSIFIERS;uiClassifierIndex++)
...@@ -94,7 +96,7 @@ __inline int SearchClsid(PMINI_ADAPTER Adapter,ULONG ulSFID,B_UINT16 uiClassifi ...@@ -94,7 +96,7 @@ __inline int SearchClsid(PMINI_ADAPTER Adapter,ULONG ulSFID,B_UINT16 uiClassifi
This routinue would search Free available Classifier entry in classifier table. This routinue would search Free available Classifier entry in classifier table.
@return free Classifier Entry index in classifier table for specified SF @return free Classifier Entry index in classifier table for specified SF
*/ */
static __inline int SearchFreeClsid(PMINI_ADAPTER Adapter /**Adapter Context*/ static int SearchFreeClsid(PMINI_ADAPTER Adapter /**Adapter Context*/
) )
{ {
unsigned int uiClassifierIndex = 0; unsigned int uiClassifierIndex = 0;
...@@ -1719,7 +1721,7 @@ static inline ULONG RestoreSFParam(PMINI_ADAPTER Adapter, ULONG ulAddrSFParamSet ...@@ -1719,7 +1721,7 @@ static inline ULONG RestoreSFParam(PMINI_ADAPTER Adapter, ULONG ulAddrSFParamSet
} }
static __inline ULONG StoreSFParam(PMINI_ADAPTER Adapter,PUCHAR pucSrcBuffer,ULONG ulAddrSFParamSet) static ULONG StoreSFParam(PMINI_ADAPTER Adapter,PUCHAR pucSrcBuffer,ULONG ulAddrSFParamSet)
{ {
UINT nBytesToWrite = sizeof(stServiceFlowParamSI); UINT nBytesToWrite = sizeof(stServiceFlowParamSI);
UINT uiRetVal =0; UINT uiRetVal =0;
......
...@@ -342,7 +342,7 @@ static void usbbcm_disconnect (struct usb_interface *intf) ...@@ -342,7 +342,7 @@ static void usbbcm_disconnect (struct usb_interface *intf)
} }
static __inline int AllocUsbCb(PS_INTERFACE_ADAPTER psIntfAdapter) static int AllocUsbCb(PS_INTERFACE_ADAPTER psIntfAdapter)
{ {
int i = 0; int i = 0;
for(i = 0; i < MAXIMUM_USB_TCB; i++) for(i = 0; i < MAXIMUM_USB_TCB; i++)
......
...@@ -117,7 +117,7 @@ err_exit : ...@@ -117,7 +117,7 @@ err_exit :
} }
static __inline PUSB_TCB GetBulkOutTcb(PS_INTERFACE_ADAPTER psIntfAdapter) static PUSB_TCB GetBulkOutTcb(PS_INTERFACE_ADAPTER psIntfAdapter)
{ {
PUSB_TCB pTcb = NULL; PUSB_TCB pTcb = NULL;
UINT index = 0; UINT index = 0;
...@@ -138,7 +138,7 @@ static __inline PUSB_TCB GetBulkOutTcb(PS_INTERFACE_ADAPTER psIntfAdapter) ...@@ -138,7 +138,7 @@ static __inline PUSB_TCB GetBulkOutTcb(PS_INTERFACE_ADAPTER psIntfAdapter)
return pTcb; return pTcb;
} }
static __inline int TransmitTcb(PS_INTERFACE_ADAPTER psIntfAdapter, PUSB_TCB pTcb, PVOID data, int len) static int TransmitTcb(PS_INTERFACE_ADAPTER psIntfAdapter, PUSB_TCB pTcb, PVOID data, int len)
{ {
struct urb *urb = pTcb->urb; struct urb *urb = pTcb->urb;
......
...@@ -75,7 +75,7 @@ static VOID UpdateTokenCount(register PMINI_ADAPTER Adapter) ...@@ -75,7 +75,7 @@ static VOID UpdateTokenCount(register PMINI_ADAPTER Adapter)
* Returns - The number of bytes allowed for transmission. * Returns - The number of bytes allowed for transmission.
* *
***********************************************************************/ ***********************************************************************/
static __inline ULONG GetSFTokenCount(PMINI_ADAPTER Adapter, PacketInfo *psSF) static ULONG GetSFTokenCount(PMINI_ADAPTER Adapter, PacketInfo *psSF)
{ {
BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, TOKEN_COUNTS, DBG_LVL_ALL, "IsPacketAllowedForFlow ===>"); BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, TOKEN_COUNTS, DBG_LVL_ALL, "IsPacketAllowedForFlow ===>");
/* Validate the parameters */ /* Validate the parameters */
...@@ -107,36 +107,12 @@ static __inline ULONG GetSFTokenCount(PMINI_ADAPTER Adapter, PacketInfo *psSF) ...@@ -107,36 +107,12 @@ static __inline ULONG GetSFTokenCount(PMINI_ADAPTER Adapter, PacketInfo *psSF)
return 0; return 0;
} }
static __inline void RemovePacketFromQueue(PacketInfo *pPackInfo , struct sk_buff *Packet)
{
struct sk_buff *psQueueCurrent=NULL, *psLastQueueNode=NULL;
psQueueCurrent = pPackInfo->FirstTxQueue;
while(psQueueCurrent)
{
if(Packet == psQueueCurrent)
{
if(psQueueCurrent == pPackInfo->FirstTxQueue)
{
pPackInfo->FirstTxQueue=psQueueCurrent->next;
if(psQueueCurrent==pPackInfo->LastTxQueue)
pPackInfo->LastTxQueue=NULL;
}
else
{
psLastQueueNode->next=psQueueCurrent->next;
}
break;
}
psLastQueueNode = psQueueCurrent;
psQueueCurrent=psQueueCurrent->next;
}
}
/** /**
@ingroup tx_functions @ingroup tx_functions
This function despatches packet from the specified queue. This function despatches packet from the specified queue.
@return Zero(success) or Negative value(failure) @return Zero(success) or Negative value(failure)
*/ */
static __inline INT SendPacketFromQueue(PMINI_ADAPTER Adapter,/**<Logical Adapter*/ static INT SendPacketFromQueue(PMINI_ADAPTER Adapter,/**<Logical Adapter*/
PacketInfo *psSF, /**<Queue identifier*/ PacketInfo *psSF, /**<Queue identifier*/
struct sk_buff* Packet) /**<Pointer to the packet to be sent*/ struct sk_buff* Packet) /**<Pointer to the packet to be sent*/
{ {
...@@ -180,8 +156,7 @@ static __inline INT SendPacketFromQueue(PMINI_ADAPTER Adapter,/**<Logical Adapte ...@@ -180,8 +156,7 @@ static __inline INT SendPacketFromQueue(PMINI_ADAPTER Adapter,/**<Logical Adapte
* Returns - None. * Returns - None.
* *
****************************************************************************/ ****************************************************************************/
static __inline VOID CheckAndSendPacketFromIndex static VOID CheckAndSendPacketFromIndex(PMINI_ADAPTER Adapter, PacketInfo *psSF)
(PMINI_ADAPTER Adapter, PacketInfo *psSF)
{ {
struct sk_buff *QueuePacket=NULL; struct sk_buff *QueuePacket=NULL;
char *pControlPacket = NULL; char *pControlPacket = NULL;
......
...@@ -519,7 +519,7 @@ void SendLinkDown(PMINI_ADAPTER Adapter) ...@@ -519,7 +519,7 @@ void SendLinkDown(PMINI_ADAPTER Adapter)
* *
* Returns - None. * Returns - None.
*******************************************************************/ *******************************************************************/
__inline VOID LinkMessage(PMINI_ADAPTER Adapter) VOID LinkMessage(PMINI_ADAPTER Adapter)
{ {
PLINK_REQUEST pstLinkRequest=NULL; PLINK_REQUEST pstLinkRequest=NULL;
BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, LINK_UP_MSG, DBG_LVL_ALL, "=====>"); BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, LINK_UP_MSG, DBG_LVL_ALL, "=====>");
...@@ -943,8 +943,7 @@ VOID DumpPackInfo(PMINI_ADAPTER Adapter) ...@@ -943,8 +943,7 @@ VOID DumpPackInfo(PMINI_ADAPTER Adapter)
} }
int reset_card_proc(PMINI_ADAPTER ps_adapter)
__inline int reset_card_proc(PMINI_ADAPTER ps_adapter)
{ {
int retval = STATUS_SUCCESS; int retval = STATUS_SUCCESS;
...@@ -1074,7 +1073,7 @@ err_exit : ...@@ -1074,7 +1073,7 @@ err_exit :
return retval; return retval;
} }
__inline int run_card_proc(PMINI_ADAPTER ps_adapter ) int run_card_proc(PMINI_ADAPTER ps_adapter )
{ {
unsigned int value=0; unsigned int value=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