Use the normal type. Delete typedef INT Signed-off-by: Joe Perches <joe@xxxxxxxxxxx> --- drivers/staging/bcm/Adapter.h | 22 ++-- drivers/staging/bcm/Bcmchar.c | 14 +- drivers/staging/bcm/Bcmnet.c | 4 +- drivers/staging/bcm/CmHost.c | 10 +- drivers/staging/bcm/CmHost.h | 4 +- drivers/staging/bcm/HandleControlPacket.c | 2 +- drivers/staging/bcm/IPv6Protocol.c | 2 +- drivers/staging/bcm/InterfaceDld.c | 12 +- drivers/staging/bcm/InterfaceIdleMode.c | 2 +- drivers/staging/bcm/InterfaceIdleMode.h | 6 +- drivers/staging/bcm/InterfaceInit.c | 10 +- drivers/staging/bcm/InterfaceInit.h | 6 +- drivers/staging/bcm/InterfaceIsr.c | 4 +- drivers/staging/bcm/InterfaceIsr.h | 2 +- drivers/staging/bcm/InterfaceMisc.c | 20 ++-- drivers/staging/bcm/InterfaceMisc.h | 14 +- drivers/staging/bcm/InterfaceTx.c | 2 +- drivers/staging/bcm/InterfaceTx.h | 2 +- drivers/staging/bcm/LeakyBucket.c | 10 +- drivers/staging/bcm/Misc.c | 22 ++-- drivers/staging/bcm/Prototypes.h | 62 ++++---- drivers/staging/bcm/Qos.c | 12 +- drivers/staging/bcm/Transmit.c | 4 +- drivers/staging/bcm/Typedefs.h | 1 - drivers/staging/bcm/hostmibs.c | 2 +- drivers/staging/bcm/led_control.c | 24 ++-- drivers/staging/bcm/nvm.c | 222 ++++++++++++++-------------- drivers/staging/bcm/vendorspecificextn.c | 14 +- drivers/staging/bcm/vendorspecificextn.h | 14 +- 29 files changed, 262 insertions(+), 263 deletions(-) diff --git a/drivers/staging/bcm/Adapter.h b/drivers/staging/bcm/Adapter.h index aed13fb..b4aca41 100644 --- a/drivers/staging/bcm/Adapter.h +++ b/drivers/staging/bcm/Adapter.h @@ -250,7 +250,7 @@ typedef struct _PER_TARANG_DATA { struct _MINI_ADAPTER * Adapter; struct sk_buff* RxAppControlHead; struct sk_buff* RxAppControlTail; - volatile INT AppCtrlQueueLen; + volatile int AppCtrlQueueLen; BOOLEAN MacTracingEnabled; BOOLEAN bApplicationToExit; S_MIBS_DROPPED_APP_CNTRL_MESSAGES stDroppedAppCntrlMsgs; @@ -347,9 +347,9 @@ typedef struct _STTARGETDSXBUFFER { BOOLEAN valid; }STTARGETDSXBUFFER, *PSTTARGETDSXBUFFER; -typedef INT (*FP_FLASH_WRITE)(struct _MINI_ADAPTER*, UINT, PVOID); +typedef int (*FP_FLASH_WRITE)(struct _MINI_ADAPTER*, UINT, PVOID); -typedef INT (*FP_FLASH_WRITE_STATUS)(struct _MINI_ADAPTER*, UINT, PVOID); +typedef int (*FP_FLASH_WRITE_STATUS)(struct _MINI_ADAPTER*, UINT, PVOID); /** Driver adapter data structure @@ -361,7 +361,7 @@ struct _MINI_ADAPTER { CHAR *caDsxReqResp; atomic_t ApplicationRunning; - volatile INT CtrlQueueLen; + volatile int CtrlQueueLen; atomic_t AppCtrlQueueLen; BOOLEAN AppCtrlQueueOverFlow; atomic_t CurrentApplicationCount; @@ -441,7 +441,7 @@ struct _MINI_ADAPTER { BOOLEAN DeviceAccess; BOOLEAN bIsAutoCorrectEnabled; BOOLEAN bDDRInitDone; - INT DDRSetting; + int DDRSetting; ULONG ulPowerSaveMode; spinlock_t txtransmitlock; B_UINT8 txtransmit_running; @@ -463,14 +463,14 @@ struct _MINI_ADAPTER { int (*bcm_file_readback_from_chip)( PVOID, struct file *, unsigned int); - INT (*interface_rdm)(PVOID, + int (*interface_rdm)(PVOID, UINT , PVOID , - INT); - INT (*interface_wrm)(PVOID, + int); + int (*interface_wrm)(PVOID, UINT , PVOID , - INT); + int); int (*interface_transmit)(PVOID, PVOID , UINT); BOOLEAN IdleMode; BOOLEAN bDregRequestSentInIdleMode; @@ -530,7 +530,7 @@ struct _MINI_ADAPTER { BOOLEAN bSigCorrupted ; //this should be set who so ever want to change the Headers. after Wrtie it should be reset immediately. BOOLEAN bHeaderChangeAllowed ; - INT SelectedChip ; + int SelectedChip; BOOLEAN bEndPointHalted; //while bFlashRawRead will be true, Driver ignore map lay out and consider flash as of without any map. BOOLEAN bFlashRawRead; @@ -577,7 +577,7 @@ typedef struct _DDR_SETTING { UINT ulRegValue; }DDR_SETTING, *PDDR_SETTING; typedef DDR_SETTING DDR_SET_NODE, *PDDR_SET_NODE; -INT +int InitAdapter(PMINI_ADAPTER psAdapter); // ===================================================================== diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index 2892c86..d974f04 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -154,7 +154,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) PPER_TARANG_DATA pTarang = filp->private_data; void __user *argp = (void __user *)arg; PMINI_ADAPTER Adapter = pTarang->Adapter; - INT Status = STATUS_FAILURE; + int Status = STATUS_FAILURE; int timeout = 0; IOCTL_BUFFER IoBuffer; int bytes; @@ -952,7 +952,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) break; case IOCTL_CHIP_RESET: { - INT NVMAccess = down_trylock(&Adapter->NVMRdmWrmLock); + int NVMAccess = down_trylock(&Adapter->NVMRdmWrmLock); if (NVMAccess) { pr_info("IOCTL_BCM_CHIP_RESET not allowed as EEPROM Read/Write is in progress\n"); return -EACCES; @@ -1720,7 +1720,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) return -EFAULT; } - Status = copy_from_user(&eFlash2xSectionVal, IoBuffer.InputBuffer, sizeof(INT)); + Status = copy_from_user(&eFlash2xSectionVal, IoBuffer.InputBuffer, sizeof(int)); if (Status) { pr_info("Copy of flash section val failed\n"); return -EFAULT; @@ -1891,7 +1891,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) pr_info("Copy of IOCTL BUFFER failed\n"); return -EFAULT; } - Status = copy_from_user(&eFlash2xSectionVal, IoBuffer.InputBuffer, sizeof(INT)); + Status = copy_from_user(&eFlash2xSectionVal, IoBuffer.InputBuffer, sizeof(int)); if (Status) { pr_info("Copy of flash section val failed\n"); return -EFAULT; @@ -1924,9 +1924,9 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) case IOCTL_BCM_NVM_RAW_READ: { NVM_READWRITE stNVMRead; - INT NOB ; - INT BuffSize ; - INT ReadOffset = 0; + int NOB; + int BuffSize; + int ReadOffset = 0; UINT ReadBytes = 0 ; PUCHAR pReadBuff; void __user *OutPutBuff; diff --git a/drivers/staging/bcm/Bcmnet.c b/drivers/staging/bcm/Bcmnet.c index eaf823e..75a1d89 100644 --- a/drivers/staging/bcm/Bcmnet.c +++ b/drivers/staging/bcm/Bcmnet.c @@ -2,7 +2,7 @@ struct net_device *gblpnetdev; -static INT bcm_open(struct net_device *dev) +static int bcm_open(struct net_device *dev) { PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(dev); @@ -26,7 +26,7 @@ static INT bcm_open(struct net_device *dev) return 0; } -static INT bcm_close(struct net_device *dev) +static int bcm_close(struct net_device *dev) { PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(dev); diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index 4743a45..079934e 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -30,9 +30,9 @@ static ULONG GetNextTargetBufferLocation(PMINI_ADAPTER Adapter, B_UINT16 tid); * Returns - Queue index for this SFID(If matched) Else Invalid Queue Index(If Not matched) ************************************************************/ -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--) if (Adapter->PackInfo[iIndex].ulSFID==uiSfid) return iIndex; @@ -49,7 +49,7 @@ INT SearchSfid(PMINI_ADAPTER Adapter, UINT uiSfid) * Returns - Queue index for the free SFID * Else returns Invalid Index. ****************************************************************/ -static INT SearchFreeSfid(PMINI_ADAPTER Adapter) +static int SearchFreeSfid(PMINI_ADAPTER Adapter) { UINT uiIndex=0; @@ -2120,7 +2120,7 @@ static ULONG GetNextTargetBufferLocation(PMINI_ADAPTER Adapter, B_UINT16 tid) } -INT AllocAdapterDsxBuffer(PMINI_ADAPTER Adapter) +int AllocAdapterDsxBuffer(PMINI_ADAPTER Adapter) { /* //Need to Allocate memory to contain the SUPER Large structures @@ -2132,7 +2132,7 @@ INT AllocAdapterDsxBuffer(PMINI_ADAPTER Adapter) return 0; } -INT FreeAdapterDsxBuffer(PMINI_ADAPTER Adapter) +int FreeAdapterDsxBuffer(PMINI_ADAPTER Adapter) { kfree(Adapter->caDsxReqResp); return 0; diff --git a/drivers/staging/bcm/CmHost.h b/drivers/staging/bcm/CmHost.h index 2a7a8a9..b523041 100644 --- a/drivers/staging/bcm/CmHost.h +++ b/drivers/staging/bcm/CmHost.h @@ -150,9 +150,9 @@ typedef struct stLocalSFChangeIndicationAlt{ ULONG StoreCmControlResponseMessage(PMINI_ADAPTER Adapter, PVOID pvBuffer, UINT *puBufferLength); -INT AllocAdapterDsxBuffer(PMINI_ADAPTER Adapter); +int AllocAdapterDsxBuffer(PMINI_ADAPTER Adapter); -INT FreeAdapterDsxBuffer(PMINI_ADAPTER Adapter); +int FreeAdapterDsxBuffer(PMINI_ADAPTER Adapter); ULONG SetUpTargetDsxBuffers(PMINI_ADAPTER Adapter); BOOLEAN CmControlResponseMessage(PMINI_ADAPTER Adapter, PVOID pvBuffer); diff --git a/drivers/staging/bcm/HandleControlPacket.c b/drivers/staging/bcm/HandleControlPacket.c index 583d081..0b8b8e7 100644 --- a/drivers/staging/bcm/HandleControlPacket.c +++ b/drivers/staging/bcm/HandleControlPacket.c @@ -208,7 +208,7 @@ int control_packet_handler(PMINI_ADAPTER Adapter /* pointer to adapter object*/) return STATUS_SUCCESS; } -INT flushAllAppQ(void) +int flushAllAppQ(void) { PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); PPER_TARANG_DATA pTarang = NULL; diff --git a/drivers/staging/bcm/IPv6Protocol.c b/drivers/staging/bcm/IPv6Protocol.c index 586b0f9..b218d37 100644 --- a/drivers/staging/bcm/IPv6Protocol.c +++ b/drivers/staging/bcm/IPv6Protocol.c @@ -232,7 +232,7 @@ unsigned short IpVersion6(PMINI_ADAPTER Adapter, /**< Pointer to the driver cont }while (0); if (TRUE==bClassificationSucceed) { - INT iMatchedSFQueueIndex = 0; + int iMatchedSFQueueIndex = 0; iMatchedSFQueueIndex = SearchSfid(Adapter, pstClassifierRule->ulSFID); if (iMatchedSFQueueIndex >= NO_OF_QUEUES) { bClassificationSucceed = FALSE; diff --git a/drivers/staging/bcm/InterfaceDld.c b/drivers/staging/bcm/InterfaceDld.c index 314082a..1534745 100644 --- a/drivers/staging/bcm/InterfaceDld.c +++ b/drivers/staging/bcm/InterfaceDld.c @@ -57,7 +57,7 @@ int InterfaceFileReadbackFromChip(PVOID arg, struct file *flp, unsigned int on_c int errno = 0, len = 0, is_config_file = 0; loff_t pos = 0; static int fw_down; - INT Status = STATUS_SUCCESS; + int Status = STATUS_SUCCESS; PS_INTERFACE_ADAPTER psIntfAdapter = (PS_INTERFACE_ADAPTER)arg; int bytes; @@ -307,7 +307,7 @@ error: return retval; } -static INT buffDnld(PMINI_ADAPTER Adapter, PUCHAR mappedbuffer, UINT u32FirmwareLength, ULONG u32StartingAddress) +static int buffDnld(PMINI_ADAPTER Adapter, PUCHAR mappedbuffer, UINT u32FirmwareLength, ULONG u32StartingAddress) { unsigned int len = 0; int retval = STATUS_SUCCESS; @@ -329,10 +329,10 @@ static INT buffDnld(PMINI_ADAPTER Adapter, PUCHAR mappedbuffer, UINT u32Firmware return retval; } -static INT buffRdbkVerify(PMINI_ADAPTER Adapter, PUCHAR mappedbuffer, UINT u32FirmwareLength, ULONG u32StartingAddress) +static int buffRdbkVerify(PMINI_ADAPTER Adapter, PUCHAR mappedbuffer, UINT u32FirmwareLength, ULONG u32StartingAddress) { UINT len = u32FirmwareLength; - INT retval = STATUS_SUCCESS; + int retval = STATUS_SUCCESS; PUCHAR readbackbuff = kzalloc(MAX_TRANSFER_CTRL_BYTE_USB, GFP_KERNEL); int bytes; @@ -366,9 +366,9 @@ static INT buffRdbkVerify(PMINI_ADAPTER Adapter, PUCHAR mappedbuffer, UINT u32Fi return retval; } -INT buffDnldVerify(PMINI_ADAPTER Adapter, unsigned char *mappedbuffer, unsigned int u32FirmwareLength, unsigned long u32StartingAddress) +int buffDnldVerify(PMINI_ADAPTER Adapter, unsigned char *mappedbuffer, unsigned int u32FirmwareLength, unsigned long u32StartingAddress) { - INT status = STATUS_SUCCESS; + int status = STATUS_SUCCESS; status = buffDnld(Adapter, mappedbuffer, u32FirmwareLength, u32StartingAddress); if (status != STATUS_SUCCESS) { diff --git a/drivers/staging/bcm/InterfaceIdleMode.c b/drivers/staging/bcm/InterfaceIdleMode.c index 3b4a45c..2964522 100644 --- a/drivers/staging/bcm/InterfaceIdleMode.c +++ b/drivers/staging/bcm/InterfaceIdleMode.c @@ -256,7 +256,7 @@ int InterfaceIdleModeWakeup(PMINI_ADAPTER Adapter) void InterfaceHandleShutdownModeWakeup(PMINI_ADAPTER Adapter) { unsigned int uiRegVal = 0; - INT Status = 0; + int Status = 0; int bytes; if (Adapter->ulPowerSaveMode == DEVICE_POWERSAVE_MODE_AS_MANUAL_CLOCK_GATING) { diff --git a/drivers/staging/bcm/InterfaceIdleMode.h b/drivers/staging/bcm/InterfaceIdleMode.h index e7cf401..493a009 100644 --- a/drivers/staging/bcm/InterfaceIdleMode.h +++ b/drivers/staging/bcm/InterfaceIdleMode.h @@ -1,13 +1,13 @@ #ifndef _INTERFACE_IDLEMODE_H #define _INTERFACE_IDLEMODE_H -INT InterfaceIdleModeWakeup(PMINI_ADAPTER Adapter); +int InterfaceIdleModeWakeup(PMINI_ADAPTER Adapter); -INT InterfaceIdleModeRespond(PMINI_ADAPTER Adapter, unsigned int *puiBuffer); +int InterfaceIdleModeRespond(PMINI_ADAPTER Adapter, unsigned int *puiBuffer); VOID InterfaceWriteIdleModeWakePattern(PMINI_ADAPTER Adapter); -INT InterfaceWakeUp(PMINI_ADAPTER Adapter); +int InterfaceWakeUp(PMINI_ADAPTER Adapter); VOID InterfaceHandleShutdownModeWakeup(PMINI_ADAPTER Adapter); #endif diff --git a/drivers/staging/bcm/InterfaceInit.c b/drivers/staging/bcm/InterfaceInit.c index 40a517a..de374c3 100644 --- a/drivers/staging/bcm/InterfaceInit.c +++ b/drivers/staging/bcm/InterfaceInit.c @@ -473,14 +473,14 @@ static int InterfaceAdapterInit(PS_INTERFACE_ADAPTER psIntfAdapter) bcm_dbg(psIntfAdapter->psAdapter, INITEXIT, DRV_ENTRY, ALL, "Interface altsetting failed or modem is configured to Full Speed, hence will work on default setting 0\n"); /* - * If Modem is high speed device EP2 should be INT OUT End point + * If Modem is high speed device EP2 should be int OUT End point * If Mode is FS then EP2 should be bulk end point */ if (((psIntfAdapter->bHighSpeedDevice == TRUE) && (bcm_usb_endpoint_is_int_out(endpoint) == FALSE)) || ((psIntfAdapter->bHighSpeedDevice == FALSE) && (bcm_usb_endpoint_is_bulk_out(endpoint) == FALSE))) { bcm_dbg(psIntfAdapter->psAdapter, INITEXIT, DRV_ENTRY, ALL, "Configuring the EEPROM\n"); - /* change the EP2, EP4 to INT OUT end point */ + /* change the EP2, EP4 to int OUT end point */ ConfigureEndPointTypesThroughEEPROM(psIntfAdapter->psAdapter); /* @@ -497,10 +497,10 @@ static int InterfaceAdapterInit(PS_INTERFACE_ADAPTER psIntfAdapter) } if ((psIntfAdapter->bHighSpeedDevice == FALSE) && bcm_usb_endpoint_is_bulk_out(endpoint)) { - /* Once BULK is selected in FS mode. Revert it back to INT. Else USB_IF will fail. */ + /* Once BULK is selected in FS mode. Revert it back to int. Else USB_IF will fail. */ UINT _uiData = ntohl(EP2_CFG_INT); bcm_dbg(psIntfAdapter->psAdapter, INITEXIT, DRV_ENTRY, ALL, - "Reverting Bulk to INT as it is in Full Speed mode.\n"); + "Reverting Bulk to int as it is in Full Speed mode.\n"); BeceemEEPROMBulkWrite(psIntfAdapter->psAdapter, (PUCHAR)&_uiData, 0x136, 4, TRUE); } } else { @@ -511,7 +511,7 @@ static int InterfaceAdapterInit(PS_INTERFACE_ADAPTER psIntfAdapter) if (bcm_usb_endpoint_is_int_out(endpoint) == FALSE) { bcm_dbg(psIntfAdapter->psAdapter, INITEXIT, DRV_ENTRY, ALL, "Dongle does not have BCM16 Fix.\n"); - /* change the EP2, EP4 to INT OUT end point and use EP4 in altsetting */ + /* change the EP2, EP4 to int OUT end point and use EP4 in altsetting */ ConfigureEndPointTypesThroughEEPROM(psIntfAdapter->psAdapter); /* diff --git a/drivers/staging/bcm/InterfaceInit.h b/drivers/staging/bcm/InterfaceInit.h index af537bb..342d82c 100644 --- a/drivers/staging/bcm/InterfaceInit.h +++ b/drivers/staging/bcm/InterfaceInit.h @@ -17,10 +17,10 @@ #define BCM_USB_MINOR_BASE 192 -INT InterfaceInitialize(void); +int InterfaceInitialize(void); -INT InterfaceExit(void); +int InterfaceExit(void); -INT usbbcm_worker_thread(PS_INTERFACE_ADAPTER psIntfAdapter); +int usbbcm_worker_thread(PS_INTERFACE_ADAPTER psIntfAdapter); #endif diff --git a/drivers/staging/bcm/InterfaceIsr.c b/drivers/staging/bcm/InterfaceIsr.c index 642d512..f798d5c 100644 --- a/drivers/staging/bcm/InterfaceIsr.c +++ b/drivers/staging/bcm/InterfaceIsr.c @@ -148,9 +148,9 @@ int CreateInterruptUrb(PS_INTERFACE_ADAPTER psIntfAdapter) } -INT StartInterruptUrb(PS_INTERFACE_ADAPTER psIntfAdapter) +int StartInterruptUrb(PS_INTERFACE_ADAPTER psIntfAdapter) { - INT status = 0; + int status = 0; if ( FALSE == psIntfAdapter->psAdapter->device_removed && FALSE == psIntfAdapter->psAdapter->bEndPointHalted && diff --git a/drivers/staging/bcm/InterfaceIsr.h b/drivers/staging/bcm/InterfaceIsr.h index 2960136..8c73c99 100644 --- a/drivers/staging/bcm/InterfaceIsr.h +++ b/drivers/staging/bcm/InterfaceIsr.h @@ -4,7 +4,7 @@ int CreateInterruptUrb(PS_INTERFACE_ADAPTER psIntfAdapter); -INT StartInterruptUrb(PS_INTERFACE_ADAPTER psIntfAdapter); +int StartInterruptUrb(PS_INTERFACE_ADAPTER psIntfAdapter); VOID InterfaceEnableInterrupt(PMINI_ADAPTER Adapter); diff --git a/drivers/staging/bcm/InterfaceMisc.c b/drivers/staging/bcm/InterfaceMisc.c index 5616bb1..8093464 100644 --- a/drivers/staging/bcm/InterfaceMisc.c +++ b/drivers/staging/bcm/InterfaceMisc.c @@ -1,9 +1,9 @@ #include "headers.h" -INT InterfaceRDM(PS_INTERFACE_ADAPTER psIntfAdapter, +int InterfaceRDM(PS_INTERFACE_ADAPTER psIntfAdapter, UINT addr, PVOID buff, - INT len) + int len) { int bytes; unsigned short usRetries = 0; @@ -62,10 +62,10 @@ INT InterfaceRDM(PS_INTERFACE_ADAPTER psIntfAdapter, return bytes; } -INT InterfaceWRM(PS_INTERFACE_ADAPTER psIntfAdapter, +int InterfaceWRM(PS_INTERFACE_ADAPTER psIntfAdapter, UINT addr, PVOID buff, - INT len) + int len) { int retval = 0; unsigned short usRetries = 0; @@ -127,26 +127,26 @@ INT InterfaceWRM(PS_INTERFACE_ADAPTER psIntfAdapter, } } -INT BcmRDM(PVOID arg, +int BcmRDM(PVOID arg, UINT addr, PVOID buff, - INT len) + int len) { return InterfaceRDM((PS_INTERFACE_ADAPTER)arg, addr, buff, len); } -INT BcmWRM(PVOID arg, +int BcmWRM(PVOID arg, UINT addr, PVOID buff, - INT len) + int len) { return InterfaceWRM((PS_INTERFACE_ADAPTER)arg, addr, buff, len); } -INT Bcm_clear_halt_of_endpoints(PMINI_ADAPTER Adapter) +int Bcm_clear_halt_of_endpoints(PMINI_ADAPTER Adapter) { PS_INTERFACE_ADAPTER psIntfAdapter = (PS_INTERFACE_ADAPTER)(Adapter->pvInterfaceAdapter); - INT status = STATUS_SUCCESS; + int status = STATUS_SUCCESS; /* * usb_clear_halt - tells device to clear endpoint halt/stall condition diff --git a/drivers/staging/bcm/InterfaceMisc.h b/drivers/staging/bcm/InterfaceMisc.h index 9daaa22..6c0d9b5 100644 --- a/drivers/staging/bcm/InterfaceMisc.h +++ b/drivers/staging/bcm/InterfaceMisc.h @@ -1,17 +1,17 @@ #ifndef __INTERFACE_MISC_H #define __INTERFACE_MISC_H -INT +int InterfaceRDM(PS_INTERFACE_ADAPTER psIntfAdapter, UINT addr, PVOID buff, - INT len); + int len); -INT +int InterfaceWRM(PS_INTERFACE_ADAPTER psIntfAdapter, UINT addr, PVOID buff, - INT len); + int len); int InterfaceFileDownload( PVOID psIntfAdapter, @@ -26,14 +26,14 @@ int InterfaceFileReadbackFromChip( PVOID psIntfAdapter, int BcmRDM(PVOID arg, UINT addr, PVOID buff, - INT len); + int len); int BcmWRM(PVOID arg, UINT addr, PVOID buff, - INT len); + int len); -INT Bcm_clear_halt_of_endpoints(PMINI_ADAPTER Adapter); +int Bcm_clear_halt_of_endpoints(PMINI_ADAPTER Adapter); VOID Bcm_kill_all_URBs(PS_INTERFACE_ADAPTER psIntfAdapter); diff --git a/drivers/staging/bcm/InterfaceTx.c b/drivers/staging/bcm/InterfaceTx.c index 61b288b..194682f 100644 --- a/drivers/staging/bcm/InterfaceTx.c +++ b/drivers/staging/bcm/InterfaceTx.c @@ -140,7 +140,7 @@ static int TransmitTcb(PS_INTERFACE_ADAPTER psIntfAdapter, PUSB_TCB pTcb, PVOID bcm_dbg(psIntfAdapter->psAdapter, TX, NEXT_SEND, ALL, "Sending Bulk out packet\n"); - //For T3B, INT OUT end point will be used as bulk out end point + //For T3B, int OUT end point will be used as bulk out end point if ((psIntfAdapter->psAdapter->chip_id == T3B) && (psIntfAdapter->bHighSpeedDevice == TRUE)) { usb_fill_int_urb(urb, psIntfAdapter->udev, psIntfAdapter->sBulkOut.bulk_out_pipe, diff --git a/drivers/staging/bcm/InterfaceTx.h b/drivers/staging/bcm/InterfaceTx.h index 9fa7c35..50c6a90 100644 --- a/drivers/staging/bcm/InterfaceTx.h +++ b/drivers/staging/bcm/InterfaceTx.h @@ -1,6 +1,6 @@ #ifndef _INTERFACE_TX_H #define _INTERFACE_TX_H -INT InterfaceTransmitPacket(PVOID arg, PVOID data, UINT len); +int InterfaceTransmitPacket(PVOID arg, PVOID data, UINT len); #endif diff --git a/drivers/staging/bcm/LeakyBucket.c b/drivers/staging/bcm/LeakyBucket.c index 3c4a266..24e251f 100644 --- a/drivers/staging/bcm/LeakyBucket.c +++ b/drivers/staging/bcm/LeakyBucket.c @@ -18,7 +18,7 @@ static VOID UpdateTokenCount(register PMINI_ADAPTER Adapter) { ULONG liCurrentTime; - INT i = 0; + int i = 0; struct timeval tv; bcm_dbg(Adapter, TX, TOKEN_COUNTS, ALL, "=====>\n"); @@ -107,11 +107,11 @@ static ULONG GetSFTokenCount(PMINI_ADAPTER Adapter, PacketInfo *psSF) This function despatches packet from the specified queue. @return Zero(success) or Negative value(failure) */ -static INT SendPacketFromQueue(PMINI_ADAPTER Adapter,/**<Logical Adapter*/ +static int SendPacketFromQueue(PMINI_ADAPTER Adapter,/**<Logical Adapter*/ PacketInfo *psSF, /**<Queue identifier*/ struct sk_buff* Packet) /**<Pointer to the packet to be sent*/ { - INT Status=STATUS_FAILURE; + int Status = STATUS_FAILURE; UINT uiIndex =0, PktLen = 0; bcm_dbg(Adapter, TX, SEND_QUEUE, ALL, "=====>\n"); @@ -153,8 +153,8 @@ static VOID CheckAndSendPacketFromIndex(PMINI_ADAPTER Adapter, PacketInfo *psSF) { struct sk_buff *QueuePacket=NULL; char *pControlPacket = NULL; - INT Status=0; - int iPacketLen=0; + int Status = 0; + int iPacketLen = 0; bcm_dbg(Adapter, TX, TX_PACKETS, ALL, diff --git a/drivers/staging/bcm/Misc.c b/drivers/staging/bcm/Misc.c index 2fbcbff..d671d55 100644 --- a/drivers/staging/bcm/Misc.c +++ b/drivers/staging/bcm/Misc.c @@ -24,10 +24,10 @@ static VOID default_wimax_protocol_initialize(PMINI_ADAPTER Adapter) return; } -INT InitAdapter(PMINI_ADAPTER psAdapter) +int InitAdapter(PMINI_ADAPTER psAdapter) { int i = 0; - INT Status = STATUS_SUCCESS; + int Status = STATUS_SUCCESS; bcm_dbg(psAdapter, INITEXIT, MP_INIT, ALL, "Initialising Adapter = %p\n", psAdapter); @@ -248,10 +248,10 @@ exit_download: * Logical Adapter * Control Packet Buffer */ -INT CopyBufferToControlPacket(PMINI_ADAPTER Adapter, PVOID ioBuffer) +int CopyBufferToControlPacket(PMINI_ADAPTER Adapter, PVOID ioBuffer) { PLEADER pLeader = NULL; - INT Status = 0; + int Status = 0; unsigned char *ctrl_buff = NULL; UINT pktlen = 0; PLINK_REQUEST pLinkReq = NULL; @@ -626,7 +626,7 @@ VOID LinkControlResponseMessage(PMINI_ADAPTER Adapter, PUCHAR pucBuffer) void SendIdleModeResponse(PMINI_ADAPTER Adapter) { - INT status = 0, NVMAccess = 0, lowPwrAbortMsg = 0; + int status = 0, NVMAccess = 0, lowPwrAbortMsg = 0; struct timeval tv; CONTROL_MESSAGE stIdleResponse = {{0} }; memset(&tv, 0, sizeof(tv)); @@ -667,7 +667,7 @@ void SendIdleModeResponse(PMINI_ADAPTER Adapter) /* Wait for the LED to TURN OFF before sending ACK response */ if (Adapter->LEDInfo.led_thread_running & BCM_LED_THREAD_RUNNING_ACTIVELY) { - INT iRetVal = 0; + int iRetVal = 0; /* Wake the LED Thread with IDLEMODE_ENTER State */ Adapter->DriverState = LOWPOWER_MODE_ENTER; @@ -1475,7 +1475,7 @@ int wrmalt(PMINI_ADAPTER Adapter, UINT uiAddress, PUINT pucBuff, size_t size) int rdmalt(PMINI_ADAPTER Adapter, UINT uiAddress, PUINT pucBuff, size_t size) { - INT uiRetVal = 0; + int uiRetVal = 0; uiRetVal = rdm(Adapter, uiAddress, (PUCHAR)pucBuff, size); convertEndian(RWM_READ, (PUINT)pucBuff, size); @@ -1485,7 +1485,7 @@ int rdmalt(PMINI_ADAPTER Adapter, UINT uiAddress, PUINT pucBuff, size_t size) int wrmWithLock(PMINI_ADAPTER Adapter, UINT uiAddress, PCHAR pucBuff, size_t sSize) { - INT status = STATUS_SUCCESS; + int status = STATUS_SUCCESS; down(&Adapter->rdmwrmsync); if ((Adapter->IdleMode == TRUE) || @@ -1524,7 +1524,7 @@ exit: int rdmaltWithLock(PMINI_ADAPTER Adapter, UINT uiAddress, PUINT pucBuff, size_t size) { - INT uiRetVal = STATUS_SUCCESS; + int uiRetVal = STATUS_SUCCESS; down(&Adapter->rdmwrmsync); if ((Adapter->IdleMode == TRUE) || @@ -1615,7 +1615,7 @@ static VOID SendShutModeResponse(PMINI_ADAPTER Adapter) /* Wait for the LED to TURN OFF before sending ACK response */ if (Adapter->LEDInfo.led_thread_running & BCM_LED_THREAD_RUNNING_ACTIVELY) { - INT iRetVal = 0; + int iRetVal = 0; /* Wake the LED Thread with LOWPOWER_MODE_ENTER State */ Adapter->DriverState = LOWPOWER_MODE_ENTER; @@ -1770,7 +1770,7 @@ void update_per_cid_rx(PMINI_ADAPTER Adapter) void update_per_sf_desc_cnts(PMINI_ADAPTER Adapter) { - INT iIndex = 0; + int iIndex = 0; u32 uibuff[MAX_TARGET_DSX_BUFFERS]; int bytes; diff --git a/drivers/staging/bcm/Prototypes.h b/drivers/staging/bcm/Prototypes.h index b909759..a1eeb66 100644 --- a/drivers/staging/bcm/Prototypes.h +++ b/drivers/staging/bcm/Prototypes.h @@ -17,7 +17,7 @@ int register_control_device_interface(PMINI_ADAPTER ps_adapter); void unregister_control_device_interface(PMINI_ADAPTER Adapter); -INT CopyBufferToControlPacket(PMINI_ADAPTER Adapter,/**<Logical Adapter*/ +int CopyBufferToControlPacket(PMINI_ADAPTER Adapter,/**<Logical Adapter*/ PVOID ioBuffer/**<Control Packet Buffer*/ ); @@ -29,7 +29,7 @@ VOID flush_all_queues(PMINI_ADAPTER Adapter); VOID PruneQueueAllSF(PMINI_ADAPTER Adapter); -INT SearchSfid(PMINI_ADAPTER Adapter, UINT uiSfid); +int SearchSfid(PMINI_ADAPTER Adapter, UINT uiSfid); unsigned short ClassifyPacket(PMINI_ADAPTER Adapter, struct sk_buff* skb); @@ -38,7 +38,7 @@ BOOLEAN MatchDestPort(S_CLASSIFIER_RULE *pstClassifierRule, unsigned short ushSr BOOLEAN MatchProtocol(S_CLASSIFIER_RULE *pstClassifierRule, UCHAR ucProtocol); -INT SetupNextSend(PMINI_ADAPTER Adapter, /**<Logical Adapter*/ +int SetupNextSend(PMINI_ADAPTER Adapter, /**<Logical Adapter*/ struct sk_buff *Packet, /**<data buffer*/ unsigned short Vcid); @@ -46,7 +46,7 @@ VOID LinkMessage(PMINI_ADAPTER Adapter); VOID transmit_packets(PMINI_ADAPTER Adapter); -INT SendControlPacket(PMINI_ADAPTER Adapter, /**<Logical Adapter*/ +int SendControlPacket(PMINI_ADAPTER Adapter, /**<Logical Adapter*/ char *pControlPacket/**<Control Packet*/ ); @@ -54,11 +54,11 @@ INT SendControlPacket(PMINI_ADAPTER Adapter, /**<Logical Adapter*/ int register_networkdev(PMINI_ADAPTER Adapter); void unregister_networkdev(PMINI_ADAPTER Adapter); -INT AllocAdapterDsxBuffer(PMINI_ADAPTER Adapter); +int AllocAdapterDsxBuffer(PMINI_ADAPTER Adapter); VOID AdapterFree(PMINI_ADAPTER Adapter); -INT FreeAdapterDsxBuffer(PMINI_ADAPTER Adapter); +int FreeAdapterDsxBuffer(PMINI_ADAPTER Adapter); int tx_pkt_handler(PMINI_ADAPTER Adapter); @@ -69,7 +69,7 @@ int run_card_proc(PMINI_ADAPTER Adapter ); int InitCardAndDownloadFirmware(PMINI_ADAPTER ps_adapter); -INT ReadMacAddressFromNVM(PMINI_ADAPTER Adapter); +int ReadMacAddressFromNVM(PMINI_ADAPTER Adapter); int register_control_device_interface(PMINI_ADAPTER ps_adapter); @@ -117,10 +117,10 @@ void ClearTargetDSXBuffer(PMINI_ADAPTER Adapter, B_UINT16 TID, BOOLEAN bFreeAll) void flush_queue(PMINI_ADAPTER Adapter, UINT iQIndex); -INT flushAllAppQ(VOID); +int flushAllAppQ(VOID); -INT BeceemEEPROMBulkRead( +int BeceemEEPROMBulkRead( PMINI_ADAPTER Adapter, PUINT pBuffer, UINT uiOffset, @@ -128,12 +128,12 @@ INT BeceemEEPROMBulkRead( -INT WriteBeceemEEPROM(PMINI_ADAPTER Adapter, UINT uiEEPROMOffset, UINT uiData); +int WriteBeceemEEPROM(PMINI_ADAPTER Adapter, UINT uiEEPROMOffset, UINT uiData); -INT PropagateCalParamsFromFlashToMemory(PMINI_ADAPTER Adapter); +int PropagateCalParamsFromFlashToMemory(PMINI_ADAPTER Adapter); -INT BeceemEEPROMBulkWrite( +int BeceemEEPROMBulkWrite( PMINI_ADAPTER Adapter, PUCHAR pBuffer, UINT uiOffset, @@ -141,16 +141,16 @@ INT BeceemEEPROMBulkWrite( BOOLEAN bVerify); -INT ReadBeceemEEPROM(PMINI_ADAPTER Adapter, UINT dwAddress, UINT *pdwData); +int ReadBeceemEEPROM(PMINI_ADAPTER Adapter, UINT dwAddress, UINT *pdwData); -INT BeceemNVMRead( +int BeceemNVMRead( PMINI_ADAPTER Adapter, PUINT pBuffer, UINT uiOffset, UINT uiNumBytes); -INT BeceemNVMWrite( +int BeceemNVMWrite( PMINI_ADAPTER Adapter, PUINT pBuffer, UINT uiOffset, @@ -158,14 +158,14 @@ INT BeceemNVMWrite( BOOLEAN bVerify); -INT BcmInitNVM(PMINI_ADAPTER Adapter); +int BcmInitNVM(PMINI_ADAPTER Adapter); -INT BcmUpdateSectorSize(PMINI_ADAPTER Adapter, UINT uiSectorSize); +int BcmUpdateSectorSize(PMINI_ADAPTER Adapter, UINT uiSectorSize); BOOLEAN IsSectionExistInFlash(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL section); -INT BcmGetFlash2xSectionalBitMap(PMINI_ADAPTER Adapter, PFLASH2X_BITMAP psFlash2xBitMap); +int BcmGetFlash2xSectionalBitMap(PMINI_ADAPTER Adapter, PFLASH2X_BITMAP psFlash2xBitMap); -INT BcmFlash2xBulkWrite( +int BcmFlash2xBulkWrite( PMINI_ADAPTER Adapter, PUINT pBuffer, FLASH2X_SECTION_VAL eFlashSectionVal, @@ -173,25 +173,25 @@ INT BcmFlash2xBulkWrite( UINT uiNumBytes, UINT bVerify); -INT BcmFlash2xBulkRead( +int BcmFlash2xBulkRead( PMINI_ADAPTER Adapter, PUINT pBuffer, FLASH2X_SECTION_VAL eFlashSectionVal, UINT uiOffsetWithinSectionVal, UINT uiNumBytes); -INT BcmGetSectionValStartOffset(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlashSectionVal); +int BcmGetSectionValStartOffset(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlashSectionVal); -INT BcmSetActiveSection(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSectVal); -INT BcmAllocFlashCSStructure(PMINI_ADAPTER psAdapter); -INT BcmDeAllocFlashCSStructure(PMINI_ADAPTER psAdapter); +int BcmSetActiveSection(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSectVal); +int BcmAllocFlashCSStructure(PMINI_ADAPTER psAdapter); +int BcmDeAllocFlashCSStructure(PMINI_ADAPTER psAdapter); -INT BcmCopyISO(PMINI_ADAPTER Adapter, FLASH2X_COPY_SECTION sCopySectStrut); -INT BcmFlash2xCorruptSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSectionVal); -INT BcmFlash2xWriteSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlashSectionVal); -INT validateFlash2xReadWrite(PMINI_ADAPTER Adapter, PFLASH2X_READWRITE psFlash2xReadWrite); -INT IsFlash2x(PMINI_ADAPTER Adapter); -INT BcmCopySection(PMINI_ADAPTER Adapter, +int BcmCopyISO(PMINI_ADAPTER Adapter, FLASH2X_COPY_SECTION sCopySectStrut); +int BcmFlash2xCorruptSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSectionVal); +int BcmFlash2xWriteSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlashSectionVal); +int validateFlash2xReadWrite(PMINI_ADAPTER Adapter, PFLASH2X_READWRITE psFlash2xReadWrite); +int IsFlash2x(PMINI_ADAPTER Adapter); +int BcmCopySection(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL SrcSection, FLASH2X_SECTION_VAL DstSection, UINT offset, @@ -207,7 +207,7 @@ int wrmaltWithLock (PMINI_ADAPTER Adapter, UINT uiAddress, PUINT pucBuff, size_t int rdmaltWithLock (PMINI_ADAPTER Adapter, UINT uiAddress, PUINT pucBuff, size_t sSize); int wrmWithLock(PMINI_ADAPTER Adapter, UINT uiAddress, PCHAR pucBuff, size_t size); -INT buffDnldVerify(PMINI_ADAPTER Adapter, unsigned char *mappedbuffer, unsigned int u32FirmwareLength, +int buffDnldVerify(PMINI_ADAPTER Adapter, unsigned char *mappedbuffer, unsigned int u32FirmwareLength, unsigned long u32StartingAddress); diff --git a/drivers/staging/bcm/Qos.c b/drivers/staging/bcm/Qos.c index 92d27fc..825a71b 100644 --- a/drivers/staging/bcm/Qos.c +++ b/drivers/staging/bcm/Qos.c @@ -10,7 +10,7 @@ static BOOLEAN EThCSClassifyPkt(PMINI_ADAPTER Adapter, struct sk_buff* skb, PS_E static unsigned short IpVersion4(PMINI_ADAPTER Adapter, struct iphdr *iphd, S_CLASSIFIER_RULE *pstClassifierRule); -static VOID PruneQueue(PMINI_ADAPTER Adapter, INT iIndex); +static VOID PruneQueue(PMINI_ADAPTER Adapter, int iIndex); /******************************************************************* @@ -290,7 +290,7 @@ static unsigned short IpVersion4(PMINI_ADAPTER Adapter, } while (0); if (TRUE==bClassificationSucceed) { - INT iMatchedSFQueueIndex = 0; + int iMatchedSFQueueIndex = 0; iMatchedSFQueueIndex = SearchSfid(Adapter, pstClassifierRule->ulSFID); if (iMatchedSFQueueIndex >= NO_OF_QUEUES) { bClassificationSucceed = FALSE; @@ -326,7 +326,7 @@ VOID PruneQueueAllSF(PMINI_ADAPTER Adapter) drops packets from the Head till the number of bytes is less than or equal to max queue size for the queue. */ -static VOID PruneQueue(PMINI_ADAPTER Adapter, INT iIndex) +static VOID PruneQueue(PMINI_ADAPTER Adapter, int iIndex) { struct sk_buff* PacketToDrop=NULL; struct net_device_stats *netstats; @@ -397,7 +397,7 @@ static VOID PruneQueue(PMINI_ADAPTER Adapter, INT iIndex) VOID flush_all_queues(PMINI_ADAPTER Adapter) { - INT iQIndex; + int iQIndex; UINT uiTotalPacketLength; struct sk_buff* PacketToDrop=NULL; @@ -444,12 +444,12 @@ VOID flush_all_queues(PMINI_ADAPTER Adapter) unsigned short ClassifyPacket(PMINI_ADAPTER Adapter, struct sk_buff* skb) { - INT uiLoopIndex=0; + int uiLoopIndex = 0; S_CLASSIFIER_RULE *pstClassifierRule = NULL; S_ETHCS_PKT_INFO stEthCsPktInfo; PVOID pvEThPayload = NULL; struct iphdr *pIpHeader = NULL; - INT uiSfIndex=0; + int uiSfIndex = 0; unsigned short usIndex = Adapter->usBestEffortQueueIndex; BOOLEAN bFragmentedPkt=FALSE, bClassificationSucceed=FALSE; unsigned short usCurrFragment = 0; diff --git a/drivers/staging/bcm/Transmit.c b/drivers/staging/bcm/Transmit.c index 36ce70f..f6c3c75 100644 --- a/drivers/staging/bcm/Transmit.c +++ b/drivers/staging/bcm/Transmit.c @@ -41,7 +41,7 @@ This function dispatches control packet to the h/w interface @return zero(success) or -ve value(failure) */ -INT SendControlPacket(PMINI_ADAPTER Adapter, char *pControlPacket) +int SendControlPacket(PMINI_ADAPTER Adapter, char *pControlPacket) { PLEADER PLeader = (PLEADER)pControlPacket; @@ -87,7 +87,7 @@ INT SendControlPacket(PMINI_ADAPTER Adapter, char *pControlPacket) to the target via the host h/w interface. @return zero(success) or -ve value(failure) */ -INT SetupNextSend(PMINI_ADAPTER Adapter, struct sk_buff *Packet, unsigned short Vcid) +int SetupNextSend(PMINI_ADAPTER Adapter, struct sk_buff *Packet, unsigned short Vcid) { int status=0; BOOLEAN bHeaderSupressionEnabled = FALSE; diff --git a/drivers/staging/bcm/Typedefs.h b/drivers/staging/bcm/Typedefs.h index 4ca3269..8b2564e 100644 --- a/drivers/staging/bcm/Typedefs.h +++ b/drivers/staging/bcm/Typedefs.h @@ -11,7 +11,6 @@ typedef char BOOLEAN; typedef char CHAR; -typedef int INT; typedef short SHORT; typedef long LONG; typedef void VOID; diff --git a/drivers/staging/bcm/hostmibs.c b/drivers/staging/bcm/hostmibs.c index c4f3fb4..6315f14 100644 --- a/drivers/staging/bcm/hostmibs.c +++ b/drivers/staging/bcm/hostmibs.c @@ -9,7 +9,7 @@ #include "headers.h" -INT ProcessGetHostMibs(PMINI_ADAPTER Adapter, S_MIBS_HOST_STATS_MIBS *pstHostMibs) +int ProcessGetHostMibs(PMINI_ADAPTER Adapter, S_MIBS_HOST_STATS_MIBS *pstHostMibs) { S_SERVICEFLOW_ENTRY *pstServiceFlowEntry = NULL; S_PHS_RULE *pstPhsRule = NULL; diff --git a/drivers/staging/bcm/led_control.c b/drivers/staging/bcm/led_control.c index 1752aca..33ba506 100644 --- a/drivers/staging/bcm/led_control.c +++ b/drivers/staging/bcm/led_control.c @@ -15,7 +15,7 @@ static B_UINT16 CFG_CalculateChecksum(B_UINT8 *pu8Buffer, B_UINT32 u32Size) BOOLEAN IsReqGpioIsLedInNVM(PMINI_ADAPTER Adapter, UINT gpios) { - INT Status; + int Status; Status = (Adapter->gpioBitMap & gpios) ^ gpios; if (Status) return FALSE; @@ -23,8 +23,8 @@ BOOLEAN IsReqGpioIsLedInNVM(PMINI_ADAPTER Adapter, UINT gpios) return TRUE; } -static INT LED_Blink(PMINI_ADAPTER Adapter, UINT GPIO_Num, UCHAR uiLedIndex, - ULONG timeout, INT num_of_time, LedEventInfo_t currdriverstate) +static int LED_Blink(PMINI_ADAPTER Adapter, UINT GPIO_Num, UCHAR uiLedIndex, + ULONG timeout, int num_of_time, LedEventInfo_t currdriverstate) { int Status = STATUS_SUCCESS; BOOLEAN bInfinite = FALSE; @@ -72,7 +72,7 @@ static INT LED_Blink(PMINI_ADAPTER Adapter, UINT GPIO_Num, UCHAR uiLedIndex, return Status; } -static INT ScaleRateofTransfer(ULONG rate) +static int ScaleRateofTransfer(ULONG rate) { if (rate <= 3) return rate; @@ -94,7 +94,7 @@ static INT ScaleRateofTransfer(ULONG rate) -static INT LED_Proportional_Blink(PMINI_ADAPTER Adapter, UCHAR GPIO_Num_tx, +static int LED_Proportional_Blink(PMINI_ADAPTER Adapter, UCHAR GPIO_Num_tx, UCHAR uiTxLedIndex, UCHAR GPIO_Num_rx, UCHAR uiRxLedIndex, LedEventInfo_t currdriverstate) { @@ -105,7 +105,7 @@ static INT LED_Proportional_Blink(PMINI_ADAPTER Adapter, UCHAR GPIO_Num_tx, /* Rate of transfer of Tx and Rx in 1 sec */ ULONG64 rate_of_transfer_tx = 0, rate_of_transfer_rx = 0; int Status = STATUS_SUCCESS; - INT num_of_time = 0, num_of_time_tx = 0, num_of_time_rx = 0; + int num_of_time = 0, num_of_time_tx = 0, num_of_time_rx = 0; UINT remDelay = 0; BOOLEAN bBlinkBothLED = TRUE; /* UINT GPIO_num = DISABLE_GPIO_NUM; */ @@ -259,10 +259,10 @@ static INT LED_Proportional_Blink(PMINI_ADAPTER Adapter, UCHAR GPIO_Num_tx, * <OSAL_STATUS_CODE> * ----------------------------------------------------------------------------- */ -static INT ValidateDSDParamsChecksum(PMINI_ADAPTER Adapter, ULONG ulParamOffset, +static int ValidateDSDParamsChecksum(PMINI_ADAPTER Adapter, ULONG ulParamOffset, unsigned short usParamLen) { - INT Status = STATUS_SUCCESS; + int Status = STATUS_SUCCESS; PUCHAR puBuffer = NULL; unsigned short usChksmOrg = 0; unsigned short usChecksumCalculated = 0; @@ -341,10 +341,10 @@ exit: * <OSAL_STATUS_CODE> * ----------------------------------------------------------------------------- */ -static INT ValidateHWParmStructure(PMINI_ADAPTER Adapter, ULONG ulHwParamOffset) +static int ValidateHWParmStructure(PMINI_ADAPTER Adapter, ULONG ulHwParamOffset) { - INT Status = STATUS_SUCCESS; + int Status = STATUS_SUCCESS; unsigned short HwParamLen = 0; /* * Add DSD start offset to the hwParamOffset to get @@ -600,7 +600,7 @@ static VOID LedGpioInit(PMINI_ADAPTER Adapter) Adapter->LEDInfo.bIdle_led_off = FALSE; } -static INT BcmGetGPIOPinInfo(PMINI_ADAPTER Adapter, UCHAR *GPIO_num_tx, +static int BcmGetGPIOPinInfo(PMINI_ADAPTER Adapter, UCHAR *GPIO_num_tx, UCHAR *GPIO_num_rx, UCHAR *uiLedTxIndex, UCHAR *uiLedRxIndex, LedEventInfo_t currdriverstate) { @@ -649,7 +649,7 @@ static VOID LEDControlThread(PMINI_ADAPTER Adapter) LedEventInfo_t currdriverstate = 0; ulong timeout = 0; - INT Status = 0; + int Status = 0; UCHAR dummyGPIONum = 0; UCHAR dummyIndex = 0; diff --git a/drivers/staging/bcm/nvm.c b/drivers/staging/bcm/nvm.c index 5cf902f..20dc861 100644 --- a/drivers/staging/bcm/nvm.c +++ b/drivers/staging/bcm/nvm.c @@ -2,54 +2,54 @@ #define DWORD unsigned int -static INT BcmDoChipSelect(PMINI_ADAPTER Adapter, UINT offset); -static INT BcmGetActiveDSD(PMINI_ADAPTER Adapter); -static INT BcmGetActiveISO(PMINI_ADAPTER Adapter); +static int BcmDoChipSelect(PMINI_ADAPTER Adapter, UINT offset); +static int BcmGetActiveDSD(PMINI_ADAPTER Adapter); +static int BcmGetActiveISO(PMINI_ADAPTER Adapter); static UINT BcmGetEEPROMSize(PMINI_ADAPTER Adapter); -static INT BcmGetFlashCSInfo(PMINI_ADAPTER Adapter); +static int BcmGetFlashCSInfo(PMINI_ADAPTER Adapter); static UINT BcmGetFlashSectorSize(PMINI_ADAPTER Adapter, UINT FlashSectorSizeSig, UINT FlashSectorSize); static VOID BcmValidateNvmType(PMINI_ADAPTER Adapter); -static INT BcmGetNvmSize(PMINI_ADAPTER Adapter); +static int BcmGetNvmSize(PMINI_ADAPTER Adapter); static UINT BcmGetFlashSize(PMINI_ADAPTER Adapter); static NVM_TYPE BcmGetNvmType(PMINI_ADAPTER Adapter); -static INT BcmGetSectionValEndOffset(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSectionVal); +static int BcmGetSectionValEndOffset(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSectionVal); static B_UINT8 IsOffsetWritable(PMINI_ADAPTER Adapter, UINT uiOffset); -static INT IsSectionWritable(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL Section); -static INT IsSectionExistInVendorInfo(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL section); - -static INT ReadDSDPriority(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL dsd); -static INT ReadDSDSignature(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL dsd); -static INT ReadISOPriority(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL iso); -static INT ReadISOSignature(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL iso); - -static INT CorruptDSDSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSectionVal); -static INT CorruptISOSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSectionVal); -static INT SaveHeaderIfPresent(PMINI_ADAPTER Adapter, PUCHAR pBuff, UINT uiSectAlignAddr); -static INT WriteToFlashWithoutSectorErase(PMINI_ADAPTER Adapter, PUINT pBuff, +static int IsSectionWritable(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL Section); +static int IsSectionExistInVendorInfo(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL section); + +static int ReadDSDPriority(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL dsd); +static int ReadDSDSignature(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL dsd); +static int ReadISOPriority(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL iso); +static int ReadISOSignature(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL iso); + +static int CorruptDSDSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSectionVal); +static int CorruptISOSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSectionVal); +static int SaveHeaderIfPresent(PMINI_ADAPTER Adapter, PUCHAR pBuff, UINT uiSectAlignAddr); +static int WriteToFlashWithoutSectorErase(PMINI_ADAPTER Adapter, PUINT pBuff, FLASH2X_SECTION_VAL eFlash2xSectionVal, UINT uiOffset, UINT uiNumBytes); static FLASH2X_SECTION_VAL getHighestPriDSD(PMINI_ADAPTER Adapter); static FLASH2X_SECTION_VAL getHighestPriISO(PMINI_ADAPTER Adapter); -static INT BeceemFlashBulkRead( +static int BeceemFlashBulkRead( PMINI_ADAPTER Adapter, PUINT pBuffer, UINT uiOffset, UINT uiNumBytes); -static INT BeceemFlashBulkWrite( +static int BeceemFlashBulkWrite( PMINI_ADAPTER Adapter, PUINT pBuffer, UINT uiOffset, UINT uiNumBytes, BOOLEAN bVerify); -static INT GetFlashBaseAddr(PMINI_ADAPTER Adapter); +static int GetFlashBaseAddr(PMINI_ADAPTER Adapter); -static INT ReadBeceemEEPROMBulk(PMINI_ADAPTER Adapter, UINT dwAddress, UINT *pdwData, UINT dwNumData); +static int ReadBeceemEEPROMBulk(PMINI_ADAPTER Adapter, UINT dwAddress, UINT *pdwData, UINT dwNumData); // Procedure: ReadEEPROMStatusRegister // @@ -126,7 +126,7 @@ static UCHAR ReadEEPROMStatusRegister( PMINI_ADAPTER Adapter ) // OSAL_STATUS_CODE: //----------------------------------------------------------------------------- -INT ReadBeceemEEPROMBulk( PMINI_ADAPTER Adapter, +int ReadBeceemEEPROMBulk( PMINI_ADAPTER Adapter, DWORD dwAddress, DWORD *pdwData, DWORD dwNumWords @@ -246,7 +246,7 @@ INT ReadBeceemEEPROMBulk( PMINI_ADAPTER Adapter, // OSAL_STATUS_CODE: //----------------------------------------------------------------------------- -INT ReadBeceemEEPROM( PMINI_ADAPTER Adapter, +int ReadBeceemEEPROM( PMINI_ADAPTER Adapter, DWORD uiOffset, DWORD *pBuffer ) @@ -275,9 +275,9 @@ INT ReadBeceemEEPROM( PMINI_ADAPTER Adapter, -INT ReadMacAddressFromNVM(PMINI_ADAPTER Adapter) +int ReadMacAddressFromNVM(PMINI_ADAPTER Adapter) { - INT Status; + int Status; unsigned char puMacAddr[6]; Status = BeceemNVMRead(Adapter, @@ -307,7 +307,7 @@ INT ReadMacAddressFromNVM(PMINI_ADAPTER Adapter) // <FAILURE> - if failed. //----------------------------------------------------------------------------- -INT BeceemEEPROMBulkRead( +int BeceemEEPROMBulkRead( PMINI_ADAPTER Adapter, PUINT pBuffer, UINT uiOffset, @@ -406,7 +406,7 @@ INT BeceemEEPROMBulkRead( // <FAILURE> - if failed. //----------------------------------------------------------------------------- -static INT BeceemFlashBulkRead( +static int BeceemFlashBulkRead( PMINI_ADAPTER Adapter, PUINT pBuffer, UINT uiOffset, @@ -414,7 +414,7 @@ static INT BeceemFlashBulkRead( { UINT uiIndex = 0; UINT uiBytesToRead = uiNumBytes; - INT Status = 0; + int Status = 0; UINT uiPartOffset = 0; int bytes; @@ -567,7 +567,7 @@ static UINT BcmGetEEPROMSize(PMINI_ADAPTER Adapter) //----------------------------------------------------------------------------- -static INT FlashSectorErase(PMINI_ADAPTER Adapter, +static int FlashSectorErase(PMINI_ADAPTER Adapter, UINT addr, UINT numOfSectors) { @@ -628,14 +628,14 @@ static INT FlashSectorErase(PMINI_ADAPTER Adapter, // //----------------------------------------------------------------------------- -static INT flashByteWrite( +static int flashByteWrite( PMINI_ADAPTER Adapter, UINT uiOffset, PVOID pData) { UINT uiStatus = 0; - INT iRetries = MAX_FLASH_RETRIES * FLASH_PER_RETRIES_DELAY; //3 + int iRetries = MAX_FLASH_RETRIES * FLASH_PER_RETRIES_DELAY; //3 UINT value; ULONG ulData = *(PUCHAR)pData; @@ -712,18 +712,18 @@ static INT flashByteWrite( // //----------------------------------------------------------------------------- -static INT flashWrite( +static int flashWrite( PMINI_ADAPTER Adapter, UINT uiOffset, PVOID pData) { //UINT uiStatus = 0; - //INT iRetries = 0; + //int iRetries = 0; //UINT uiReadBack = 0; UINT uiStatus = 0; - INT iRetries = MAX_FLASH_RETRIES * FLASH_PER_RETRIES_DELAY; //3 + int iRetries = MAX_FLASH_RETRIES * FLASH_PER_RETRIES_DELAY; //3 UINT value; UINT uiErasePattern[4] = {0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF}; @@ -793,13 +793,13 @@ static INT flashWrite( // OSAL_STATUS_CODE // //----------------------------------------------------------------------------- -static INT flashByteWriteStatus( +static int flashByteWriteStatus( PMINI_ADAPTER Adapter, UINT uiOffset, PVOID pData) { UINT uiStatus = 0; - INT iRetries = MAX_FLASH_RETRIES * FLASH_PER_RETRIES_DELAY; //3 + int iRetries = MAX_FLASH_RETRIES * FLASH_PER_RETRIES_DELAY; //3 ULONG ulData = *(PUCHAR)pData; UINT value; int bytes; @@ -874,13 +874,13 @@ static INT flashByteWriteStatus( // //----------------------------------------------------------------------------- -static INT flashWriteStatus( +static int flashWriteStatus( PMINI_ADAPTER Adapter, UINT uiOffset, PVOID pData) { UINT uiStatus = 0; - INT iRetries = MAX_FLASH_RETRIES * FLASH_PER_RETRIES_DELAY; //3 + int iRetries = MAX_FLASH_RETRIES * FLASH_PER_RETRIES_DELAY; //3 //UINT uiReadBack = 0; UINT value; UINT uiErasePattern[4] = {0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF}; @@ -1069,7 +1069,7 @@ static ULONG BcmFlashUnProtectBlock(PMINI_ADAPTER Adapter, UINT uiOffset, UINT u // //----------------------------------------------------------------------------- -static INT BeceemFlashBulkWrite( +static int BeceemFlashBulkWrite( PMINI_ADAPTER Adapter, PUINT pBuffer, UINT uiOffset, @@ -1086,7 +1086,7 @@ static INT BeceemFlashBulkWrite( UINT uiNumSectTobeRead = 0; UCHAR ucReadBk[16] = {0}; ULONG ulStatus = 0; - INT Status = STATUS_SUCCESS; + int Status = STATUS_SUCCESS; UINT uiTemp = 0; UINT index = 0; UINT uiPartOffset = 0; @@ -1283,7 +1283,7 @@ BeceemFlashBulkWrite_EXIT: // //----------------------------------------------------------------------------- -static INT BeceemFlashBulkWriteStatus( +static int BeceemFlashBulkWriteStatus( PMINI_ADAPTER Adapter, PUINT pBuffer, UINT uiOffset, @@ -1444,7 +1444,7 @@ BeceemFlashBulkWriteStatus_EXIT: //----------------------------------------------------------------------------- -INT PropagateCalParamsFromEEPROMToMemory(PMINI_ADAPTER Adapter) +int PropagateCalParamsFromEEPROMToMemory(PMINI_ADAPTER Adapter) { PCHAR pBuff = kmalloc(BUFFER_4K, GFP_KERNEL); UINT uiEepromSize = 0; @@ -1453,7 +1453,7 @@ INT PropagateCalParamsFromEEPROMToMemory(PMINI_ADAPTER Adapter) UINT uiCalStartAddr = EEPROM_CALPARAM_START; UINT uiMemoryLoc = EEPROM_CAL_DATA_INTERNAL_LOC; UINT value; - INT Status = 0; + int Status = 0; if (pBuff == NULL) { return -1; } @@ -1508,7 +1508,7 @@ INT PropagateCalParamsFromEEPROMToMemory(PMINI_ADAPTER Adapter) // //----------------------------------------------------------------------------- -INT PropagateCalParamsFromFlashToMemory(PMINI_ADAPTER Adapter) +int PropagateCalParamsFromFlashToMemory(PMINI_ADAPTER Adapter) { PCHAR pBuff, pPtr; UINT uiEepromSize = 0; @@ -1517,7 +1517,7 @@ INT PropagateCalParamsFromFlashToMemory(PMINI_ADAPTER Adapter) UINT uiCalStartAddr = EEPROM_CALPARAM_START; UINT uiMemoryLoc = EEPROM_CAL_DATA_INTERNAL_LOC; UINT value; - INT Status = 0; + int Status = 0; // // Write the signature first. This will ensure firmware does not access EEPROM. // @@ -1587,7 +1587,7 @@ INT PropagateCalParamsFromFlashToMemory(PMINI_ADAPTER Adapter) // //----------------------------------------------------------------------------- -static INT BeceemEEPROMReadBackandVerify( +static int BeceemEEPROMReadBackandVerify( PMINI_ADAPTER Adapter, PUINT pBuffer, UINT uiOffset, @@ -1678,7 +1678,7 @@ static VOID BcmSwapWord(UINT *ptr1) { // OSAL_STATUS_CODE // //----------------------------------------------------------------------------- -static INT BeceemEEPROMWritePage( PMINI_ADAPTER Adapter, UINT uiData[], UINT uiOffset ) +static int BeceemEEPROMWritePage( PMINI_ADAPTER Adapter, UINT uiData[], UINT uiOffset ) { UINT uiRetries = MAX_EEPROM_RETRIES*RETRIES_PER_DELAY; UINT uiStatus = 0; @@ -1812,7 +1812,7 @@ static INT BeceemEEPROMWritePage( PMINI_ADAPTER Adapter, UINT uiData[], UINT uiO // //----------------------------------------------------------------------------- -INT BeceemEEPROMBulkWrite( +int BeceemEEPROMBulkWrite( PMINI_ADAPTER Adapter, PUCHAR pBuffer, UINT uiOffset, @@ -1826,7 +1826,7 @@ INT BeceemEEPROMBulkWrite( UINT uiTempOffset = 0; UINT uiExtraBytes = 0; //PUINT puiBuffer = (PUINT)pBuffer; - //INT value; + //int value; if (uiOffset%MAX_RW_SIZE && uiBytesToCopy) { uiTempOffset = uiOffset - (uiOffset%MAX_RW_SIZE); @@ -1905,13 +1905,13 @@ INT BeceemEEPROMBulkWrite( // <FAILURE> - if failed. //----------------------------------------------------------------------------- -INT BeceemNVMRead( +int BeceemNVMRead( PMINI_ADAPTER Adapter, PUINT pBuffer, UINT uiOffset, UINT uiNumBytes) { - INT Status = 0; + int Status = 0; #if !defined(BCM_SHM_INTERFACE) || defined(FLASH_DIRECT_ACCESS) UINT uiTemp = 0, value; #endif @@ -1962,14 +1962,14 @@ INT BeceemNVMRead( // <FAILURE> - if failed. //----------------------------------------------------------------------------- -INT BeceemNVMWrite( +int BeceemNVMWrite( PMINI_ADAPTER Adapter, PUINT pBuffer, UINT uiOffset, UINT uiNumBytes, BOOLEAN bVerify) { - INT Status = 0; + int Status = 0; UINT uiTemp = 0; UINT uiMemoryLoc = EEPROM_CAL_DATA_INTERNAL_LOC; UINT uiIndex = 0; @@ -2075,9 +2075,9 @@ INT BeceemNVMWrite( // <FAILURE> - if failed. //----------------------------------------------------------------------------- -INT BcmUpdateSectorSize(PMINI_ADAPTER Adapter, UINT uiSectorSize) +int BcmUpdateSectorSize(PMINI_ADAPTER Adapter, UINT uiSectorSize) { - INT Status = -1; + int Status = -1; FLASH_CS_INFO sFlashCsInfo = {0}; UINT uiTemp = 0; @@ -2205,7 +2205,7 @@ static UINT BcmGetFlashSectorSize(PMINI_ADAPTER Adapter, UINT FlashSectorSizeSig // <OSAL_STATUS_CODE> //----------------------------------------------------------------------------- -static INT BcmInitEEPROMQueues(PMINI_ADAPTER Adapter) +static int BcmInitEEPROMQueues(PMINI_ADAPTER Adapter) { UINT value = 0; /* CHIP Bug : Clear the Avail bits on the Read queue. The default @@ -2244,7 +2244,7 @@ static INT BcmInitEEPROMQueues(PMINI_ADAPTER Adapter) // <OSAL_STATUS_CODE> //----------------------------------------------------------------------------- -INT BcmInitNVM(PMINI_ADAPTER ps_adapter) +int BcmInitNVM(PMINI_ADAPTER ps_adapter) { BcmValidateNvmType(ps_adapter); BcmInitEEPROMQueues(ps_adapter); @@ -2272,7 +2272,7 @@ INT BcmInitNVM(PMINI_ADAPTER ps_adapter) */ /***************************************************************************/ -static INT BcmGetNvmSize(PMINI_ADAPTER Adapter) +static int BcmGetNvmSize(PMINI_ADAPTER Adapter) { if (Adapter->eNVMType == NVM_EEPROM) { Adapter->uiNVMDSDSize = BcmGetEEPROMSize(Adapter); @@ -2341,7 +2341,7 @@ static ULONG BcmReadFlashRDID(PMINI_ADAPTER Adapter) } -INT BcmAllocFlashCSStructure(PMINI_ADAPTER psAdapter) +int BcmAllocFlashCSStructure(PMINI_ADAPTER psAdapter) { if (psAdapter == NULL) { pr_info("Adapter structure point is NULL\n"); @@ -2371,7 +2371,7 @@ INT BcmAllocFlashCSStructure(PMINI_ADAPTER psAdapter) return STATUS_SUCCESS; } -INT BcmDeAllocFlashCSStructure(PMINI_ADAPTER psAdapter) +int BcmDeAllocFlashCSStructure(PMINI_ADAPTER psAdapter) { if (psAdapter == NULL) { pr_info("Adapter structure point is NULL\n"); @@ -2383,7 +2383,7 @@ INT BcmDeAllocFlashCSStructure(PMINI_ADAPTER psAdapter) return STATUS_SUCCESS ; } -static INT BcmDumpFlash2XCSStructure(PFLASH2X_CS_INFO psFlash2xCSInfo, PMINI_ADAPTER Adapter) +static int BcmDumpFlash2XCSStructure(PFLASH2X_CS_INFO psFlash2xCSInfo, PMINI_ADAPTER Adapter) { UINT Index = 0; bcm_dbg(Adapter, OTHERS, NVM_RW, ALL, @@ -2523,7 +2523,7 @@ static INT BcmDumpFlash2XCSStructure(PFLASH2X_CS_INFO psFlash2xCSInfo, PMINI_ADA } -static INT ConvertEndianOf2XCSStructure(PFLASH2X_CS_INFO psFlash2xCSInfo) +static int ConvertEndianOf2XCSStructure(PFLASH2X_CS_INFO psFlash2xCSInfo) { UINT Index = 0; psFlash2xCSInfo->MagicNumber = ntohl(psFlash2xCSInfo->MagicNumber); @@ -2578,7 +2578,7 @@ static INT ConvertEndianOf2XCSStructure(PFLASH2X_CS_INFO psFlash2xCSInfo) return STATUS_SUCCESS; } -static INT ConvertEndianOfCSStructure(PFLASH_CS_INFO psFlashCSInfo) +static int ConvertEndianOfCSStructure(PFLASH_CS_INFO psFlashCSInfo) { //UINT Index = 0; psFlashCSInfo->MagicNumber =ntohl(psFlashCSInfo->MagicNumber); @@ -2611,7 +2611,7 @@ static INT ConvertEndianOfCSStructure(PFLASH_CS_INFO psFlashCSInfo) return STATUS_SUCCESS; } -static INT IsSectionExistInVendorInfo(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL section) +static int IsSectionExistInVendorInfo(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL section) { return ( Adapter->uiVendorExtnFlag && (Adapter->psFlash2xVendorInfo->VendorSection[section].AccessFlags & FLASH2X_SECTION_PRESENT) && @@ -2706,7 +2706,7 @@ static VOID UpdateVendorInfo(PMINI_ADAPTER Adapter) // <VOID> //----------------------------------------------------------------------------- -static INT BcmGetFlashCSInfo(PMINI_ADAPTER Adapter) +static int BcmGetFlashCSInfo(PMINI_ADAPTER Adapter) { //FLASH_CS_INFO sFlashCsInfo = {0}; @@ -2882,7 +2882,7 @@ static NVM_TYPE BcmGetNvmType(PMINI_ADAPTER Adapter) * On Failure -returns STATUS_FAILURE **/ -INT BcmGetSectionValStartOffset(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlashSectionVal) +int BcmGetSectionValStartOffset(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlashSectionVal) { /* * Considering all the section for which end offset can be calculated or directly given @@ -2890,7 +2890,7 @@ INT BcmGetSectionValStartOffset(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlas * endoffset can't be calculated or given in CS Structure. */ - INT SectStartOffset = 0 ; + int SectStartOffset = 0; SectStartOffset = INVALID_OFFSET ; @@ -2974,9 +2974,9 @@ INT BcmGetSectionValStartOffset(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlas * On Failure -returns STATUS_FAILURE **/ -INT BcmGetSectionValEndOffset(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSectionVal) +int BcmGetSectionValEndOffset(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSectionVal) { - INT SectEndOffset = 0 ; + int SectEndOffset = 0; SectEndOffset = INVALID_OFFSET; if (IsSectionExistInVendorInfo(Adapter, eFlash2xSectionVal)) { @@ -3061,7 +3061,7 @@ INT BcmGetSectionValEndOffset(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2 * return true on success and STATUS_FAILURE on fail. */ -INT BcmFlash2xBulkRead( +int BcmFlash2xBulkRead( PMINI_ADAPTER Adapter, PUINT pBuffer, FLASH2X_SECTION_VAL eFlash2xSectionVal, @@ -3069,8 +3069,8 @@ INT BcmFlash2xBulkRead( UINT uiNumBytes) { - INT Status = STATUS_SUCCESS; - INT SectionStartOffset = 0; + int Status = STATUS_SUCCESS; + int SectionStartOffset = 0; UINT uiAbsoluteOffset = 0 ; UINT uiTemp =0, value =0 ; if (Adapter == NULL) { @@ -3127,7 +3127,7 @@ INT BcmFlash2xBulkRead( * */ -INT BcmFlash2xBulkWrite( +int BcmFlash2xBulkWrite( PMINI_ADAPTER Adapter, PUINT pBuffer, FLASH2X_SECTION_VAL eFlash2xSectVal, @@ -3136,7 +3136,7 @@ INT BcmFlash2xBulkWrite( UINT bVerify) { - INT Status = STATUS_SUCCESS; + int Status = STATUS_SUCCESS; UINT FlashSectValStartOffset = 0; UINT uiTemp = 0, value = 0; if (Adapter == NULL) { @@ -3190,7 +3190,7 @@ INT BcmFlash2xBulkWrite( * Return STATUS_SUCESS if get success in setting the right DSD else negaive error code * **/ -static INT BcmGetActiveDSD(PMINI_ADAPTER Adapter) +static int BcmGetActiveDSD(PMINI_ADAPTER Adapter) { FLASH2X_SECTION_VAL uiHighestPriDSD = 0 ; @@ -3234,10 +3234,10 @@ static INT BcmGetActiveDSD(PMINI_ADAPTER Adapter) * **/ -static INT BcmGetActiveISO(PMINI_ADAPTER Adapter) +static int BcmGetActiveISO(PMINI_ADAPTER Adapter) { - INT HighestPriISO = 0 ; + int HighestPriISO; HighestPriISO = getHighestPriISO(Adapter); Adapter->eActiveISO = HighestPriISO ; @@ -3286,7 +3286,7 @@ B_UINT8 IsOffsetWritable(PMINI_ADAPTER Adapter, UINT uiOffset) return FALSE; } -static INT BcmDumpFlash2xSectionBitMap(PFLASH2X_BITMAP psFlash2xBitMap) +static int BcmDumpFlash2xSectionBitMap(PFLASH2X_BITMAP psFlash2xBitMap) { PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev); bcm_dbg(Adapter, OTHERS, NVM_RW, ALL, @@ -3331,7 +3331,7 @@ static INT BcmDumpFlash2xSectionBitMap(PFLASH2X_BITMAP psFlash2xBitMap) * Failure:- negative error code **/ -INT BcmGetFlash2xSectionalBitMap(PMINI_ADAPTER Adapter, PFLASH2X_BITMAP psFlash2xBitMap) +int BcmGetFlash2xSectionalBitMap(PMINI_ADAPTER Adapter, PFLASH2X_BITMAP psFlash2xBitMap) { @@ -3602,15 +3602,15 @@ INT BcmGetFlash2xSectionalBitMap(PMINI_ADAPTER Adapter, PFLASH2X_BITMAP psFlash2 Return Value:- Make the priorit highest else return erorr code **/ -INT BcmSetActiveSection(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSectVal) +int BcmSetActiveSection(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSectVal) { unsigned int SectImagePriority = 0; - INT Status =STATUS_SUCCESS; + int Status = STATUS_SUCCESS; //DSD_HEADER sDSD = {0}; //ISO_HEADER sISO = {0}; - INT HighestPriDSD = 0 ; - INT HighestPriISO = 0; + int HighestPriDSD = 0; + int HighestPriISO = 0; @@ -3800,7 +3800,7 @@ INT BcmSetActiveSection(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSectV Return value:- SUCCESS if copies successfully else negative error code **/ -INT BcmCopyISO(PMINI_ADAPTER Adapter, FLASH2X_COPY_SECTION sCopySectStrut) +int BcmCopyISO(PMINI_ADAPTER Adapter, FLASH2X_COPY_SECTION sCopySectStrut) { PCHAR Buff = NULL; @@ -4103,10 +4103,10 @@ out: **/ -INT BcmFlash2xCorruptSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSectionVal) +int BcmFlash2xCorruptSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSectionVal) { - INT Status = STATUS_SUCCESS ; + int Status = STATUS_SUCCESS; pr_info("Section Value :%x\n", eFlash2xSectionVal); if ((eFlash2xSectionVal == DSD0) || (eFlash2xSectionVal == DSD1) || (eFlash2xSectionVal == DSD2)) { @@ -4132,7 +4132,7 @@ INT BcmFlash2xCorruptSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSect Failure :-Return negative error code **/ -INT BcmFlash2xWriteSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlashSectionVal) +int BcmFlash2xWriteSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlashSectionVal) { UINT uiSignature = 0 ; @@ -4197,7 +4197,7 @@ INT BcmFlash2xWriteSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlashSectionV **/ -INT validateFlash2xReadWrite(PMINI_ADAPTER Adapter, PFLASH2X_READWRITE psFlash2xReadWrite) +int validateFlash2xReadWrite(PMINI_ADAPTER Adapter, PFLASH2X_READWRITE psFlash2xReadWrite) { UINT uiNumOfBytes = 0 ; UINT uiSectStartOffset = 0 ; @@ -4260,7 +4260,7 @@ INT validateFlash2xReadWrite(PMINI_ADAPTER Adapter, PFLASH2X_READWRITE psFlash2x return TRUE if flah2.x of hgher version else return false. **/ -INT IsFlash2x(PMINI_ADAPTER Adapter) +int IsFlash2x(PMINI_ADAPTER Adapter) { if (Adapter->uiFlashLayoutMajorVersion >= FLASH_2X_MAJOR_NUMBER) return TRUE ; @@ -4275,7 +4275,7 @@ INT IsFlash2x(PMINI_ADAPTER Adapter) Success :- Base Address of the Flash **/ -static INT GetFlashBaseAddr(PMINI_ADAPTER Adapter) +static int GetFlashBaseAddr(PMINI_ADAPTER Adapter) { UINT uiBaseAddr = 0; @@ -4323,7 +4323,7 @@ static INT GetFlashBaseAddr(PMINI_ADAPTER Adapter) **/ -INT BcmCopySection(PMINI_ADAPTER Adapter, +int BcmCopySection(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL SrcSection, FLASH2X_SECTION_VAL DstSection, UINT offset, @@ -4332,7 +4332,7 @@ INT BcmCopySection(PMINI_ADAPTER Adapter, UINT BuffSize = 0 ; UINT BytesToBeCopied = 0; PUCHAR pBuff = NULL ; - INT Status = STATUS_SUCCESS ; + int Status = STATUS_SUCCESS ; if (SrcSection == DstSection) { pr_info("Source and Destination should be different ...try again\n"); return -EINVAL; @@ -4433,7 +4433,7 @@ INT BcmCopySection(PMINI_ADAPTER Adapter, **/ -INT SaveHeaderIfPresent(PMINI_ADAPTER Adapter, PUCHAR pBuff, UINT uiOffset) +int SaveHeaderIfPresent(PMINI_ADAPTER Adapter, PUCHAR pBuff, UINT uiOffset) { UINT offsetToProtect = 0, HeaderSizeToProtect =0; BOOLEAN bHasHeader = FALSE ; @@ -4503,10 +4503,10 @@ INT SaveHeaderIfPresent(PMINI_ADAPTER Adapter, PUCHAR pBuff, UINT uiOffset) OutPut:- Select the Appropriate chip and retrn status Success **/ -static INT BcmDoChipSelect(PMINI_ADAPTER Adapter, UINT offset) +static int BcmDoChipSelect(PMINI_ADAPTER Adapter, UINT offset) { UINT FlashConfig = 0; - INT ChipNum = 0; + int ChipNum = 0; UINT GPIOConfig = 0; UINT PartNum = 0; @@ -4578,7 +4578,7 @@ static INT BcmDoChipSelect(PMINI_ADAPTER Adapter, UINT offset) return STATUS_SUCCESS; } -INT ReadDSDSignature(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL dsd) +int ReadDSDSignature(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL dsd) { UINT uiDSDsig = 0; //UINT sigoffsetInMap = 0; @@ -4603,7 +4603,7 @@ INT ReadDSDSignature(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL dsd) return uiDSDsig ; } -INT ReadDSDPriority(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL dsd) +int ReadDSDPriority(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL dsd) { //UINT priOffsetInMap = 0 ; unsigned int uiDSDPri = STATUS_FAILURE; @@ -4627,8 +4627,8 @@ INT ReadDSDPriority(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL dsd) } FLASH2X_SECTION_VAL getHighestPriDSD(PMINI_ADAPTER Adapter) { - INT DSDHighestPri = STATUS_FAILURE; - INT DsdPri= 0 ; + int DSDHighestPri = STATUS_FAILURE; + int DsdPri = 0; FLASH2X_SECTION_VAL HighestPriDSD = 0 ; if (IsSectionWritable(Adapter, DSD2)) { @@ -4656,7 +4656,7 @@ FLASH2X_SECTION_VAL getHighestPriDSD(PMINI_ADAPTER Adapter) return HighestPriDSD ; } -INT ReadISOSignature(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL iso) +int ReadISOSignature(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL iso) { UINT uiISOsig = 0; //UINT sigoffsetInMap = 0; @@ -4681,7 +4681,7 @@ INT ReadISOSignature(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL iso) return uiISOsig ; } -INT ReadISOPriority(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL iso) +int ReadISOPriority(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL iso) { unsigned int ISOPri = STATUS_FAILURE; @@ -4703,8 +4703,8 @@ INT ReadISOPriority(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL iso) } FLASH2X_SECTION_VAL getHighestPriISO(PMINI_ADAPTER Adapter) { - INT ISOHighestPri = STATUS_FAILURE; - INT ISOPri= 0 ; + int ISOHighestPri = STATUS_FAILURE; + int ISOPri = 0; FLASH2X_SECTION_VAL HighestPriISO = NO_SECTION_VAL ; if (IsSectionWritable(Adapter, ISO_IMAGE2)) { @@ -4724,7 +4724,7 @@ FLASH2X_SECTION_VAL getHighestPriISO(PMINI_ADAPTER Adapter) HighestPriISO, ISOHighestPri); return HighestPriISO ; } -INT WriteToFlashWithoutSectorErase(PMINI_ADAPTER Adapter, +int WriteToFlashWithoutSectorErase(PMINI_ADAPTER Adapter, PUINT pBuff, FLASH2X_SECTION_VAL eFlash2xSectionVal, UINT uiOffset, @@ -4738,7 +4738,7 @@ INT WriteToFlashWithoutSectorErase(PMINI_ADAPTER Adapter, #endif UINT uiStartOffset = 0; //Adding section start address - INT Status = STATUS_SUCCESS; + int Status = STATUS_SUCCESS; PUCHAR pcBuff = (PUCHAR)pBuff; if (uiNumBytes % Adapter->ulFlashWriteSize) { @@ -4840,10 +4840,10 @@ BOOLEAN IsSectionExistInFlash(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL section } return SectionPresent ; } -INT IsSectionWritable(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL Section) +int IsSectionWritable(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL Section) { - INT offset = STATUS_FAILURE; - INT Status = FALSE; + int offset = STATUS_FAILURE; + int Status = FALSE; if (IsSectionExistInFlash(Adapter, Section) == FALSE) { pr_info("Section <%d> does not exist\n", Section); return FALSE; @@ -4862,7 +4862,7 @@ INT IsSectionWritable(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL Section) return Status ; } -static INT CorruptDSDSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSectionVal) +static int CorruptDSDSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSectionVal) { PUCHAR pBuff = NULL; @@ -4925,7 +4925,7 @@ static INT CorruptDSDSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSect return STATUS_SUCCESS ; } -static INT CorruptISOSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSectionVal) +static int CorruptISOSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL eFlash2xSectionVal) { PUCHAR pBuff = NULL; diff --git a/drivers/staging/bcm/vendorspecificextn.c b/drivers/staging/bcm/vendorspecificextn.c index 98a9e13..8f24fc6 100644 --- a/drivers/staging/bcm/vendorspecificextn.c +++ b/drivers/staging/bcm/vendorspecificextn.c @@ -11,7 +11,7 @@ // STATUS_SUCCESS/STATUS_FAILURE // //----------------------------------------------------------------------------- -INT vendorextnGetSectionInfo(PVOID pContext, PFLASH2X_VENDORSPECIFIC_INFO pVendorInfo) +int vendorextnGetSectionInfo(PVOID pContext, PFLASH2X_VENDORSPECIFIC_INFO pVendorInfo) { return STATUS_FAILURE; } @@ -28,7 +28,7 @@ INT vendorextnGetSectionInfo(PVOID pContext, PFLASH2X_VENDORSPECIFIC_INFO pVend // STATUS_SUCCESS/STATUS_FAILURE // //----------------------------------------------------------------------------- -INT vendorextnInit(PMINI_ADAPTER Adapter) +int vendorextnInit(PMINI_ADAPTER Adapter) { return STATUS_SUCCESS; } @@ -45,7 +45,7 @@ INT vendorextnInit(PMINI_ADAPTER Adapter) // STATUS_SUCCESS/STATUS_FAILURE // //----------------------------------------------------------------------------- -INT vendorextnExit(PMINI_ADAPTER Adapter) +int vendorextnExit(PMINI_ADAPTER Adapter) { return STATUS_SUCCESS; } @@ -65,7 +65,7 @@ INT vendorextnExit(PMINI_ADAPTER Adapter) // STATUS_SUCCESS/STATUS_FAILURE as per the IOCTL return value // //-------------------------------------------------------------------------- -INT vendorextnIoctl(PMINI_ADAPTER Adapter, UINT cmd, ULONG arg) +int vendorextnIoctl(PMINI_ADAPTER Adapter, UINT cmd, ULONG arg) { return CONTINUE_COMMON_PATH; } @@ -89,7 +89,7 @@ INT vendorextnIoctl(PMINI_ADAPTER Adapter, UINT cmd, ULONG arg) // //------------------------------------------------------------------ -INT vendorextnReadSection(PVOID pContext, PUCHAR pBuffer, FLASH2X_SECTION_VAL SectionVal, +int vendorextnReadSection(PVOID pContext, PUCHAR pBuffer, FLASH2X_SECTION_VAL SectionVal, UINT offset, UINT numOfBytes) { return STATUS_FAILURE; @@ -114,7 +114,7 @@ INT vendorextnReadSection(PVOID pContext, PUCHAR pBuffer, FLASH2X_SECTION_VAL S // STATUS_SUCCESS/STATUS_FAILURE // //------------------------------------------------------------------ -INT vendorextnWriteSection(PVOID pContext, PUCHAR pBuffer, FLASH2X_SECTION_VAL SectionVal, +int vendorextnWriteSection(PVOID pContext, PUCHAR pBuffer, FLASH2X_SECTION_VAL SectionVal, UINT offset, UINT numOfBytes, BOOLEAN bVerify) { return STATUS_FAILURE; @@ -138,7 +138,7 @@ INT vendorextnWriteSection(PVOID pContext, PUCHAR pBuffer, FLASH2X_SECTION_VAL // STATUS_SUCCESS/STATUS_FAILURE // //------------------------------------------------------------------ -INT vendorextnWriteSectionWithoutErase(PVOID pContext, PUCHAR pBuffer, FLASH2X_SECTION_VAL SectionVal, +int vendorextnWriteSectionWithoutErase(PVOID pContext, PUCHAR pBuffer, FLASH2X_SECTION_VAL SectionVal, UINT offset, UINT numOfBytes) { return STATUS_FAILURE; diff --git a/drivers/staging/bcm/vendorspecificextn.h b/drivers/staging/bcm/vendorspecificextn.h index 8112a47..83088b8 100644 --- a/drivers/staging/bcm/vendorspecificextn.h +++ b/drivers/staging/bcm/vendorspecificextn.h @@ -4,15 +4,15 @@ #define CONTINUE_COMMON_PATH 0xFFFF -INT vendorextnGetSectionInfo(PVOID pContext, PFLASH2X_VENDORSPECIFIC_INFO pVendorInfo); -INT vendorextnExit(PMINI_ADAPTER Adapter); -INT vendorextnInit(PMINI_ADAPTER Adapter); -INT vendorextnIoctl(PMINI_ADAPTER Adapter, UINT cmd, ULONG arg); -INT vendorextnReadSection(PVOID pContext, PUCHAR pBuffer, FLASH2X_SECTION_VAL SectionVal, +int vendorextnGetSectionInfo(PVOID pContext, PFLASH2X_VENDORSPECIFIC_INFO pVendorInfo); +int vendorextnExit(PMINI_ADAPTER Adapter); +int vendorextnInit(PMINI_ADAPTER Adapter); +int vendorextnIoctl(PMINI_ADAPTER Adapter, UINT cmd, ULONG arg); +int vendorextnReadSection(PVOID pContext, PUCHAR pBuffer, FLASH2X_SECTION_VAL SectionVal, UINT offset, UINT numOfBytes); -INT vendorextnWriteSection(PVOID pContext, PUCHAR pBuffer, FLASH2X_SECTION_VAL SectionVal, +int vendorextnWriteSection(PVOID pContext, PUCHAR pBuffer, FLASH2X_SECTION_VAL SectionVal, UINT offset, UINT numOfBytes, BOOLEAN bVerify); -INT vendorextnWriteSectionWithoutErase(PVOID pContext, PUCHAR pBuffer, FLASH2X_SECTION_VAL SectionVal, +int vendorextnWriteSectionWithoutErase(PVOID pContext, PUCHAR pBuffer, FLASH2X_SECTION_VAL SectionVal, UINT offset, UINT numOfBytes); #endif /* */ -- 1.7.8.111.gad25c.dirty _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel