diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-10-21 22:44:42 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-12-11 12:23:12 -0800 |
commit | ca58fb303757d73876af32238d86091c59b88507 (patch) | |
tree | 24117d224f7eca513dfdce7bc4336f36c9c71471 | |
parent | 44c68c23b16c85127d187fd720f95aa2e7a94d2e (diff) | |
download | op-kernel-dev-ca58fb303757d73876af32238d86091c59b88507.zip op-kernel-dev-ca58fb303757d73876af32238d86091c59b88507.tar.gz |
Staging: rt28x0: fix some build warnings
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/rt2860/chip/rtmp_phy.h | 8 | ||||
-rw-r--r-- | drivers/staging/rt2860/chips/rt30xx.c | 2 | ||||
-rw-r--r-- | drivers/staging/rt2860/common/cmm_asic.c | 6 | ||||
-rw-r--r-- | drivers/staging/rt2860/common/cmm_mac_pci.c | 7 | ||||
-rw-r--r-- | drivers/staging/rt2860/common/mlme.c | 1 | ||||
-rw-r--r-- | drivers/staging/rt2860/common/rtmp_init.c | 3 | ||||
-rw-r--r-- | drivers/staging/rt2860/common/rtmp_mcu.c | 2 | ||||
-rw-r--r-- | drivers/staging/rt2860/pci_main_dev.c | 35 | ||||
-rw-r--r-- | drivers/staging/rt2860/rt_linux.c | 10 | ||||
-rw-r--r-- | drivers/staging/rt2860/rt_main_dev.c | 6 | ||||
-rw-r--r-- | drivers/staging/rt2860/sta/connect.c | 1 | ||||
-rw-r--r-- | drivers/staging/rt2860/usb_main_dev.c | 7 |
12 files changed, 48 insertions, 40 deletions
diff --git a/drivers/staging/rt2860/chip/rtmp_phy.h b/drivers/staging/rt2860/chip/rtmp_phy.h index 87516f3..e2b90a1 100644 --- a/drivers/staging/rt2860/chip/rtmp_phy.h +++ b/drivers/staging/rt2860/chip/rtmp_phy.h @@ -552,8 +552,8 @@ #ifdef RT30xx #define RTMP_ASIC_MMPS_DISABLE(_pAd) \ do{ \ - UCHAR _bbpData; \ - UINT32 _macData; \ + UINT32 _macData; \ + UCHAR _bbpData = 0; \ /* disable MMPS BBP control register */ \ RTMP_BBP_IO_READ8_BY_REG_ID(_pAd, BBP_R3, &_bbpData); \ _bbpData &= ~(0x04); /*bit 2*/ \ @@ -568,8 +568,8 @@ #define RTMP_ASIC_MMPS_ENABLE(_pAd) \ do{ \ - UCHAR _bbpData; \ - UINT32 _macData; \ + UINT32 _macData; \ + UCHAR _bbpData = 0; \ /* enable MMPS BBP control register */ \ RTMP_BBP_IO_READ8_BY_REG_ID(_pAd, BBP_R3, &_bbpData); \ _bbpData |= (0x04); /*bit 2*/ \ diff --git a/drivers/staging/rt2860/chips/rt30xx.c b/drivers/staging/rt2860/chips/rt30xx.c index f29d11d..c69fab5 100644 --- a/drivers/staging/rt2860/chips/rt30xx.c +++ b/drivers/staging/rt2860/chips/rt30xx.c @@ -86,7 +86,9 @@ VOID RT30xxSetRxAnt( IN UCHAR Ant) { UINT32 Value; +#ifdef RTMP_MAC_PCI UINT32 x; +#endif if ((pAd->EepromAccess) || (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_RESET_IN_PROGRESS)) || diff --git a/drivers/staging/rt2860/common/cmm_asic.c b/drivers/staging/rt2860/common/cmm_asic.c index 5d3a387..406e0bb 100644 --- a/drivers/staging/rt2860/common/cmm_asic.c +++ b/drivers/staging/rt2860/common/cmm_asic.c @@ -810,9 +810,9 @@ VOID AsicSwitchChannel( #if defined(RT3090) || defined(RT3390) // PCIe PHY Transmit attenuation adjustment - if (IS_RT3090A(pAd) || IS_RT3390(pAd)) - { - TX_ATTENUATION_CTRL_STRUC TxAttenuationCtrl = {0}; + if (IS_RT3090A(pAd) || IS_RT3390(pAd)) { + TX_ATTENUATION_CTRL_STRUC + TxAttenuationCtrl = { .word = 0 }; RTMP_IO_READ32(pAd, PCIE_PHY_TX_ATTENUATION_CTRL, &TxAttenuationCtrl.word); diff --git a/drivers/staging/rt2860/common/cmm_mac_pci.c b/drivers/staging/rt2860/common/cmm_mac_pci.c index 73992cb..d910bfd 100644 --- a/drivers/staging/rt2860/common/cmm_mac_pci.c +++ b/drivers/staging/rt2860/common/cmm_mac_pci.c @@ -1173,10 +1173,9 @@ BOOLEAN RT28xxPciAsicRadioOn( pAd->Mlme.bPsPollTimerRunning = FALSE; RTMPCancelTimer(&pAd->Mlme.PsPollTimer, &Cancelled); } - if ((pAd->StaCfg.PSControl.field.EnableNewPS == TRUE)&& - ((Level == GUIRADIO_OFF) || (Level == GUI_IDLE_POWER_SAVE)) - ||(RTMP_TEST_PSFLAG(pAd, fRTMP_PS_SET_PCI_CLK_OFF_COMMAND))) - { + if ((pAd->StaCfg.PSControl.field.EnableNewPS == TRUE && + (Level == GUIRADIO_OFF || Level == GUI_IDLE_POWER_SAVE)) || + RTMP_TEST_PSFLAG(pAd, fRTMP_PS_SET_PCI_CLK_OFF_COMMAND)) { // Some chips don't need to delay 6ms, so copy RTMPPCIePowerLinkCtrlRestore // return condition here. /* diff --git a/drivers/staging/rt2860/common/mlme.c b/drivers/staging/rt2860/common/mlme.c index 7647c09..9fa853e 100644 --- a/drivers/staging/rt2860/common/mlme.c +++ b/drivers/staging/rt2860/common/mlme.c @@ -679,7 +679,6 @@ VOID MlmePeriodicExec( { ULONG TxTotalCnt; PRTMP_ADAPTER pAd = (RTMP_ADAPTER *)FunctionContext; - SHORT realavgrssi; #ifdef RTMP_MAC_PCI { diff --git a/drivers/staging/rt2860/common/rtmp_init.c b/drivers/staging/rt2860/common/rtmp_init.c index fe8327b..5deba8d 100644 --- a/drivers/staging/rt2860/common/rtmp_init.c +++ b/drivers/staging/rt2860/common/rtmp_init.c @@ -3621,7 +3621,8 @@ INT RtmpRaDevCtrlInit( #ifdef RTMP_MAC_USB init_MUTEX(&(pAd->UsbVendorReq_semaphore)); - os_alloc_mem(pAd, (PUCHAR)&pAd->UsbVendorReqBuf, MAX_PARAM_BUFFER_SIZE - 1); + os_alloc_mem(pAd, (PUCHAR *)&pAd->UsbVendorReqBuf, + MAX_PARAM_BUFFER_SIZE - 1); if (pAd->UsbVendorReqBuf == NULL) { DBGPRINT(RT_DEBUG_ERROR, ("Allocate vendor request temp buffer failed!\n")); diff --git a/drivers/staging/rt2860/common/rtmp_mcu.c b/drivers/staging/rt2860/common/rtmp_mcu.c index 229ea05..e5d1902 100644 --- a/drivers/staging/rt2860/common/rtmp_mcu.c +++ b/drivers/staging/rt2860/common/rtmp_mcu.c @@ -119,7 +119,9 @@ NDIS_STATUS RtmpAsicLoadFirmware( PUCHAR pFirmwareImage = NULL; ULONG FileLength, Index; UINT32 MacReg = 0; +#ifdef RTMP_MAC_USB UINT32 Version = (pAd->MACVersion >> 16); +#endif // New 8k byte firmware size for RT3071/RT3072 { diff --git a/drivers/staging/rt2860/pci_main_dev.c b/drivers/staging/rt2860/pci_main_dev.c index 1436a60..38bc429 100644 --- a/drivers/staging/rt2860/pci_main_dev.c +++ b/drivers/staging/rt2860/pci_main_dev.c @@ -310,7 +310,7 @@ static INT __devinit rt2860_probe( return rv; } - print_name = pci_name(pci_dev); + print_name = (PSTRING)pci_name(pci_dev); if ((rv = pci_request_regions(pci_dev, print_name)) != 0) { @@ -883,7 +883,7 @@ VOID RTMPPCIeLinkCtrlValueRestore( #endif // RT2860 // // Check PSControl Configuration if (pAd->StaCfg.PSControl.field.EnableNewPS == FALSE) - return TRUE; + return; //3090 will not execute the following codes. // Check interface : If not PCIe interface, return. @@ -977,7 +977,7 @@ VOID RTMPPCIeLinkCtrlSetting( #endif // RT2860 // // Check PSControl Configuration if (pAd->StaCfg.PSControl.field.EnableNewPS == FALSE) - return TRUE; + return; // Check interface : If not PCIe interface, return. //Block 3090 to enter the following function @@ -1086,17 +1086,17 @@ VOID RTMPrt3xSetPCIePowerLinkCtrl( IN PRTMP_ADAPTER pAd) { - ULONG HostConfiguration; + ULONG HostConfiguration = 0; ULONG Configuration; - ULONG Vendor; - ULONG offset; POS_COOKIE pObj; INT pos; USHORT reg16; pObj = (POS_COOKIE) pAd->OS_Cookie; - DBGPRINT(RT_DEBUG_INFO, ("RTMPrt3xSetPCIePowerLinkCtrl.===> %x\n", pAd->StaCfg.PSControl.word)); + DBGPRINT(RT_DEBUG_INFO, + ("RTMPrt3xSetPCIePowerLinkCtrl.===> %lx\n", + pAd->StaCfg.PSControl.word)); // Check PSControl Configuration if (pAd->StaCfg.PSControl.field.EnableNewPS == FALSE) @@ -1104,7 +1104,6 @@ VOID RTMPrt3xSetPCIePowerLinkCtrl( RTMPFindHostPCIDev(pAd); if (pObj->parent_pci_dev) { - USHORT vendor_id; // Find PCI-to-PCI Bridge Express Capability Offset pos = pci_find_capability(pObj->parent_pci_dev, PCI_CAP_ID_EXP); @@ -1129,7 +1128,10 @@ VOID RTMPrt3xSetPCIePowerLinkCtrl( // Because in rt30xxForceASPMTest Mode, Force turn on L0s, L1. // Fix HostConfiguration bit0:1 = 0x3 for later use. HostConfiguration = 0x3; - DBGPRINT(RT_DEBUG_TRACE, ("PSM : Force ASPM : Host device L1/L0s Value = 0x%x\n", HostConfiguration)); + DBGPRINT(RT_DEBUG_TRACE, + ("PSM : Force ASPM : " + "Host device L1/L0s Value = 0x%lx\n", + HostConfiguration)); } } else if (pAd->StaCfg.PSControl.field.rt30xxFollowHostASPM == 1) @@ -1141,7 +1143,10 @@ VOID RTMPrt3xSetPCIePowerLinkCtrl( PCI_REG_READ_WORD(pObj->parent_pci_dev, pAd->HostLnkCtrlOffset, HostConfiguration); pAd->Rt3xxHostLinkCtrl = HostConfiguration; HostConfiguration &= 0x3; - DBGPRINT(RT_DEBUG_TRACE, ("PSM : Follow Host ASPM : Host device L1/L0s Value = 0x%x\n", HostConfiguration)); + DBGPRINT(RT_DEBUG_TRACE, + ("PSM : Follow Host ASPM : " + "Host device L1/L0s Value = 0x%lx\n", + HostConfiguration)); } } } @@ -1155,8 +1160,10 @@ VOID RTMPrt3xSetPCIePowerLinkCtrl( pAd->RLnkCtrlOffset = pos + PCI_EXP_LNKCTL; pci_read_config_word(pObj->pci_dev, pAd->RLnkCtrlOffset, ®16); Configuration = le2cpu16(reg16); - DBGPRINT(RT_DEBUG_TRACE, ("Read (Ralink PCIe Link Control Register) offset 0x%x = 0x%x\n", - pAd->RLnkCtrlOffset, Configuration)); + DBGPRINT(RT_DEBUG_TRACE, + ("Read (Ralink PCIe Link Control Register) " + "offset 0x%x = 0x%lx\n", + pAd->RLnkCtrlOffset, Configuration)); Configuration |= 0x100; if ((pAd->StaCfg.PSControl.field.rt30xxFollowHostASPM == 1) || (pAd->StaCfg.PSControl.field.rt30xxForceASPMTest == 1)) @@ -1182,7 +1189,9 @@ VOID RTMPrt3xSetPCIePowerLinkCtrl( reg16 = cpu2le16(Configuration); pci_write_config_word(pObj->pci_dev, pAd->RLnkCtrlOffset, reg16); pAd->Rt3xxRalinkLinkCtrl = Configuration; - DBGPRINT(RT_DEBUG_TRACE, ("PSM :Write Ralink device L1/L0s Value = 0x%x\n", Configuration)); + DBGPRINT(RT_DEBUG_TRACE, + ("PSM :Write Ralink device L1/L0s Value = 0x%lx\n", + Configuration)); } DBGPRINT(RT_DEBUG_INFO,("PSM :RTMPrt3xSetPCIePowerLinkCtrl <==============\n")); } diff --git a/drivers/staging/rt2860/rt_linux.c b/drivers/staging/rt2860/rt_linux.c index cdda247..d57013f 100644 --- a/drivers/staging/rt2860/rt_linux.c +++ b/drivers/staging/rt2860/rt_linux.c @@ -965,6 +965,7 @@ err_free_sk_buff: *******************************************************************************/ int RtmpOSIRQRequest(IN PNET_DEV pNetDev) { +#ifdef RTMP_PCI_SUPPORT struct net_device *net_dev = pNetDev; PRTMP_ADAPTER pAd = NULL; int retval = 0; @@ -973,7 +974,6 @@ int RtmpOSIRQRequest(IN PNET_DEV pNetDev) ASSERT(pAd); -#ifdef RTMP_PCI_SUPPORT if (pAd->infType == RTMP_DEV_INF_PCI) { POS_COOKIE _pObj = (POS_COOKIE)(pAd->OS_Cookie); @@ -982,14 +982,13 @@ int RtmpOSIRQRequest(IN PNET_DEV pNetDev) if (retval != 0) printk("RT2860: request_irq ERROR(%d)\n", retval); } -#endif // RTMP_PCI_SUPPORT // - return retval; - +#else + return 0; +#endif } - int RtmpOSIRQRelease(IN PNET_DEV pNetDev) { struct net_device *net_dev = pNetDev; @@ -1149,7 +1148,6 @@ NDIS_STATUS RtmpOSTaskAttach( IN void *arg) { NDIS_STATUS status = NDIS_STATUS_SUCCESS; - pid_t pid_number = -1; #ifdef KTHREAD_SUPPORT pTask->task_killed = 0; diff --git a/drivers/staging/rt2860/rt_main_dev.c b/drivers/staging/rt2860/rt_main_dev.c index 7ea85e6..3a73571 100644 --- a/drivers/staging/rt2860/rt_main_dev.c +++ b/drivers/staging/rt2860/rt_main_dev.c @@ -209,15 +209,13 @@ int rt28xx_close(IN PNET_DEV dev) BOOLEAN Cancelled; UINT32 i = 0; - GET_PAD_FROM_NET_DEV(pAd, net_dev); - #ifdef RTMP_MAC_USB DECLARE_WAIT_QUEUE_HEAD(unlink_wakeup); DECLARE_WAITQUEUE(wait, current); - - //RTMP_SET_FLAG(pAd, fRTMP_ADAPTER_REMOVE_IN_PROGRESS); #endif // RTMP_MAC_USB // + GET_PAD_FROM_NET_DEV(pAd, net_dev); + DBGPRINT(RT_DEBUG_TRACE, ("===> rt28xx_close\n")); Cancelled = FALSE; diff --git a/drivers/staging/rt2860/sta/connect.c b/drivers/staging/rt2860/sta/connect.c index 7f263a6..43edd8e 100644 --- a/drivers/staging/rt2860/sta/connect.c +++ b/drivers/staging/rt2860/sta/connect.c @@ -1809,7 +1809,6 @@ VOID LinkDown( IN BOOLEAN IsReqFromAP) { UCHAR i, ByteValue = 0; - BOOLEAN Cancelled; // Do nothing if monitor mode is on if (MONITOR_ON(pAd)) diff --git a/drivers/staging/rt2860/usb_main_dev.c b/drivers/staging/rt2860/usb_main_dev.c index 16e1bbf..00732be 100644 --- a/drivers/staging/rt2860/usb_main_dev.c +++ b/drivers/staging/rt2860/usb_main_dev.c @@ -686,9 +686,10 @@ VOID RTUSBWatchDog(IN RTMP_ADAPTER *pAd) RTMP_IRQ_UNLOCK(&pAd->BulkOutLock[idx], irqFlags); - - printk("%d:%d LTL=%d , TL=%d L:%d\n",idx,pAd->watchDogTxPendingCnt[idx],pAd->TransferedLength[idx] - ,actual_length,transfer_buffer_length); + printk(KERN_INFO "%d:%lu LTL=%d , TL=%d L:%d\n", + idx, pAd->watchDogTxPendingCnt[idx], + pAd->TransferedLength[idx], + actual_length, transfer_buffer_length); if (pUrb) { |