2013-10-26 06:15:28

by Kevin McKinney

[permalink] [raw]
Subject: [PATCH 01/11] Staging: bcm: Fix WARNING: space prohibited before semicolon.

This patch removes a space before semicolon as
specified by checkpatch.pl.

Signed-off-by: Kevin McKinney <[email protected]>
---
drivers/staging/bcm/Adapter.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/bcm/Adapter.h b/drivers/staging/bcm/Adapter.h
index 1d8bf08..c2c0e6c 100644
--- a/drivers/staging/bcm/Adapter.h
+++ b/drivers/staging/bcm/Adapter.h
@@ -267,7 +267,7 @@ struct bcm_mini_adapter {
BOOLEAN fw_download_done;

char *txctlpacket[MAX_CNTRL_PKTS];
- atomic_t cntrlpktCnt ;
+ atomic_t cntrlpktCnt;
atomic_t index_app_read_cntrlpkt;
atomic_t index_wr_txcntrlpkt;
atomic_t index_rd_txcntrlpkt;
--
1.7.9.5


2013-10-26 06:15:34

by Kevin McKinney

[permalink] [raw]
Subject: [PATCH 03/11] Staging: bcm: Replace USHORT with unsigned short in Adapter.h

This patch replace "USHORT" with "unsigned
short" in Adapter.h

Signed-off-by: Kevin McKinney <[email protected]>
---
drivers/staging/bcm/Adapter.h | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/bcm/Adapter.h b/drivers/staging/bcm/Adapter.h
index cd224f2..8f0033a 100644
--- a/drivers/staging/bcm/Adapter.h
+++ b/drivers/staging/bcm/Adapter.h
@@ -8,8 +8,8 @@
#include "Debug.h"

struct bcm_leader {
- USHORT Vcid;
- USHORT PLength;
+ unsigned short Vcid;
+ unsigned short PLength;
UCHAR Status;
UCHAR Unused[3];
} __packed;
@@ -64,7 +64,7 @@ struct bcm_classifier_rule {
UCHAR ucReserved[2];
B_UINT16 uiClassifierRuleIndex;
BOOLEAN bUsed;
- USHORT usVCID_Value;
+ unsigned short usVCID_Value;
B_UINT8 u8ClassifierRulePriority; /* This field detemines the Classifier Priority */
union bcm_ip_address stSrcIpAddress;
UCHAR ucIPSourceAddressLength; /* Ip Source Address Length */
@@ -78,12 +78,12 @@ struct bcm_classifier_rule {

UCHAR ucProtocolLength; /* protocol Length */
UCHAR ucProtocol[MAX_PROTOCOL_LENGTH]; /* protocol Length */
- USHORT usSrcPortRangeLo[MAX_PORT_RANGE];
- USHORT usSrcPortRangeHi[MAX_PORT_RANGE];
+ unsigned short usSrcPortRangeLo[MAX_PORT_RANGE];
+ unsigned short usSrcPortRangeHi[MAX_PORT_RANGE];
UCHAR ucSrcPortRangeLength;

- USHORT usDestPortRangeLo[MAX_PORT_RANGE];
- USHORT usDestPortRangeHi[MAX_PORT_RANGE];
+ unsigned short usDestPortRangeLo[MAX_PORT_RANGE];
+ unsigned short usDestPortRangeHi[MAX_PORT_RANGE];
UCHAR ucDestPortRangeLength;

BOOLEAN bProtocolValid;
@@ -108,14 +108,14 @@ struct bcm_classifier_rule {
UCHAR ucEtherTypeLen;
UCHAR au8EthCSEtherType[NUM_ETHERTYPE_BYTES];
UCHAR usUserPriority[2];
- USHORT usVLANID;
- USHORT usValidityBitMap;
+ unsigned short usVLANID;
+ unsigned short usValidityBitMap;
};

struct bcm_fragmented_packet_info {
BOOLEAN bUsed;
ULONG ulSrcIpAddress;
- USHORT usIpIdentification;
+ unsigned short usIpIdentification;
struct bcm_classifier_rule *pstMatchedClassifierEntry;
BOOLEAN bOutOfOrderFragment;
};
@@ -123,7 +123,7 @@ struct bcm_fragmented_packet_info {
struct bcm_packet_info {
/* classification extension Rule */
ULONG ulSFID;
- USHORT usVCID_Value;
+ unsigned short usVCID_Value;
UINT uiThreshold;
/* This field determines the priority of the SF Queues */
B_UINT8 u8TrafficPriority;
@@ -150,7 +150,7 @@ struct bcm_packet_info {
UINT uiMaxAllowedRate;
UINT NumOfPacketsSent;
UCHAR ucDirection;
- USHORT usCID;
+ unsigned short usCID;
struct bcm_mibs_parameters stMibsExtServiceFlowTable;
UINT uiCurrentRxRate;
UINT uiThisPeriodRxBytes;
@@ -244,8 +244,8 @@ struct bcm_mini_adapter {
/* this to keep track of the Tx and Rx MailBox Registers. */
atomic_t CurrNumFreeTxDesc;
/* to keep track the no of byte received */
- USHORT PrevNumRecvDescs;
- USHORT CurrNumRecvDescs;
+ unsigned short PrevNumRecvDescs;
+ unsigned short CurrNumRecvDescs;
UINT u32TotalDSD;
struct bcm_packet_info PackInfo[NO_OF_QUEUES];
struct bcm_classifier_rule astClassifierTable[MAX_CLASSIFIERS];
@@ -284,7 +284,7 @@ struct bcm_mini_adapter {
BOOLEAN bBinDownloaded;
BOOLEAN bCfgDownloaded;
BOOLEAN bSyncUpRequestSent;
- USHORT usBestEffortQueueIndex;
+ unsigned short usBestEffortQueueIndex;
wait_queue_head_t ioctl_fw_dnld_wait_queue;
BOOLEAN waiting_to_fw_download_done;
pid_t fw_download_process_pid;
@@ -400,7 +400,7 @@ struct bcm_mini_adapter {
struct bcm_eth_header {
UCHAR au8DestinationAddress[6];
UCHAR au8SourceAddress[6];
- USHORT u16Etype;
+ unsigned short u16Etype;
} __packed;

struct bcm_firmware_info {
--
1.7.9.5

2013-10-26 06:16:08

by Kevin McKinney

[permalink] [raw]
Subject: [PATCH 08/11] Staging: bcm: Replace UINT32 with u32 in Adapter.h

This patch replaces "UINT32" with "u32"
in Adapter.h

Signed-off-by: Kevin McKinney <[email protected]>
---
drivers/staging/bcm/Adapter.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/bcm/Adapter.h b/drivers/staging/bcm/Adapter.h
index 27b5011..eeeea34 100644
--- a/drivers/staging/bcm/Adapter.h
+++ b/drivers/staging/bcm/Adapter.h
@@ -94,7 +94,7 @@ struct bcm_classifier_rule {
/* For IPv6 Addressing */
unsigned char ucDirection;
BOOLEAN bIpv6Protocol;
- UINT32 u32PHSRuleID;
+ u32 u32PHSRuleID;
struct bcm_phs_rule sPhsRule;
unsigned char u8AssociatedPHSI;

@@ -340,11 +340,11 @@ struct bcm_mini_adapter {
BOOLEAN AutoFirmDld;
BOOLEAN bMipsConfig;
BOOLEAN bDPLLConfig;
- UINT32 aTxPktSizeHist[MIBS_MAX_HIST_ENTRIES];
- UINT32 aRxPktSizeHist[MIBS_MAX_HIST_ENTRIES];
+ u32 aTxPktSizeHist[MIBS_MAX_HIST_ENTRIES];
+ u32 aRxPktSizeHist[MIBS_MAX_HIST_ENTRIES];
struct bcm_fragmented_packet_info astFragmentedPktClassifierTable[MAX_FRAGMENTEDIP_CLASSIFICATION_ENTRIES];
atomic_t uiMBupdate;
- UINT32 PmuMode;
+ u32 PmuMode;
enum bcm_nvm_type eNVMType;
UINT uiSectorSize;
UINT uiSectorSizeInCFG;
@@ -388,7 +388,7 @@ struct bcm_mini_adapter {
BOOLEAN bDoSuspend;
UINT syscfgBefFwDld;
BOOLEAN StopAllXaction;
- UINT32 liTimeSinceLastNetEntry; /* Used to Support extended CAPI requirements from */
+ u32 liTimeSinceLastNetEntry; /* Used to Support extended CAPI requirements from */
struct semaphore LowPowerModeSync;
unsigned long liDrainCalculated;
UINT gpioBitMap;
--
1.7.9.5

2013-10-26 06:16:06

by Kevin McKinney

[permalink] [raw]
Subject: [PATCH 11/11] Staging: bcm: Replace BOOLEAN with bool in Adapter.h

This patch replaces "BOOLEAN" with "bool"
in Adapter.h

Signed-off-by: Kevin McKinney <[email protected]>
---
drivers/staging/bcm/Adapter.h | 122 ++++++++++++++++++++---------------------
1 file changed, 61 insertions(+), 61 deletions(-)

diff --git a/drivers/staging/bcm/Adapter.h b/drivers/staging/bcm/Adapter.h
index c5891dd..ac81954 100644
--- a/drivers/staging/bcm/Adapter.h
+++ b/drivers/staging/bcm/Adapter.h
@@ -63,7 +63,7 @@ struct bcm_classifier_rule {
unsigned long ulSFID;
unsigned char ucReserved[2];
u16 uiClassifierRuleIndex;
- BOOLEAN bUsed;
+ bool bUsed;
unsigned short usVCID_Value;
u8 u8ClassifierRulePriority; /* This field detemines the Classifier Priority */
union bcm_ip_address stSrcIpAddress;
@@ -86,14 +86,14 @@ struct bcm_classifier_rule {
unsigned short usDestPortRangeHi[MAX_PORT_RANGE];
unsigned char ucDestPortRangeLength;

- BOOLEAN bProtocolValid;
- BOOLEAN bTOSValid;
- BOOLEAN bDestIpValid;
- BOOLEAN bSrcIpValid;
+ bool bProtocolValid;
+ bool bTOSValid;
+ bool bDestIpValid;
+ bool bSrcIpValid;

/* For IPv6 Addressing */
unsigned char ucDirection;
- BOOLEAN bIpv6Protocol;
+ bool bIpv6Protocol;
u32 u32PHSRuleID;
struct bcm_phs_rule sPhsRule;
unsigned char u8AssociatedPHSI;
@@ -113,11 +113,11 @@ struct bcm_classifier_rule {
};

struct bcm_fragmented_packet_info {
- BOOLEAN bUsed;
+ bool bUsed;
unsigned long ulSrcIpAddress;
unsigned short usIpIdentification;
struct bcm_classifier_rule *pstMatchedClassifierEntry;
- BOOLEAN bOutOfOrderFragment;
+ bool bOutOfOrderFragment;
};

struct bcm_packet_info {
@@ -128,9 +128,9 @@ struct bcm_packet_info {
/* This field determines the priority of the SF Queues */
u8 u8TrafficPriority;

- BOOLEAN bValid;
- BOOLEAN bActive;
- BOOLEAN bActivateRequestSent;
+ bool bValid;
+ bool bActive;
+ bool bActivateRequestSent;

u8 u8QueueType; /* BE or rtPS */

@@ -170,17 +170,17 @@ struct bcm_packet_info {
};
};

- BOOLEAN bProtocolValid;
- BOOLEAN bTOSValid;
- BOOLEAN bDestIpValid;
- BOOLEAN bSrcIpValid;
+ bool bProtocolValid;
+ bool bTOSValid;
+ bool bDestIpValid;
+ bool bSrcIpValid;

- BOOLEAN bActiveSet;
- BOOLEAN bAdmittedSet;
- BOOLEAN bAuthorizedSet;
- BOOLEAN bClassifierPriority;
+ bool bActiveSet;
+ bool bAdmittedSet;
+ bool bAuthorizedSet;
+ bool bClassifierPriority;
unsigned char ucServiceClassName[MAX_CLASS_NAME_LENGTH];
- BOOLEAN bHeaderSuppressionEnabled;
+ bool bHeaderSuppressionEnabled;
spinlock_t SFQueueLock;
void *pstSFIndication;
struct timeval stLastUpdateTokenAt;
@@ -196,8 +196,8 @@ struct bcm_tarang_data {
struct sk_buff *RxAppControlHead;
struct sk_buff *RxAppControlTail;
int AppCtrlQueueLen;
- BOOLEAN MacTracingEnabled;
- BOOLEAN bApplicationToExit;
+ bool MacTracingEnabled;
+ bool bApplicationToExit;
struct bcm_mibs_dropped_cntrl_msg stDroppedAppCntrlMsgs;
unsigned long RxCntrlMsgBitMask;
};
@@ -205,7 +205,7 @@ struct bcm_tarang_data {
struct bcm_targetdsx_buffer {
unsigned long ulTargetDsxBuffer;
u16 tid;
- BOOLEAN valid;
+ bool valid;
};

typedef int (*FP_FLASH_WRITE)(struct bcm_mini_adapter *, unsigned int, void *);
@@ -221,11 +221,11 @@ struct bcm_mini_adapter {
u32 msg_enable;
CHAR *caDsxReqResp;
atomic_t ApplicationRunning;
- BOOLEAN AppCtrlQueueOverFlow;
+ bool AppCtrlQueueOverFlow;
atomic_t CurrentApplicationCount;
atomic_t RegisteredApplicationCount;
- BOOLEAN LinkUpStatus;
- BOOLEAN TimerActive;
+ bool LinkUpStatus;
+ bool TimerActive;
u32 StatisticsPointer;
struct sk_buff *RxControlHead;
struct sk_buff *RxControlTail;
@@ -249,22 +249,22 @@ struct bcm_mini_adapter {
unsigned int u32TotalDSD;
struct bcm_packet_info PackInfo[NO_OF_QUEUES];
struct bcm_classifier_rule astClassifierTable[MAX_CLASSIFIERS];
- BOOLEAN TransferMode;
+ bool TransferMode;

/*************** qos ******************/
- BOOLEAN bETHCSEnabled;
+ bool bETHCSEnabled;
unsigned long BEBucketSize;
unsigned long rtPSBucketSize;
unsigned char LinkStatus;
- BOOLEAN AutoLinkUp;
- BOOLEAN AutoSyncup;
+ bool AutoLinkUp;
+ bool AutoSyncup;

int major;
int minor;
wait_queue_head_t tx_packet_wait_queue;
wait_queue_head_t process_rx_cntrlpkt;
atomic_t process_waiting;
- BOOLEAN fw_download_done;
+ bool fw_download_done;

char *txctlpacket[MAX_CNTRL_PKTS];
atomic_t cntrlpktCnt;
@@ -280,19 +280,19 @@ struct bcm_mini_adapter {
unsigned long ulTotalTargetBuffersAvailable;
unsigned long chip_id;
wait_queue_head_t lowpower_mode_wait_queue;
- BOOLEAN bFlashBoot;
- BOOLEAN bBinDownloaded;
- BOOLEAN bCfgDownloaded;
- BOOLEAN bSyncUpRequestSent;
+ bool bFlashBoot;
+ bool bBinDownloaded;
+ bool bCfgDownloaded;
+ bool bSyncUpRequestSent;
unsigned short usBestEffortQueueIndex;
wait_queue_head_t ioctl_fw_dnld_wait_queue;
- BOOLEAN waiting_to_fw_download_done;
+ bool waiting_to_fw_download_done;
pid_t fw_download_process_pid;
struct bcm_target_params *pstargetparams;
- BOOLEAN device_removed;
- BOOLEAN DeviceAccess;
- BOOLEAN bIsAutoCorrectEnabled;
- BOOLEAN bDDRInitDone;
+ bool device_removed;
+ bool DeviceAccess;
+ bool bIsAutoCorrectEnabled;
+ bool bDDRInitDone;
int DDRSetting;
unsigned long ulPowerSaveMode;
spinlock_t txtransmitlock;
@@ -324,22 +324,22 @@ struct bcm_mini_adapter {
void *,
int);
int (*interface_transmit)(void *, void *, unsigned int);
- BOOLEAN IdleMode;
- BOOLEAN bDregRequestSentInIdleMode;
- BOOLEAN bTriedToWakeUpFromlowPowerMode;
- BOOLEAN bShutStatus;
- BOOLEAN bWakeUpDevice;
+ bool IdleMode;
+ bool bDregRequestSentInIdleMode;
+ bool bTriedToWakeUpFromlowPowerMode;
+ bool bShutStatus;
+ bool bWakeUpDevice;
unsigned int usIdleModePattern;
- /* BOOLEAN bTriedToWakeUpFromShutdown; */
- BOOLEAN bLinkDownRequested;
+ /* bool bTriedToWakeUpFromShutdown; */
+ bool bLinkDownRequested;
int downloadDDR;
struct bcm_phs_extension stBCMPhsContext;
struct bcm_hdr_suppression_contextinfo stPhsTxContextInfo;
uint8_t ucaPHSPktRestoreBuf[2048];
uint8_t bPHSEnabled;
- BOOLEAN AutoFirmDld;
- BOOLEAN bMipsConfig;
- BOOLEAN bDPLLConfig;
+ bool AutoFirmDld;
+ bool bMipsConfig;
+ bool bDPLLConfig;
u32 aTxPktSizeHist[MIBS_MAX_HIST_ENTRIES];
u32 aRxPktSizeHist[MIBS_MAX_HIST_ENTRIES];
struct bcm_fragmented_packet_info astFragmentedPktClassifierTable[MAX_FRAGMENTEDIP_CLASSIFICATION_ENTRIES];
@@ -348,8 +348,8 @@ struct bcm_mini_adapter {
enum bcm_nvm_type eNVMType;
unsigned int uiSectorSize;
unsigned int uiSectorSizeInCFG;
- BOOLEAN bSectorSizeOverride;
- BOOLEAN bStatusWrite;
+ bool bSectorSizeOverride;
+ bool bStatusWrite;
unsigned int uiNVMDSDSize;
unsigned int uiVendorExtnFlag;
/* it will always represent chosen DSD at any point of time.
@@ -365,7 +365,7 @@ struct bcm_mini_adapter {
struct semaphore NVMRdmWrmLock;
struct device *pstCreatedClassDevice;

- /* BOOLEAN InterfaceUpStatus; */
+ /* bool InterfaceUpStatus; */
struct bcm_flash2x_cs_info *psFlash2xCSInfo;
struct bcm_flash_cs_info *psFlashCSInfo;
struct bcm_flash2x_vendor_info *psFlash2xVendorInfo;
@@ -376,18 +376,18 @@ struct bcm_mini_adapter {
unsigned int uiActiveDSDOffsetAtFwDld; /* For accessing Active DSD chosen before f/w download */
unsigned int uiFlashLayoutMajorVersion;
unsigned int uiFlashLayoutMinorVersion;
- BOOLEAN bAllDSDWriteAllow;
- BOOLEAN bSigCorrupted;
+ bool bAllDSDWriteAllow;
+ bool bSigCorrupted;
/* this should be set who so ever want to change the Headers. after Wrtie it should be reset immediately. */
- BOOLEAN bHeaderChangeAllowed;
+ bool bHeaderChangeAllowed;
int SelectedChip;
- BOOLEAN bEndPointHalted;
+ bool bEndPointHalted;
/* while bFlashRawRead will be true, Driver ignore map lay out and consider flash as of without any map. */
- BOOLEAN bFlashRawRead;
- BOOLEAN bPreparingForLowPowerMode;
- BOOLEAN bDoSuspend;
+ bool bFlashRawRead;
+ bool bPreparingForLowPowerMode;
+ bool bDoSuspend;
unsigned int syscfgBefFwDld;
- BOOLEAN StopAllXaction;
+ bool StopAllXaction;
u32 liTimeSinceLastNetEntry; /* Used to Support extended CAPI requirements from */
struct semaphore LowPowerModeSync;
unsigned long liDrainCalculated;
--
1.7.9.5

2013-10-26 06:16:03

by Kevin McKinney

[permalink] [raw]
Subject: [PATCH 10/11] Staging: bcm: Replace PVOID with void * in Adapter.h

This patch replaces "PVOID" with "void *"
in Adapter.h

Signed-off-by: Kevin McKinney <[email protected]>
---
drivers/staging/bcm/Adapter.h | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/bcm/Adapter.h b/drivers/staging/bcm/Adapter.h
index 2074c18..c5891dd 100644
--- a/drivers/staging/bcm/Adapter.h
+++ b/drivers/staging/bcm/Adapter.h
@@ -20,7 +20,7 @@ struct bcm_packettosend {
} __packed;

struct bcm_control_packet {
- PVOID ControlBuff;
+ void *ControlBuff;
unsigned int ControlBuffLen;
struct bcm_control_packet *next;
} __packed;
@@ -208,9 +208,9 @@ struct bcm_targetdsx_buffer {
BOOLEAN valid;
};

-typedef int (*FP_FLASH_WRITE)(struct bcm_mini_adapter *, unsigned int, PVOID);
+typedef int (*FP_FLASH_WRITE)(struct bcm_mini_adapter *, unsigned int, void *);

-typedef int (*FP_FLASH_WRITE_STATUS)(struct bcm_mini_adapter *, unsigned int, PVOID);
+typedef int (*FP_FLASH_WRITE_STATUS)(struct bcm_mini_adapter *, unsigned int, void *);

/*
* Driver adapter data structure
@@ -308,22 +308,22 @@ struct bcm_mini_adapter {
/* Driver State for LED Blinking */
enum bcm_led_events DriverState;
/* Interface Specific */
- PVOID pvInterfaceAdapter;
- int (*bcm_file_download)(PVOID,
+ void *pvInterfaceAdapter;
+ int (*bcm_file_download)(void *,
struct file *,
unsigned int);
- int (*bcm_file_readback_from_chip)(PVOID,
+ int (*bcm_file_readback_from_chip)(void *,
struct file *,
unsigned int);
- int (*interface_rdm)(PVOID,
+ int (*interface_rdm)(void *,
unsigned int,
- PVOID,
+ void *,
int);
- int (*interface_wrm)(PVOID,
+ int (*interface_wrm)(void *,
unsigned int,
- PVOID,
+ void *,
int);
- int (*interface_transmit)(PVOID, PVOID , unsigned int);
+ int (*interface_transmit)(void *, void *, unsigned int);
BOOLEAN IdleMode;
BOOLEAN bDregRequestSentInIdleMode;
BOOLEAN bTriedToWakeUpFromlowPowerMode;
--
1.7.9.5

2013-10-26 06:16:01

by Kevin McKinney

[permalink] [raw]
Subject: [PATCH 09/11] Staging: bcm: Replace UINT with unsigned int in Adapter.h

This patch replaces "UINT" with "unsigned
int" in Adapter.h

Signed-off-by: Kevin McKinney <[email protected]>
---
drivers/staging/bcm/Adapter.h | 84 ++++++++++++++++++++---------------------
1 file changed, 42 insertions(+), 42 deletions(-)

diff --git a/drivers/staging/bcm/Adapter.h b/drivers/staging/bcm/Adapter.h
index eeeea34..2074c18 100644
--- a/drivers/staging/bcm/Adapter.h
+++ b/drivers/staging/bcm/Adapter.h
@@ -21,7 +21,7 @@ struct bcm_packettosend {

struct bcm_control_packet {
PVOID ControlBuff;
- UINT ControlBuffLen;
+ unsigned int ControlBuffLen;
struct bcm_control_packet *next;
} __packed;

@@ -124,7 +124,7 @@ struct bcm_packet_info {
/* classification extension Rule */
unsigned long ulSFID;
unsigned short usVCID_Value;
- UINT uiThreshold;
+ unsigned int uiThreshold;
/* This field determines the priority of the SF Queues */
u8 u8TrafficPriority;

@@ -134,29 +134,29 @@ struct bcm_packet_info {

u8 u8QueueType; /* BE or rtPS */

- UINT uiMaxBucketSize; /* maximum size of the bucket for the queue */
- UINT uiCurrentQueueDepthOnTarget;
- UINT uiCurrentBytesOnHost;
- UINT uiCurrentPacketsOnHost;
- UINT uiDroppedCountBytes;
- UINT uiDroppedCountPackets;
- UINT uiSentBytes;
- UINT uiSentPackets;
- UINT uiCurrentDrainRate;
- UINT uiThisPeriodSentBytes;
+ unsigned int uiMaxBucketSize; /* maximum size of the bucket for the queue */
+ unsigned int uiCurrentQueueDepthOnTarget;
+ unsigned int uiCurrentBytesOnHost;
+ unsigned int uiCurrentPacketsOnHost;
+ unsigned int uiDroppedCountBytes;
+ unsigned int uiDroppedCountPackets;
+ unsigned int uiSentBytes;
+ unsigned int uiSentPackets;
+ unsigned int uiCurrentDrainRate;
+ unsigned int uiThisPeriodSentBytes;
LARGE_INTEGER liDrainCalculated;
- UINT uiCurrentTokenCount;
+ unsigned int uiCurrentTokenCount;
LARGE_INTEGER liLastUpdateTokenAt;
- UINT uiMaxAllowedRate;
- UINT NumOfPacketsSent;
+ unsigned int uiMaxAllowedRate;
+ unsigned int NumOfPacketsSent;
unsigned char ucDirection;
unsigned short usCID;
struct bcm_mibs_parameters stMibsExtServiceFlowTable;
- UINT uiCurrentRxRate;
- UINT uiThisPeriodRxBytes;
- UINT uiTotalRxBytes;
- UINT uiTotalTxBytes;
- UINT uiPendedLast;
+ unsigned int uiCurrentRxRate;
+ unsigned int uiThisPeriodRxBytes;
+ unsigned int uiTotalRxBytes;
+ unsigned int uiTotalTxBytes;
+ unsigned int uiPendedLast;
unsigned char ucIpVersion;

union {
@@ -185,7 +185,7 @@ struct bcm_packet_info {
void *pstSFIndication;
struct timeval stLastUpdateTokenAt;
atomic_t uiPerSFTxResourceCount;
- UINT uiMaxLatency;
+ unsigned int uiMaxLatency;
unsigned char bIPCSSupport;
unsigned char bEthCSSupport;
};
@@ -208,9 +208,9 @@ struct bcm_targetdsx_buffer {
BOOLEAN valid;
};

-typedef int (*FP_FLASH_WRITE)(struct bcm_mini_adapter *, UINT, PVOID);
+typedef int (*FP_FLASH_WRITE)(struct bcm_mini_adapter *, unsigned int, PVOID);

-typedef int (*FP_FLASH_WRITE_STATUS)(struct bcm_mini_adapter *, UINT, PVOID);
+typedef int (*FP_FLASH_WRITE_STATUS)(struct bcm_mini_adapter *, unsigned int, PVOID);

/*
* Driver adapter data structure
@@ -246,7 +246,7 @@ struct bcm_mini_adapter {
/* to keep track the no of byte received */
unsigned short PrevNumRecvDescs;
unsigned short CurrNumRecvDescs;
- UINT u32TotalDSD;
+ unsigned int u32TotalDSD;
struct bcm_packet_info PackInfo[NO_OF_QUEUES];
struct bcm_classifier_rule astClassifierTable[MAX_CLASSIFIERS];
BOOLEAN TransferMode;
@@ -271,7 +271,7 @@ struct bcm_mini_adapter {
atomic_t index_app_read_cntrlpkt;
atomic_t index_wr_txcntrlpkt;
atomic_t index_rd_txcntrlpkt;
- UINT index_datpkt;
+ unsigned int index_datpkt;
struct semaphore rdmwrmsync;

struct bcm_targetdsx_buffer astTargetDsxBuffer[MAX_TARGET_DSX_BUFFERS];
@@ -316,14 +316,14 @@ struct bcm_mini_adapter {
struct file *,
unsigned int);
int (*interface_rdm)(PVOID,
- UINT,
+ unsigned int,
PVOID,
int);
int (*interface_wrm)(PVOID,
- UINT,
+ unsigned int,
PVOID,
int);
- int (*interface_transmit)(PVOID, PVOID , UINT);
+ int (*interface_transmit)(PVOID, PVOID , unsigned int);
BOOLEAN IdleMode;
BOOLEAN bDregRequestSentInIdleMode;
BOOLEAN bTriedToWakeUpFromlowPowerMode;
@@ -346,16 +346,16 @@ struct bcm_mini_adapter {
atomic_t uiMBupdate;
u32 PmuMode;
enum bcm_nvm_type eNVMType;
- UINT uiSectorSize;
- UINT uiSectorSizeInCFG;
+ unsigned int uiSectorSize;
+ unsigned int uiSectorSizeInCFG;
BOOLEAN bSectorSizeOverride;
BOOLEAN bStatusWrite;
- UINT uiNVMDSDSize;
- UINT uiVendorExtnFlag;
+ unsigned int uiNVMDSDSize;
+ unsigned int uiVendorExtnFlag;
/* it will always represent chosen DSD at any point of time.
* Generally it is Active DSD but in case of NVM RD/WR it might be different.
*/
- UINT ulFlashCalStart;
+ unsigned int ulFlashCalStart;
unsigned long ulFlashControlSectionStart;
unsigned long ulFlashWriteSize;
unsigned long ulFlashID;
@@ -369,13 +369,13 @@ struct bcm_mini_adapter {
struct bcm_flash2x_cs_info *psFlash2xCSInfo;
struct bcm_flash_cs_info *psFlashCSInfo;
struct bcm_flash2x_vendor_info *psFlash2xVendorInfo;
- UINT uiFlashBaseAdd; /* Flash start address */
- UINT uiActiveISOOffset; /* Active ISO offset chosen before f/w download */
+ unsigned int uiFlashBaseAdd; /* Flash start address */
+ unsigned int uiActiveISOOffset; /* Active ISO offset chosen before f/w download */
enum bcm_flash2x_section_val eActiveISO; /* Active ISO section val */
enum bcm_flash2x_section_val eActiveDSD; /* Active DSD val chosen before f/w download */
- UINT uiActiveDSDOffsetAtFwDld; /* For accessing Active DSD chosen before f/w download */
- UINT uiFlashLayoutMajorVersion;
- UINT uiFlashLayoutMinorVersion;
+ unsigned int uiActiveDSDOffsetAtFwDld; /* For accessing Active DSD chosen before f/w download */
+ unsigned int uiFlashLayoutMajorVersion;
+ unsigned int uiFlashLayoutMinorVersion;
BOOLEAN bAllDSDWriteAllow;
BOOLEAN bSigCorrupted;
/* this should be set who so ever want to change the Headers. after Wrtie it should be reset immediately. */
@@ -386,12 +386,12 @@ struct bcm_mini_adapter {
BOOLEAN bFlashRawRead;
BOOLEAN bPreparingForLowPowerMode;
BOOLEAN bDoSuspend;
- UINT syscfgBefFwDld;
+ unsigned int syscfgBefFwDld;
BOOLEAN StopAllXaction;
u32 liTimeSinceLastNetEntry; /* Used to Support extended CAPI requirements from */
struct semaphore LowPowerModeSync;
unsigned long liDrainCalculated;
- UINT gpioBitMap;
+ unsigned int gpioBitMap;
struct bcm_debug_state stDebugState;
};

@@ -413,8 +413,8 @@ struct bcm_firmware_info {
extern struct net_device *gblpnetdev;

struct bcm_ddr_setting {
- UINT ulRegAddress;
- UINT ulRegValue;
+ unsigned int ulRegAddress;
+ unsigned int ulRegValue;
};
int InitAdapter(struct bcm_mini_adapter *psAdapter);

--
1.7.9.5

2013-10-26 06:15:59

by Kevin McKinney

[permalink] [raw]
Subject: [PATCH 07/11] Staging: bcm: Replace B_UINT8 with u8 in Adapter.h

This patch replaces "B_UINT8" with "u8"
in Adapter.h

Signed-off-by: Kevin McKinney <[email protected]>
---
drivers/staging/bcm/Adapter.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/bcm/Adapter.h b/drivers/staging/bcm/Adapter.h
index fbd06a1..27b5011 100644
--- a/drivers/staging/bcm/Adapter.h
+++ b/drivers/staging/bcm/Adapter.h
@@ -65,7 +65,7 @@ struct bcm_classifier_rule {
u16 uiClassifierRuleIndex;
BOOLEAN bUsed;
unsigned short usVCID_Value;
- B_UINT8 u8ClassifierRulePriority; /* This field detemines the Classifier Priority */
+ u8 u8ClassifierRulePriority; /* This field detemines the Classifier Priority */
union bcm_ip_address stSrcIpAddress;
unsigned char ucIPSourceAddressLength; /* Ip Source Address Length */

@@ -126,13 +126,13 @@ struct bcm_packet_info {
unsigned short usVCID_Value;
UINT uiThreshold;
/* This field determines the priority of the SF Queues */
- B_UINT8 u8TrafficPriority;
+ u8 u8TrafficPriority;

BOOLEAN bValid;
BOOLEAN bActive;
BOOLEAN bActivateRequestSent;

- B_UINT8 u8QueueType; /* BE or rtPS */
+ u8 u8QueueType; /* BE or rtPS */

UINT uiMaxBucketSize; /* maximum size of the bucket for the queue */
UINT uiCurrentQueueDepthOnTarget;
@@ -296,7 +296,7 @@ struct bcm_mini_adapter {
int DDRSetting;
unsigned long ulPowerSaveMode;
spinlock_t txtransmitlock;
- B_UINT8 txtransmit_running;
+ u8 txtransmit_running;
/* Thread for control packet handling */
struct task_struct *control_packet_handler;
/* thread for transmitting packets. */
--
1.7.9.5

2013-10-26 06:15:58

by Kevin McKinney

[permalink] [raw]
Subject: [PATCH 05/11] Staging: bcm: Replace ULONG with unsigned long in Adapter.h

This patch replace "ULONG" with "unsigned
long" in Adapter.h

Signed-off-by: Kevin McKinney <[email protected]>
---
drivers/staging/bcm/Adapter.h | 42 ++++++++++++++++++++---------------------
1 file changed, 21 insertions(+), 21 deletions(-)

diff --git a/drivers/staging/bcm/Adapter.h b/drivers/staging/bcm/Adapter.h
index eaf9532..4c9662b 100644
--- a/drivers/staging/bcm/Adapter.h
+++ b/drivers/staging/bcm/Adapter.h
@@ -37,12 +37,12 @@ struct bcm_link_request {

union bcm_ip_address {
struct {
- ULONG ulIpv4Addr[MAX_IP_RANGE_LENGTH]; /* Source Ip Address Range */
- ULONG ulIpv4Mask[MAX_IP_RANGE_LENGTH]; /* Source Ip Mask Address Range */
+ unsigned long ulIpv4Addr[MAX_IP_RANGE_LENGTH]; /* Source Ip Address Range */
+ unsigned long ulIpv4Mask[MAX_IP_RANGE_LENGTH]; /* Source Ip Mask Address Range */
};
struct {
- ULONG ulIpv6Addr[MAX_IP_RANGE_LENGTH * 4]; /* Source Ip Address Range */
- ULONG ulIpv6Mask[MAX_IP_RANGE_LENGTH * 4]; /* Source Ip Mask Address Range */
+ unsigned long ulIpv6Addr[MAX_IP_RANGE_LENGTH * 4]; /* Source Ip Address Range */
+ unsigned long ulIpv6Mask[MAX_IP_RANGE_LENGTH * 4]; /* Source Ip Mask Address Range */
};
struct {
unsigned char ucIpv4Address[MAX_IP_RANGE_LENGTH * IP_LENGTH_OF_ADDRESS];
@@ -60,7 +60,7 @@ struct bcm_hdr_suppression_contextinfo {
};

struct bcm_classifier_rule {
- ULONG ulSFID;
+ unsigned long ulSFID;
unsigned char ucReserved[2];
B_UINT16 uiClassifierRuleIndex;
BOOLEAN bUsed;
@@ -114,7 +114,7 @@ struct bcm_classifier_rule {

struct bcm_fragmented_packet_info {
BOOLEAN bUsed;
- ULONG ulSrcIpAddress;
+ unsigned long ulSrcIpAddress;
unsigned short usIpIdentification;
struct bcm_classifier_rule *pstMatchedClassifierEntry;
BOOLEAN bOutOfOrderFragment;
@@ -122,7 +122,7 @@ struct bcm_fragmented_packet_info {

struct bcm_packet_info {
/* classification extension Rule */
- ULONG ulSFID;
+ unsigned long ulSFID;
unsigned short usVCID_Value;
UINT uiThreshold;
/* This field determines the priority of the SF Queues */
@@ -199,11 +199,11 @@ struct bcm_tarang_data {
BOOLEAN MacTracingEnabled;
BOOLEAN bApplicationToExit;
struct bcm_mibs_dropped_cntrl_msg stDroppedAppCntrlMsgs;
- ULONG RxCntrlMsgBitMask;
+ unsigned long RxCntrlMsgBitMask;
};

struct bcm_targetdsx_buffer {
- ULONG ulTargetDsxBuffer;
+ unsigned long ulTargetDsxBuffer;
B_UINT16 tid;
BOOLEAN valid;
};
@@ -253,8 +253,8 @@ struct bcm_mini_adapter {

/*************** qos ******************/
BOOLEAN bETHCSEnabled;
- ULONG BEBucketSize;
- ULONG rtPSBucketSize;
+ unsigned long BEBucketSize;
+ unsigned long rtPSBucketSize;
unsigned char LinkStatus;
BOOLEAN AutoLinkUp;
BOOLEAN AutoSyncup;
@@ -275,9 +275,9 @@ struct bcm_mini_adapter {
struct semaphore rdmwrmsync;

struct bcm_targetdsx_buffer astTargetDsxBuffer[MAX_TARGET_DSX_BUFFERS];
- ULONG ulFreeTargetBufferCnt;
- ULONG ulCurrentTargetBuffer;
- ULONG ulTotalTargetBuffersAvailable;
+ unsigned long ulFreeTargetBufferCnt;
+ unsigned long ulCurrentTargetBuffer;
+ unsigned long ulTotalTargetBuffersAvailable;
unsigned long chip_id;
wait_queue_head_t lowpower_mode_wait_queue;
BOOLEAN bFlashBoot;
@@ -294,7 +294,7 @@ struct bcm_mini_adapter {
BOOLEAN bIsAutoCorrectEnabled;
BOOLEAN bDDRInitDone;
int DDRSetting;
- ULONG ulPowerSaveMode;
+ unsigned long ulPowerSaveMode;
spinlock_t txtransmitlock;
B_UINT8 txtransmit_running;
/* Thread for control packet handling */
@@ -356,9 +356,9 @@ struct bcm_mini_adapter {
* Generally it is Active DSD but in case of NVM RD/WR it might be different.
*/
UINT ulFlashCalStart;
- ULONG ulFlashControlSectionStart;
- ULONG ulFlashWriteSize;
- ULONG ulFlashID;
+ unsigned long ulFlashControlSectionStart;
+ unsigned long ulFlashWriteSize;
+ unsigned long ulFlashID;
FP_FLASH_WRITE fpFlashWrite;
FP_FLASH_WRITE_STATUS fpFlashWriteWithStatusCheck;

@@ -390,7 +390,7 @@ struct bcm_mini_adapter {
BOOLEAN StopAllXaction;
UINT32 liTimeSinceLastNetEntry; /* Used to Support extended CAPI requirements from */
struct semaphore LowPowerModeSync;
- ULONG liDrainCalculated;
+ unsigned long liDrainCalculated;
UINT gpioBitMap;
struct bcm_debug_state stDebugState;
};
@@ -405,8 +405,8 @@ struct bcm_eth_header {

struct bcm_firmware_info {
void __user *pvMappedFirmwareAddress;
- ULONG u32FirmwareLength;
- ULONG u32StartingAddress;
+ unsigned long u32FirmwareLength;
+ unsigned long u32StartingAddress;
} __packed;

/* holds the value of net_device structure.. */
--
1.7.9.5

2013-10-26 06:15:56

by Kevin McKinney

[permalink] [raw]
Subject: [PATCH 06/11] Staging: bcm: Replace B_UINT16 with u16 in Adapter.h

This patch replace "B_UINT16" with "u16"
in Adapter.h

Signed-off-by: Kevin McKinney <[email protected]>
---
drivers/staging/bcm/Adapter.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/bcm/Adapter.h b/drivers/staging/bcm/Adapter.h
index 4c9662b..fbd06a1 100644
--- a/drivers/staging/bcm/Adapter.h
+++ b/drivers/staging/bcm/Adapter.h
@@ -62,7 +62,7 @@ struct bcm_hdr_suppression_contextinfo {
struct bcm_classifier_rule {
unsigned long ulSFID;
unsigned char ucReserved[2];
- B_UINT16 uiClassifierRuleIndex;
+ u16 uiClassifierRuleIndex;
BOOLEAN bUsed;
unsigned short usVCID_Value;
B_UINT8 u8ClassifierRulePriority; /* This field detemines the Classifier Priority */
@@ -204,7 +204,7 @@ struct bcm_tarang_data {

struct bcm_targetdsx_buffer {
unsigned long ulTargetDsxBuffer;
- B_UINT16 tid;
+ u16 tid;
BOOLEAN valid;
};

--
1.7.9.5

2013-10-26 06:15:55

by Kevin McKinney

[permalink] [raw]
Subject: [PATCH 02/11] Staging: bcm: Remove typedef for _U_IP_ADDRESS and call directly.

This patch removes typedef for _U_IP_ADDRESS, and
changes the name of the struct to bcm_ip_address. In
addition, any calls to struct "U_IP_ADDRESS" are
changed to call directly.

Signed-off-by: Kevin McKinney <[email protected]>
---
drivers/staging/bcm/Adapter.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/bcm/Adapter.h b/drivers/staging/bcm/Adapter.h
index c2c0e6c..cd224f2 100644
--- a/drivers/staging/bcm/Adapter.h
+++ b/drivers/staging/bcm/Adapter.h
@@ -35,7 +35,7 @@ struct bcm_link_request {
#define MAX_PROTOCOL_LENGTH 32
#define IPV6_ADDRESS_SIZEINBYTES 0x10

-typedef union _U_IP_ADDRESS {
+union bcm_ip_address {
struct {
ULONG ulIpv4Addr[MAX_IP_RANGE_LENGTH]; /* Source Ip Address Range */
ULONG ulIpv4Mask[MAX_IP_RANGE_LENGTH]; /* Source Ip Mask Address Range */
@@ -52,7 +52,7 @@ typedef union _U_IP_ADDRESS {
UCHAR ucIpv6Address[MAX_IP_RANGE_LENGTH * IPV6_ADDRESS_SIZEINBYTES];
UCHAR ucIpv6Mask[MAX_IP_RANGE_LENGTH * IPV6_ADDRESS_SIZEINBYTES];
};
-} U_IP_ADDRESS;
+};

struct bcm_hdr_suppression_contextinfo {
UCHAR ucaHdrSuppressionInBuf[MAX_PHS_LENGTHS]; /* Intermediate buffer to accumulate pkt Header for PHS */
@@ -66,10 +66,10 @@ struct bcm_classifier_rule {
BOOLEAN bUsed;
USHORT usVCID_Value;
B_UINT8 u8ClassifierRulePriority; /* This field detemines the Classifier Priority */
- U_IP_ADDRESS stSrcIpAddress;
+ union bcm_ip_address stSrcIpAddress;
UCHAR ucIPSourceAddressLength; /* Ip Source Address Length */

- U_IP_ADDRESS stDestIpAddress;
+ union bcm_ip_address stDestIpAddress;
UCHAR ucIPDestinationAddressLength; /* Ip Destination Address Length */
UCHAR ucIPTypeOfServiceLength; /* Type of service Length */
UCHAR ucTosLow; /* Tos Low */
--
1.7.9.5

2013-10-26 06:15:53

by Kevin McKinney

[permalink] [raw]
Subject: [PATCH 04/11] Staging: bcm: Replace UCHAR with unsigned char in Adapter.h

This patch replace "UCHAR" with "unsigned
char" in Adapter.h

Signed-off-by: Kevin McKinney <[email protected]>
---
drivers/staging/bcm/Adapter.h | 82 ++++++++++++++++++++---------------------
1 file changed, 41 insertions(+), 41 deletions(-)

diff --git a/drivers/staging/bcm/Adapter.h b/drivers/staging/bcm/Adapter.h
index 8f0033a..eaf9532 100644
--- a/drivers/staging/bcm/Adapter.h
+++ b/drivers/staging/bcm/Adapter.h
@@ -10,13 +10,13 @@
struct bcm_leader {
unsigned short Vcid;
unsigned short PLength;
- UCHAR Status;
- UCHAR Unused[3];
+ unsigned char Status;
+ unsigned char Unused[3];
} __packed;

struct bcm_packettosend {
struct bcm_leader Leader;
- UCHAR ucPayload;
+ unsigned char ucPayload;
} __packed;

struct bcm_control_packet {
@@ -27,7 +27,7 @@ struct bcm_control_packet {

struct bcm_link_request {
struct bcm_leader Leader;
- UCHAR szData[4];
+ unsigned char szData[4];
} __packed;

#define MAX_IP_RANGE_LENGTH 4
@@ -45,46 +45,46 @@ union bcm_ip_address {
ULONG ulIpv6Mask[MAX_IP_RANGE_LENGTH * 4]; /* Source Ip Mask Address Range */
};
struct {
- UCHAR ucIpv4Address[MAX_IP_RANGE_LENGTH * IP_LENGTH_OF_ADDRESS];
- UCHAR ucIpv4Mask[MAX_IP_RANGE_LENGTH * IP_LENGTH_OF_ADDRESS];
+ unsigned char ucIpv4Address[MAX_IP_RANGE_LENGTH * IP_LENGTH_OF_ADDRESS];
+ unsigned char ucIpv4Mask[MAX_IP_RANGE_LENGTH * IP_LENGTH_OF_ADDRESS];
};
struct {
- UCHAR ucIpv6Address[MAX_IP_RANGE_LENGTH * IPV6_ADDRESS_SIZEINBYTES];
- UCHAR ucIpv6Mask[MAX_IP_RANGE_LENGTH * IPV6_ADDRESS_SIZEINBYTES];
+ unsigned char ucIpv6Address[MAX_IP_RANGE_LENGTH * IPV6_ADDRESS_SIZEINBYTES];
+ unsigned char ucIpv6Mask[MAX_IP_RANGE_LENGTH * IPV6_ADDRESS_SIZEINBYTES];
};
};

struct bcm_hdr_suppression_contextinfo {
- UCHAR ucaHdrSuppressionInBuf[MAX_PHS_LENGTHS]; /* Intermediate buffer to accumulate pkt Header for PHS */
- UCHAR ucaHdrSuppressionOutBuf[MAX_PHS_LENGTHS + PHSI_LEN]; /* Intermediate buffer containing pkt Header after PHS */
+ unsigned char ucaHdrSuppressionInBuf[MAX_PHS_LENGTHS]; /* Intermediate buffer to accumulate pkt Header for PHS */
+ unsigned char ucaHdrSuppressionOutBuf[MAX_PHS_LENGTHS + PHSI_LEN]; /* Intermediate buffer containing pkt Header after PHS */
};

struct bcm_classifier_rule {
ULONG ulSFID;
- UCHAR ucReserved[2];
+ unsigned char ucReserved[2];
B_UINT16 uiClassifierRuleIndex;
BOOLEAN bUsed;
unsigned short usVCID_Value;
B_UINT8 u8ClassifierRulePriority; /* This field detemines the Classifier Priority */
union bcm_ip_address stSrcIpAddress;
- UCHAR ucIPSourceAddressLength; /* Ip Source Address Length */
+ unsigned char ucIPSourceAddressLength; /* Ip Source Address Length */

union bcm_ip_address stDestIpAddress;
- UCHAR ucIPDestinationAddressLength; /* Ip Destination Address Length */
- UCHAR ucIPTypeOfServiceLength; /* Type of service Length */
- UCHAR ucTosLow; /* Tos Low */
- UCHAR ucTosHigh; /* Tos High */
- UCHAR ucTosMask; /* Tos Mask */
-
- UCHAR ucProtocolLength; /* protocol Length */
- UCHAR ucProtocol[MAX_PROTOCOL_LENGTH]; /* protocol Length */
+ unsigned char ucIPDestinationAddressLength; /* Ip Destination Address Length */
+ unsigned char ucIPTypeOfServiceLength; /* Type of service Length */
+ unsigned char ucTosLow; /* Tos Low */
+ unsigned char ucTosHigh; /* Tos High */
+ unsigned char ucTosMask; /* Tos Mask */
+
+ unsigned char ucProtocolLength; /* protocol Length */
+ unsigned char ucProtocol[MAX_PROTOCOL_LENGTH]; /* protocol Length */
unsigned short usSrcPortRangeLo[MAX_PORT_RANGE];
unsigned short usSrcPortRangeHi[MAX_PORT_RANGE];
- UCHAR ucSrcPortRangeLength;
+ unsigned char ucSrcPortRangeLength;

unsigned short usDestPortRangeLo[MAX_PORT_RANGE];
unsigned short usDestPortRangeHi[MAX_PORT_RANGE];
- UCHAR ucDestPortRangeLength;
+ unsigned char ucDestPortRangeLength;

BOOLEAN bProtocolValid;
BOOLEAN bTOSValid;
@@ -92,22 +92,22 @@ struct bcm_classifier_rule {
BOOLEAN bSrcIpValid;

/* For IPv6 Addressing */
- UCHAR ucDirection;
+ unsigned char ucDirection;
BOOLEAN bIpv6Protocol;
UINT32 u32PHSRuleID;
struct bcm_phs_rule sPhsRule;
- UCHAR u8AssociatedPHSI;
+ unsigned char u8AssociatedPHSI;

/* Classification fields for ETH CS */
- UCHAR ucEthCSSrcMACLen;
- UCHAR au8EThCSSrcMAC[MAC_ADDRESS_SIZE];
- UCHAR au8EThCSSrcMACMask[MAC_ADDRESS_SIZE];
- UCHAR ucEthCSDestMACLen;
- UCHAR au8EThCSDestMAC[MAC_ADDRESS_SIZE];
- UCHAR au8EThCSDestMACMask[MAC_ADDRESS_SIZE];
- UCHAR ucEtherTypeLen;
- UCHAR au8EthCSEtherType[NUM_ETHERTYPE_BYTES];
- UCHAR usUserPriority[2];
+ unsigned char ucEthCSSrcMACLen;
+ unsigned char au8EThCSSrcMAC[MAC_ADDRESS_SIZE];
+ unsigned char au8EThCSSrcMACMask[MAC_ADDRESS_SIZE];
+ unsigned char ucEthCSDestMACLen;
+ unsigned char au8EThCSDestMAC[MAC_ADDRESS_SIZE];
+ unsigned char au8EThCSDestMACMask[MAC_ADDRESS_SIZE];
+ unsigned char ucEtherTypeLen;
+ unsigned char au8EthCSEtherType[NUM_ETHERTYPE_BYTES];
+ unsigned char usUserPriority[2];
unsigned short usVLANID;
unsigned short usValidityBitMap;
};
@@ -149,7 +149,7 @@ struct bcm_packet_info {
LARGE_INTEGER liLastUpdateTokenAt;
UINT uiMaxAllowedRate;
UINT NumOfPacketsSent;
- UCHAR ucDirection;
+ unsigned char ucDirection;
unsigned short usCID;
struct bcm_mibs_parameters stMibsExtServiceFlowTable;
UINT uiCurrentRxRate;
@@ -157,7 +157,7 @@ struct bcm_packet_info {
UINT uiTotalRxBytes;
UINT uiTotalTxBytes;
UINT uiPendedLast;
- UCHAR ucIpVersion;
+ unsigned char ucIpVersion;

union {
struct {
@@ -179,15 +179,15 @@ struct bcm_packet_info {
BOOLEAN bAdmittedSet;
BOOLEAN bAuthorizedSet;
BOOLEAN bClassifierPriority;
- UCHAR ucServiceClassName[MAX_CLASS_NAME_LENGTH];
+ unsigned char ucServiceClassName[MAX_CLASS_NAME_LENGTH];
BOOLEAN bHeaderSuppressionEnabled;
spinlock_t SFQueueLock;
void *pstSFIndication;
struct timeval stLastUpdateTokenAt;
atomic_t uiPerSFTxResourceCount;
UINT uiMaxLatency;
- UCHAR bIPCSSupport;
- UCHAR bEthCSSupport;
+ unsigned char bIPCSSupport;
+ unsigned char bEthCSSupport;
};

struct bcm_tarang_data {
@@ -255,7 +255,7 @@ struct bcm_mini_adapter {
BOOLEAN bETHCSEnabled;
ULONG BEBucketSize;
ULONG rtPSBucketSize;
- UCHAR LinkStatus;
+ unsigned char LinkStatus;
BOOLEAN AutoLinkUp;
BOOLEAN AutoSyncup;

@@ -398,8 +398,8 @@ struct bcm_mini_adapter {
#define GET_BCM_ADAPTER(net_dev) netdev_priv(net_dev)

struct bcm_eth_header {
- UCHAR au8DestinationAddress[6];
- UCHAR au8SourceAddress[6];
+ unsigned char au8DestinationAddress[6];
+ unsigned char au8SourceAddress[6];
unsigned short u16Etype;
} __packed;

--
1.7.9.5

2013-10-27 08:24:30

by Dan Carpenter

[permalink] [raw]
Subject: Re: [PATCH 05/11] Staging: bcm: Replace ULONG with unsigned long in Adapter.h

On Sat, Oct 26, 2013 at 02:15:14AM -0400, Kevin McKinney wrote:
> This patch replace "ULONG" with "unsigned
> long" in Adapter.h
>
> Signed-off-by: Kevin McKinney <[email protected]>
> ---
> drivers/staging/bcm/Adapter.h | 42 ++++++++++++++++++++---------------------
> 1 file changed, 21 insertions(+), 21 deletions(-)
>
> diff --git a/drivers/staging/bcm/Adapter.h b/drivers/staging/bcm/Adapter.h
> index eaf9532..4c9662b 100644
> --- a/drivers/staging/bcm/Adapter.h
> +++ b/drivers/staging/bcm/Adapter.h
> @@ -37,12 +37,12 @@ struct bcm_link_request {
>
> union bcm_ip_address {
> struct {
> - ULONG ulIpv4Addr[MAX_IP_RANGE_LENGTH]; /* Source Ip Address Range */
> - ULONG ulIpv4Mask[MAX_IP_RANGE_LENGTH]; /* Source Ip Mask Address Range */
> + unsigned long ulIpv4Addr[MAX_IP_RANGE_LENGTH]; /* Source Ip Address Range */

These aren't correct in the original code btw. ipv4 addresses should
fit in a u32. Also it's not clear how this address is used.

It's something to think about and maybe remove or fix in later patches.

regards,
dan carpenter

2013-10-27 08:26:09

by Dan Carpenter

[permalink] [raw]
Subject: Re: [PATCH 04/11] Staging: bcm: Replace UCHAR with unsigned char in Adapter.h

On Sat, Oct 26, 2013 at 02:15:13AM -0400, Kevin McKinney wrote:
> This patch replace "UCHAR" with "unsigned
> char" in Adapter.h

I feel like these should pretty much all be u8 instead of "unsigned
char".

regards,
dan carpenter

2013-10-27 23:55:53

by Kevin McKinney

[permalink] [raw]
Subject: Re: [PATCH 04/11] Staging: bcm: Replace UCHAR with unsigned char in Adapter.h

On Sun, Oct 27, 2013 at 11:25:55AM +0300, Dan Carpenter wrote:
> On Sat, Oct 26, 2013 at 02:15:13AM -0400, Kevin McKinney wrote:
> > This patch replace "UCHAR" with "unsigned
> > char" in Adapter.h
>
> I feel like these should pretty much all be u8 instead of "unsigned
> char".

Yeah, I thought about changing these to u8. I will resubmit these 11 patches.

Thanks,
Kevin