Skip to contentSkip to conversation

staging/otus: fix mixed declarations

PATCH Applied Randy Dunlap 1 participant 1 message Feb 11, 2009 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 4/9 staging/otus: fix mixed declarations

From: Randy Dunlap <[email protected]>

Fix otus ISO C90 warnings:

drivers/staging/otus/80211core/cmmsta.c:740: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/80211core/coid.c:219: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/80211core/coid.c:1437: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hprw.c:33: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hprw.c:53: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hprw.c:82: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hprw.c:163: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hprw.c:219: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hprw.c:831: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hprw.c:896: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpmain.c:332: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpmain.c:1329: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpmain.c:1565: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpmain.c:1606: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpmain.c:1923: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpmain.c:1997: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpmain.c:2264: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpmain.c:2296: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpmain.c:2330: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpmain.c:2350: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpmain.c:2387: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpmain.c:2425: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpmain.c:4223: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpmain.c:4283: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpmain.c:4314: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpmain.c:4380: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpmain.c:4425: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpmain.c:4531: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpmain.c:4539: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpusb.c:69: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpusb.c:334: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpusb.c:580: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpreg.c:1774: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpreg.c:2478: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpani.c:61: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpani.c:80: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpani.c:145: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpani.c:352: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpani.c:393: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpani.c:472: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpani.c:517: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpani.c:592: warning: ISO C90 forbids mixed declarations and code drivers/staging/otus/hal/hpani.c:633: warning: ISO C90 forbids mixed declarations and code

---
 drivers/staging/otus/80211core/cmmsta.c |    5 -
 drivers/staging/otus/80211core/coid.c   |    8 +-
 drivers/staging/otus/hal/hpani.c        |   46 +++++++-------
 drivers/staging/otus/hal/hpmain.c       |   99 +++++++++++++++++++++-----------
 drivers/staging/otus/hal/hpreg.c        |    9 +-
 drivers/staging/otus/hal/hprw.c         |   30 ++++++---
 drivers/staging/otus/hal/hpusb.c        |   11 ++-
 7 files changed, 131 insertions(+), 77 deletions(-)
drivers/staging/otus/80211core/cmmsta.c +3 -2
@@ -724,6 +724,9 @@ void zfStaUpdateWmeParameter(zdev_t* dev
 /* process 802.11h Dynamic Frequency Selection */
 void zfStaUpdateDot11HDFS(zdev_t* dev, zbuf_t* buf)
 {
+    //u8_t    length, channel, is5G;
+    u16_t   offset;
+
     zmw_get_wlan_dev(dev);
 
     /*
@@ -736,8 +739,6 @@ void zfStaUpdateDot11HDFS(zdev_t* dev, z
     |Value |   37     |  3   |       0 or 1      |unsigned integer  |unsigned integer    |
     +------+----------+------+-------------------+------------------+--------------------+
     */
-    //u8_t    length, channel, is5G;
-    u16_t   offset;
 
     /* get EID(Channel Switch Announcement) */
     if ( (offset = zfFindElement(dev, buf, ZM_WLAN_EID_CHANNEL_SWITCH_ANNOUNCE)) == 0xffff )
drivers/staging/otus/80211core/coid.c +4 -4
@@ -214,10 +214,10 @@ u32_t zfiWlanQuerySupportMode(zdev_t* de
 
 u32_t zfiWlanQueryTransmitPower(zdev_t* dev)
 {
-    zmw_get_wlan_dev(dev);
-
     u32_t ret = 0;
 
+    zmw_get_wlan_dev(dev);
+
     if (zfStaIsConnected(dev)) {
         ret = wd->sta.connPowerInHalfDbm;
     } else {
@@ -1432,12 +1432,12 @@ u32_t zfiWlanQueryCurrentFrequency(zdev_
 
 u32_t zfiWlanQueryFrequencyAttribute(zdev_t* dev, u32_t freq)
 {
-    zmw_get_wlan_dev(dev);
-
     u8_t  i;
     u16_t frequency = (u16_t) (freq/1000);
     u32_t ret = 0;
 
+    zmw_get_wlan_dev(dev);
+
     for (i = 0; i < wd->regulationTable.allowChannelCnt; i++)
     {
         if ( wd->regulationTable.allowChannel[i].channel == frequency )
drivers/staging/otus/hal/hprw.c +21 -9
@@ -29,8 +29,10 @@ u16_t zfFlushDelayWrite(zdev_t* dev);
 
 void zfInitCmdQueue(zdev_t* dev)
 {
+    struct zsHpPriv* hpPriv;
+
     zmw_get_wlan_dev(dev);
-    struct zsHpPriv* hpPriv = (struct zsHpPriv*)(wd->hpPrivate);
+    hpPriv = (struct zsHpPriv*)(wd->hpPrivate);
 
     zmw_declare_for_critical_section();
 
@@ -48,9 +50,10 @@ void zfInitCmdQueue(zdev_t* dev)
 u16_t zfPutCmd(zdev_t* dev, u32_t* cmd, u16_t cmdLen, u16_t src, u8_t* buf)
 {
     u16_t i;
+    struct zsHpPriv* hpPriv;
 
     zmw_get_wlan_dev(dev);
-    struct zsHpPriv* hpPriv=wd->hpPrivate;
+    hpPriv=wd->hpPrivate;
 
     /* Make sure command length < ZM_MAX_CMD_SIZE */
     zm_assert(cmdLen <= ZM_MAX_CMD_SIZE);
@@ -77,9 +80,10 @@ u16_t zfPutCmd(zdev_t* dev, u32_t* cmd, 
 u16_t zfGetCmd(zdev_t* dev, u32_t* cmd, u16_t* cmdLen, u16_t* src, u8_t** buf)
 {
     u16_t i;
+    struct zsHpPriv* hpPriv;
 
     zmw_get_wlan_dev(dev);
-    struct zsHpPriv* hpPriv=wd->hpPrivate;
+    hpPriv=wd->hpPrivate;
 
     if (hpPriv->cmdTail == hpPriv->cmdHead)
     {
@@ -106,9 +110,10 @@ void zfSendCmdEx(zdev_t* dev)
     u16_t ncmdLen = 0;
     u16_t cmdFlag = 0;
     u16_t i;
+    struct zsHpPriv* hpPriv;
 
     zmw_get_wlan_dev(dev);
-    struct zsHpPriv* hpPriv=wd->hpPrivate;
+    hpPriv=wd->hpPrivate;
 
     zmw_declare_for_critical_section();
 
@@ -141,8 +146,10 @@ void zfSendCmdEx(zdev_t* dev)
 
 void zfiSendCmdComp(zdev_t* dev)
 {
+    struct zsHpPriv* hpPriv;
+
     zmw_get_wlan_dev(dev);
-    struct zsHpPriv* hpPriv=wd->hpPrivate;
+    hpPriv=wd->hpPrivate;
 
     zmw_declare_for_critical_section();
 
@@ -158,9 +165,10 @@ u16_t zfIssueCmd(zdev_t* dev, u32_t* cmd
 {
     u16_t cmdFlag = 0;
     u16_t ret;
+    struct zsHpPriv* hpPriv;
 
     zmw_get_wlan_dev(dev);
-    struct zsHpPriv* hpPriv=wd->hpPrivate;
+    hpPriv=wd->hpPrivate;
 
     zmw_declare_for_critical_section();
 
@@ -214,9 +222,10 @@ void zfIdlRsp(zdev_t* dev, u32_t* rsp, u
     u16_t i;
     s32_t nf;
     s32_t noisefloor[4];
+    struct zsHpPriv* hpPriv;
 
     zmw_get_wlan_dev(dev);
-    struct zsHpPriv* hpPriv=wd->hpPrivate;
+    hpPriv=wd->hpPrivate;
 
 
     zmw_declare_for_critical_section();
@@ -826,9 +835,10 @@ u16_t zfDelayWriteInternalReg(zdev_t* de
     u32_t cmd[(ZM_MAX_CMD_SIZE/4)];
     u16_t i;
     u16_t ret;
+    struct zsHpPriv* hpPriv;
 
     zmw_get_wlan_dev(dev);
-    struct zsHpPriv* hpPriv=wd->hpPrivate;
+    hpPriv=wd->hpPrivate;
 
     zmw_declare_for_critical_section();
 
@@ -892,8 +902,10 @@ u16_t zfFlushDelayWrite(zdev_t* dev)
     u32_t cmd[(ZM_MAX_CMD_SIZE/4)];
     u16_t i;
     u16_t ret;
+    struct zsHpPriv* hpPriv;
+
     zmw_get_wlan_dev(dev);
-    struct zsHpPriv* hpPriv=wd->hpPrivate;
+    hpPriv=wd->hpPrivate;
 
     zmw_declare_for_critical_section();
 
drivers/staging/otus/hal/hpmain.c +67 -32

259 lines not on this page · raw message

drivers/staging/otus/hal/hpusb.c +8 -3
@@ -64,9 +64,10 @@ void zfAdjustCtrlSetting(zdev_t* dev, u1
     u32_t oldPhyCtrl;
 
     u16_t tpc = 0;
+    struct zsHpPriv* hpPriv;
 
     zmw_get_wlan_dev(dev);
-    struct zsHpPriv* hpPriv=wd->hpPrivate;
+    hpPriv=wd->hpPrivate;
 
    /* mm */
     if (header == NULL)
@@ -330,8 +331,10 @@ u16_t zfHpSend(zdev_t* dev, u16_t* heade
     u16_t i;
    	u16_t swlpOffset;
 #endif /* #if ZM_SW_LOOP_BACK == 1 */
+    struct zsHpPriv* hpPriv;
+
     zmw_get_wlan_dev(dev);
-    struct zsHpPriv* hpPriv=wd->hpPrivate;
+    hpPriv=wd->hpPrivate;
 
     zm_msg1_tx(ZM_LV_1, "zfHpSend(), len = ", 12 + headerLen-8 + snapLen + zfwBufGetSize(dev, buf) + 4 + 8);
 
@@ -576,8 +579,10 @@ void zfiUsbRecv(zdev_t *dev, zbuf_t *buf
     u32_t               rxMCS;
     u32_t               rxBW;
     u32_t               rxSG;
+    struct zsHpPriv* hpPriv;
+
     zmw_get_wlan_dev(dev);
-    struct zsHpPriv* hpPriv=wd->hpPrivate;
+    hpPriv=wd->hpPrivate;
 
     //zm_msg0_rx(ZM_LV_0, "zfiUsbRecv()");
 
drivers/staging/otus/hal/hpreg.c +6 -3
@@ -1770,8 +1770,10 @@ void zfHpGetRegulationTable(zdev_t* dev,
 	REG_DOMAIN rd5GHz, rd2GHz;
 	const struct cmode *cm;
 	s16_t next=0,b;
+	struct zsHpPriv* hpPriv;
+
     zmw_get_wlan_dev(dev);
-    struct zsHpPriv* hpPriv=wd->hpPrivate;
+    hpPriv=wd->hpPrivate;
 
     zmw_declare_for_critical_section();
 
@@ -2473,9 +2475,10 @@ u8_t zfHpGetRegulatoryDomain(zdev_t* dev
 
 void zfHpDisableDfsChannel(zdev_t* dev, u8_t disableFlag)
 {
-    zmw_get_wlan_dev(dev);
+    struct zsHpPriv* hpPriv;
 
-    struct zsHpPriv* hpPriv=wd->hpPrivate;
+    zmw_get_wlan_dev(dev);
+    hpPriv=wd->hpPrivate;
     hpPriv->disableDfsCh = disableFlag;
     return;
 }
drivers/staging/otus/hal/hpani.c +22 -24

122 lines not on this page · raw message