Staging: sxg: replace __FUNCTION__ usages
Subsystems (2)
PATCH 1/1 Staging: sxg: replace __FUNCTION__ usages
__FUNCTION__ is gcc-specific, use __func__
--- drivers/staging/sxg/sxg.c | 38 ++++++++++++++++++------------------ drivers/staging/sxg/sxg_ethtool.c | 2 +- 2 files changed, 20 insertions(+), 20 deletions(-)
drivers/staging/sxg/sxg.c +19 -19
@@ -350,7 +350,7 @@ void sxg_remove_msix_isr(struct adapter_t *adapter)for (i=0 ; i< adapter->nr_msix_entries;i++) { vector = adapter->msi_entries[i].vector; -DBG_ERROR ("%s : Freeing IRQ vector#%d\n" ,__FUNCTION__,vector); +DBG_ERROR ("%s : Freeing IRQ vector#%d\n" ,__func__,vector);free_irq (vector,netdev); } }
@@ -847,7 +847,7 @@ static inline int sxg_read_config(struct adapter_t *adapter)* Get out of here */ printk (KERN_ERR "%s : Could not allocate memory for reading \ -EEPROM\n" , __FUNCTION__); +EEPROM\n" , __func__);return -ENOMEM ; }
@@ -882,7 +882,7 @@ static inline int sxg_read_config(struct adapter_t *adapter)case SXG_CFG_LOAD_ERROR :default :/* Fix default handler later */ printk (KERN_WARNING "%s : We could not read the config \ -word. Status = %ld\n" , __FUNCTION__, status); +word. Status = %ld\n" , __func__, status);break ; } pci_free_consistent(adapter->pcidev, sizeof(struct sw_cfg_data), data,
@@ -975,7 +975,7 @@ static int sxg_entry_probe(struct pci_dev *pcidev, adapter->asictype =SAHARA_REV_B ; }else {ASSERT (0 ); -DBG_ERROR ("%s Unexpected revision ID %x\n" , __FUNCTION__, revision_id); +DBG_ERROR ("%s Unexpected revision ID %x\n" , __func__, revision_id); goto err_out_exit_sxg_probe; } adapter->netdev = netdev;
@@ -1164,9 +1164,9 @@ static int sxg_entry_probe(struct pci_dev *pcidev, smp_processor_id());pci_disable_device (pcidev); -DBG_ERROR ("sxg: %s deallocate device\n" , __FUNCTION__); +DBG_ERROR ("sxg: %s deallocate device\n" , __func__);kfree (netdev); -printk ("Exit %s, Sxg driver loading failed..\n" , __FUNCTION__); +printk ("Exit %s, Sxg driver loading failed..\n" , __func__);return -ENODEV ; }
@@ -2179,10 +2179,10 @@ static int sxg_entry_open(struct net_device *dev)/* * The microcode expects it to be downloaded on every open. */ -DBG_ERROR ("sxg: %s ENTER sxg_download_microcode\n" , __FUNCTION__); +DBG_ERROR ("sxg: %s ENTER sxg_download_microcode\n" , __func__);if (sxg_download_microcode (adapter,SXG_UCODE_SYSTEM )) {DBG_ERROR ("sxg: %s ENTER sxg_adapter_set_hwaddr\n" , - __FUNCTION__); + __func__);sxg_read_config (adapter); }else { adapter->state =ADAPT_FAIL ;
@@ -2293,14 +2293,14 @@ static void __devexit sxg_entry_remove(struct pci_dev *pcidev) mmio_start =pci_resource_start (pcidev,0 ); mmio_len =pci_resource_len (pcidev,0 ); -DBG_ERROR ("sxg: %s rel_region(0) start[%x] len[%x]\n" , __FUNCTION__, +DBG_ERROR ("sxg: %s rel_region(0) start[%x] len[%x]\n" , __func__, mmio_start, mmio_len);release_mem_region (mmio_start, mmio_len); mmio_start =pci_resource_start (pcidev,2 ); mmio_len =pci_resource_len (pcidev,2 ); -DBG_ERROR ("sxg: %s rel_region(2) start[%x] len[%x]\n" , __FUNCTION__, +DBG_ERROR ("sxg: %s rel_region(2) start[%x] len[%x]\n" , __func__, mmio_start, mmio_len);release_mem_region (mmio_start, mmio_len);
@@ -2386,7 +2386,7 @@ static int sxg_entry_halt(struct net_device *dev)atomic_set (&adapter->pending_allocations,0 ); adapter->intrregistered =0 ;sxg_remove_isr (adapter); -DBG_ERROR ("sxg: %s (%s) EXIT\n" , __FUNCTION__, dev->name); +DBG_ERROR ("sxg: %s (%s) EXIT\n" , __func__, dev->name);return (STATUS_SUCCESS ); }
@@ -2440,7 +2440,7 @@ static int sxg_send_packets(struct sk_buff *skb, struct net_device *dev)u32 status =STATUS_SUCCESS ;/* -* DBG_ERROR("sxg: %s ENTER sxg_send_packets skb[%p]\n", __FUNCTION__, +* DBG_ERROR("sxg: %s ENTER sxg_send_packets skb[%p]\n", __func__, * skb); */
@@ -3364,7 +3364,7 @@ static int sxg_read_mdio_reg(struct adapter_t *adapter,SXG_TRACE (TRACE_SXG , SxgTraceBuffer,TRACE_NOISY ,"WrtMDIO" , adapter,0 ,0 ,0 ); -DBG_ERROR ("ENTER %s\n" , __FUNCTION__); +DBG_ERROR ("ENTER %s\n" , __func__);/* Ensure values don't exceed field width */ DevAddr &=0x001F ;/* 5-bit field */
@@ -3400,7 +3400,7 @@ static int sxg_read_mdio_reg(struct adapter_t *adapter,udelay (100 );/* Timeout in 100us units */ READ_REG (HwRegs->MacAmiimIndicator, ValueRead);if (--Timeout ==0 ) { -DBG_ERROR ("EXIT %s with STATUS_FAILURE 1\n" , __FUNCTION__); +DBG_ERROR ("EXIT %s with STATUS_FAILURE 1\n" , __func__);return (STATUS_FAILURE ); }
@@ -3421,7 +3421,7 @@ static int sxg_read_mdio_reg(struct adapter_t *adapter,udelay (100 );/* Timeout in 100us units */ READ_REG (HwRegs->MacAmiimIndicator, ValueRead);if (--Timeout ==0 ) { -DBG_ERROR ("EXIT %s with STATUS_FAILURE 2\n" , __FUNCTION__); +DBG_ERROR ("EXIT %s with STATUS_FAILURE 2\n" , __func__);return (STATUS_FAILURE ); }
@@ -3431,7 +3431,7 @@ static int sxg_read_mdio_reg(struct adapter_t *adapter,READ_REG (HwRegs->MacAmiimField, *pValue); *pValue &=0xFFFF ;/* data is in the lower 16 bits */ -DBG_ERROR ("EXIT %s\n" , __FUNCTION__); +DBG_ERROR ("EXIT %s\n" , __func__);return (STATUS_SUCCESS ); }
@@ -3504,7 +3504,7 @@ static void sxg_mcast_set_mask(struct adapter_t *adapter) {struct sxg_ucode_regs *sxg_regs = adapter->UcodeRegs; -DBG_ERROR ("%s ENTER (%s) MacFilter[%x] mask[%llx]\n" , __FUNCTION__, +DBG_ERROR ("%s ENTER (%s) MacFilter[%x] mask[%llx]\n" , __func__, adapter->netdev->name, (unsigned int )adapter->MacFilter, adapter->MulticastMask);
@@ -4014,7 +4014,7 @@ static int sxg_adapter_set_hwaddr(struct adapter_t *adapter)* sxg_dbg_macaddrs(adapter); */ /* DBG_ERROR ("%s AFTER copying from config.macinfo into currmacaddr\n", -* __FUNCTION__); +* __func__); */ /* sxg_dbg_macaddrs(adapter); */
@@ -4025,7 +4025,7 @@ static int sxg_adapter_set_hwaddr(struct adapter_t *adapter)printk ("sxg: Dev is Null\n" ); } -DBG_ERROR ("%s ENTER (%s)\n" , __FUNCTION__, adapter->netdev->name); +DBG_ERROR ("%s ENTER (%s)\n" , __func__, adapter->netdev->name);if (netif_running (dev)) {return -EBUSY ;
drivers/staging/sxg/sxg_ethtool.c +1 -1
@@ -278,7 +278,7 @@ static int sxg_nic_get_eeprom(struct net_device *netdev,* Get out of here */ printk (KERN_ERR "%s : Could not allocate memory for reading \ -EEPROM\n" , __FUNCTION__); +EEPROM\n" , __func__);return -ENOMEM ; }
Signature · 1 line
1.6.0.4
PATCH 1/1 Staging: rt3070: replace __FUNCTION__ usages
__FUNCTION__ is gcc-specific, use __func__
--- drivers/staging/rt3070/2870_main_dev.c | 6 ++-- drivers/staging/rt3070/common/2870_rtmp_init.c | 4 +- drivers/staging/rt3070/common/ba_action.c | 18 +++++----- drivers/staging/rt3070/common/cmm_data.c | 2 +- drivers/staging/rt3070/common/cmm_info.c | 2 +- drivers/staging/rt3070/common/dfs.c | 4 +- drivers/staging/rt3070/common/rtmp_init.c | 18 +++++----- drivers/staging/rt3070/common/rtusb_bulk.c | 2 +- drivers/staging/rt3070/common/spectrum.c | 44 ++++++++++++------------ drivers/staging/rt3070/rt_ate.c | 32 +++++++++--------- drivers/staging/rt3070/rt_linux.c | 18 +++++----- drivers/staging/rt3070/rt_linux.h | 2 +- drivers/staging/rt3070/rt_profile.c | 12 +++--- drivers/staging/rt3070/rtmp_def.h | 2 +- drivers/staging/rt3070/sta_ioctl.c | 42 +++++++++++----------- 15 files changed, 104 insertions(+), 104 deletions(-)
drivers/staging/rt3070/2870_main_dev.c +3 -3
@@ -269,7 +269,7 @@ INT MlmeThread(* This is important in preemption kernels, which transfer the flow * of execution immediately upon a complete(). */ -DBGPRINT (RT_DEBUG_TRACE ,("<---%s\n" ,__FUNCTION__)); +DBGPRINT (RT_DEBUG_TRACE ,("<---%s\n" ,__func__)); pObj->MLMEThr_pid =NULL ;
@@ -471,7 +471,7 @@ INT TimerQThread(* This is important in preemption kernels, which transfer the flow * of execution immediately upon a complete(). */ -DBGPRINT (RT_DEBUG_TRACE ,("<---%s\n" ,__FUNCTION__)); +DBGPRINT (RT_DEBUG_TRACE ,("<---%s\n" ,__func__)); pObj->TimerQThr_pid =NULL ;
@@ -1267,7 +1267,7 @@ BOOLEAN RT28XXProbePostConfig(if (!(pAd->BulkInEpAddr && pAd->BulkOutEpAddr[0 ])) { -printk ("%s: Could not find both bulk-in and bulk-out endpoints\n" , __FUNCTION__); +printk ("%s: Could not find both bulk-in and bulk-out endpoints\n" , __func__);return FALSE; }
drivers/staging/rt3070/common/2870_rtmp_init.c +2 -2
@@ -1075,7 +1075,7 @@ PNDIS_PACKET GetPacketFromRxRing(if (pRxWI->MPDUtotalByteCount > ThisFrameLen) {DBGPRINT (RT_DEBUG_ERROR , ("%s():pRxWIMPDUtotalByteCount(%d) large than RxDMALen(%ld)\n" , - __FUNCTION__, pRxWI->MPDUtotalByteCount, ThisFrameLen)); + __func__, pRxWI->MPDUtotalByteCount, ThisFrameLen)); goto label_null; }#ifdef RT_BIG_ENDIAN
@@ -1086,7 +1086,7 @@ PNDIS_PACKET GetPacketFromRxRing( pSkb =dev_alloc_skb (ThisFrameLen);if (pSkb ==NULL ) { -DBGPRINT (RT_DEBUG_ERROR ,("%s():Cannot Allocate sk buffer for this Bulk-In buffer!\n" , __FUNCTION__)); +DBGPRINT (RT_DEBUG_ERROR ,("%s():Cannot Allocate sk buffer for this Bulk-In buffer!\n" , __func__)); goto label_null; }
drivers/staging/rt3070/common/ba_action.c +9 -9
@@ -592,7 +592,7 @@ VOID BAOriSessionAdd( pBAEntry->ORIBATimer.TimerValue =0 ;//pFrame->TimeOutValue; -DBGPRINT (RT_DEBUG_TRACE ,("%s : TXBAbitmap = %x, BAWinSize = %d, TimeOut = %ld\n" , __FUNCTION__, pEntry->TXBAbitmap, +DBGPRINT (RT_DEBUG_TRACE ,("%s : TXBAbitmap = %x, BAWinSize = %d, TimeOut = %ld\n" , __func__, pEntry->TXBAbitmap, pBAEntry->BAWinSize, pBAEntry->ORIBATimer.TimerValue));// SEND BAR ;
@@ -666,7 +666,7 @@ BOOLEAN BARecSessionAdd(ba_refresh_reordering_mpdus (pAd, pBAEntry); } -DBGPRINT (RT_DEBUG_TRACE ,("%s(%ld): Idx = %d, BAWinSize(req %d) = %d\n" , __FUNCTION__, pAd->BATable.numAsRecipient, Idx, +DBGPRINT (RT_DEBUG_TRACE ,("%s(%ld): Idx = %d, BAWinSize(req %d) = %d\n" , __func__, pAd->BATable.numAsRecipient, Idx, pFrame->BaParm.BufSize, BAWinSize));// Start fill in parameters.
@@ -904,7 +904,7 @@ VOID BAOriSessionTearDown(return ; } -DBGPRINT (RT_DEBUG_TRACE ,("%s===>Wcid=%d.TID=%d \n" , __FUNCTION__, Wcid,TID )); +DBGPRINT (RT_DEBUG_TRACE ,("%s===>Wcid=%d.TID=%d \n" , __func__, Wcid,TID )); pBAEntry = &pAd->BATable.BAOriEntry[Idx];DBGPRINT (RT_DEBUG_TRACE ,("\t===>Idx = %ld, Wcid=%d.TID=%d, ORI_BA_Status = %d \n" , Idx, Wcid,TID , pBAEntry->ORI_BA_Status));
@@ -963,7 +963,7 @@ VOID BARecSessionTearDown(if (Idx ==0 )return ; -DBGPRINT (RT_DEBUG_TRACE ,("%s===>Wcid=%d.TID=%d \n" , __FUNCTION__, Wcid,TID )); +DBGPRINT (RT_DEBUG_TRACE ,("%s===>Wcid=%d.TID=%d \n" , __func__, Wcid,TID )); pBAEntry = &pAd->BATable.BARecEntry[Idx];
@@ -1180,7 +1180,7 @@ VOID PeerAddBAReqAction(PULONG ptemp;PMAC_TABLE_ENTRY pMacEntry; -DBGPRINT (RT_DEBUG_TRACE , ("%s ==> (Wcid = %d)\n" , __FUNCTION__, Elem->Wcid)); +DBGPRINT (RT_DEBUG_TRACE , ("%s ==> (Wcid = %d)\n" , __func__, Elem->Wcid));//hex_dump("AddBAReq", Elem->Msg, Elem->MsgLen);
@@ -1259,7 +1259,7 @@ VOID PeerAddBAReqAction(MiniportMMRequest (pAd,QID_AC_BE , pOutBuffer, FrameLen);MlmeFreeMemory (pAd, pOutBuffer); -DBGPRINT (RT_DEBUG_TRACE , ("%s(%d): TID(%d), BufSize(%d) <== \n" , __FUNCTION__, Elem->Wcid, ADDframe.BaParm.TID, +DBGPRINT (RT_DEBUG_TRACE , ("%s(%d): TID(%d), BufSize(%d) <== \n" , __func__, Elem->Wcid, ADDframe.BaParm.TID, ADDframe.BaParm.BufSize)); }
@@ -1278,7 +1278,7 @@ VOID PeerAddBARspAction(if (Elem->Wcid >=MAX_LEN_OF_MAC_TABLE )return ; -DBGPRINT (RT_DEBUG_TRACE , ("%s ==> Wcid(%d)\n" , __FUNCTION__, Elem->Wcid)); +DBGPRINT (RT_DEBUG_TRACE , ("%s ==> Wcid(%d)\n" , __func__, Elem->Wcid));//hex_dump("PeerAddBARspAction()", Elem->Msg, Elem->MsgLen);
@@ -1319,7 +1319,7 @@ VOID PeerDelBAAction(//PUCHAR pOutBuffer = NULL; PFRAME_DELBA_REQ pDelFrame =NULL ; -DBGPRINT (RT_DEBUG_TRACE ,("%s ==>\n" , __FUNCTION__)); +DBGPRINT (RT_DEBUG_TRACE ,("%s ==>\n" , __func__));//DELBA Request from unknown peer, ignore this. if (PeerDelBAActionSanity (pAd, Elem->Wcid, Elem->Msg, Elem->MsgLen)) {
@@ -1356,7 +1356,7 @@ BOOLEAN CntlEnqueueForRecv(TID = (UCHAR )pFrame->BARControl.TID; -DBGPRINT (RT_DEBUG_TRACE , ("%s(): BAR-Wcid(%ld), Tid (%d)\n" , __FUNCTION__, Wcid,TID )); +DBGPRINT (RT_DEBUG_TRACE , ("%s(): BAR-Wcid(%ld), Tid (%d)\n" , __func__, Wcid,TID ));//hex_dump("BAR", (PCHAR) pFrame, MsgLen); // Do nothing if the driver is starting halt state. // This might happen when timer already been fired before cancel timer with mlmehalt
drivers/staging/rt3070/common/cmm_data.c +1 -1
@@ -2114,7 +2114,7 @@ BOOLEAN MacTableDeleteEntry( }else { -printk ("\n%s: Impossible Wcid = %d !!!!!\n" , __FUNCTION__, wcid); +printk ("\n%s: Impossible Wcid = %d !!!!!\n" , __func__, wcid); } }
drivers/staging/rt3070/common/cmm_info.c +1 -1
@@ -2011,7 +2011,7 @@ VOID RTMPIoctlGetMacTable( wrq->u.data.length =sizeof (RT_802_11_MAC_TABLE );if (copy_to_user (wrq->u.data.pointer, &MacTab, wrq->u.data.length)) { -DBGPRINT (RT_DEBUG_TRACE , ("%s: copy_to_user() fail\n" , __FUNCTION__)); +DBGPRINT (RT_DEBUG_TRACE , ("%s: copy_to_user() fail\n" , __func__)); } msg = (CHAR *)kmalloc (sizeof (CHAR )*(MAX_LEN_OF_MAC_TABLE *MAC_LINE_LEN ),MEM_ALLOC_FLAG );
drivers/staging/rt3070/common/dfs.c +2 -2
@@ -416,7 +416,7 @@ INT Set_ChMovingTime_Proc( pAd->CommonCfg.RadarDetect.ChMovingTime = Value; -DBGPRINT (RT_DEBUG_TRACE , ("%s:: %d\n" , __FUNCTION__, +DBGPRINT (RT_DEBUG_TRACE , ("%s:: %d\n" , __func__, pAd->CommonCfg.RadarDetect.ChMovingTime));return TRUE;
@@ -432,7 +432,7 @@ INT Set_LongPulseRadarTh_Proc( pAd->CommonCfg.RadarDetect.LongPulseRadarTh = Value; -DBGPRINT (RT_DEBUG_TRACE , ("%s:: %d\n" , __FUNCTION__, +DBGPRINT (RT_DEBUG_TRACE , ("%s:: %d\n" , __func__, pAd->CommonCfg.RadarDetect.LongPulseRadarTh));return TRUE;
drivers/staging/rt3070/common/rtmp_init.c +9 -9
@@ -2930,7 +2930,7 @@ NDIS_STATUS NICLoadFirmware(#ifdef BIN_IN_FILE #define NICLF_DEFAULT_USE () \ flg_default_firm_use = TRUE; \ - printk("%s - Use default firmware!\n", __FUNCTION__); + printk("%s - Use default firmware!\n", __func__);NDIS_STATUS Status =NDIS_STATUS_SUCCESS ;PUCHAR src;
@@ -2945,7 +2945,7 @@ NDIS_STATUS NICLoadFirmware(BOOLEAN flg_default_firm_use = FALSE; -DBGPRINT (RT_DEBUG_TRACE , ("===> %s\n" , __FUNCTION__)); +DBGPRINT (RT_DEBUG_TRACE , ("===> %s\n" , __func__));/* init */ pFirmwareImage =NULL ;
@@ -2968,7 +2968,7 @@ NDIS_STATUS NICLoadFirmware(if (pFirmwareImage ==NULL ) {/* allocate fail, use default firmware array in firmware.h */ -printk ("%s - Allocate memory fail!\n" , __FUNCTION__); +printk ("%s - Allocate memory fail!\n" , __func__);NICLF_DEFAULT_USE (); }else
@@ -2989,7 +2989,7 @@ NDIS_STATUS NICLoadFirmware(if (IS_ERR (srcf)) {printk ("%s - Error %ld opening %s\n" , - __FUNCTION__, -PTR_ERR (srcf), src); + __func__, -PTR_ERR (srcf), src);NICLF_DEFAULT_USE ();break ; }/* End of if */
@@ -2997,7 +2997,7 @@ NDIS_STATUS NICLoadFirmware(/* the object must have a read method */ if ((srcf->f_op ==NULL ) || (srcf->f_op->read ==NULL )) { -printk ("%s - %s does not have a write method\n" , __FUNCTION__, src); +printk ("%s - %s does not have a write method\n" , __func__, src);NICLF_DEFAULT_USE ();break ; }/* End of if */
@@ -3011,7 +3011,7 @@ NDIS_STATUS NICLoadFirmware(if (FileLength !=MAX_FIRMWARE_IMAGE_SIZE ) {printk ("%s: error file length (=%d) in RT2860AP.BIN\n" , - __FUNCTION__, FileLength); + __func__, FileLength);NICLF_DEFAULT_USE ();break ; }
@@ -3034,7 +3034,7 @@ NDIS_STATUS NICLoadFirmware(/* CRC fail */ printk ("%s: CRC = 0x%02x 0x%02x " "error, should be 0x%02x 0x%02x\n" , - __FUNCTION__, + __func__, pFirmwareImage[MAX_FIRMWARE_IMAGE_SIZE -2 ], pFirmwareImage[MAX_FIRMWARE_IMAGE_SIZE -1 ], (UCHAR )(crc>>8 ), (UCHAR )(crc));
@@ -3053,7 +3053,7 @@ NDIS_STATUS NICLoadFirmware( ((FIRMWARE_MAJOR_VERSION << 8) + FIRMWARE_MINOR_VERSION)) { -printk ("%s: firmware version too old!\n" , __FUNCTION__); +printk ("%s: firmware version too old!\n" , __func__);NICLF_DEFAULT_USE ();break ; }/* End of if */
@@ -3188,7 +3188,7 @@ NDIS_STATUS NICLoadFirmware( }/* End of if */ DBGPRINT (RT_DEBUG_TRACE , - ("<=== %s (status=%d)\n" , __FUNCTION__, Status)); + ("<=== %s (status=%d)\n" , __func__, Status));return Status; }/* End of NICLoadFirmware */
drivers/staging/rt3070/common/rtusb_bulk.c +1 -1
@@ -409,7 +409,7 @@ VOID RTUSBBulkOutDataPacket( {if (pTxInfo->QSEL !=FIFO_EDCA ) { -printk ("%s(): ====> pTxInfo->QueueSel(%d)!= FIFO_EDCA!!!!\n" , __FUNCTION__, pTxInfo->QSEL); +printk ("%s(): ====> pTxInfo->QueueSel(%d)!= FIFO_EDCA!!!!\n" , __func__, pTxInfo->QSEL);printk ("\tCWPos=%ld, NBPos=%ld, ENBPos=%ld, bCopy=%d!\n" , pHTTXContext->CurWritePosition, pHTTXContext->NextBulkOutPosition, pHTTXContext->ENextBulkOutPosition, pHTTXContext->bCopySavePad);hex_dump ("Wrong QSel Pkt:" , (PUCHAR )&pWirelessPkt[TmpBulkEndPos], (pHTTXContext->CurWritePosition - pHTTXContext->NextBulkOutPosition)); }
drivers/staging/rt3070/common/spectrum.c +22 -22
168 lines not on this page · raw message
drivers/staging/rt3070/rt_ate.c +16 -16
@@ -326,7 +326,7 @@ static INT ATETxPwrHandler( Bbp94 =BBPR94_DEFAULT ; } -ATEDBGPRINT (RT_DEBUG_TRACE , ("%s (TxPower=%d, R=%ld, BBP_R94=%d)\n" , __FUNCTION__, TxPower,R , Bbp94)); +ATEDBGPRINT (RT_DEBUG_TRACE , ("%s (TxPower=%d, R=%ld, BBP_R94=%d)\n" , __func__, TxPower,R , Bbp94)); }else // 5.5 GHz {
@@ -353,7 +353,7 @@ static INT ATETxPwrHandler(R = (ULONG ) TxPower; } -ATEDBGPRINT (RT_DEBUG_TRACE , ("%s (TxPower=%d, R=%lu)\n" , __FUNCTION__, TxPower,R )); +ATEDBGPRINT (RT_DEBUG_TRACE , ("%s (TxPower=%d, R=%lu)\n" , __func__, TxPower,R )); }//2008/09/10:KH adds to support 3070 ATE TX Power tunning real time<-- #ifdef RT30xx
@@ -364,7 +364,7 @@ static INT ATETxPwrHandler(RT30xxReadRFRegister (pAd,RF_R12 , (PUCHAR )&RFValue); RFValue = (RFValue &0xE0 ) | TxPower;RT30xxWriteRFRegister (pAd,RF_R12 , (UCHAR )RFValue); -ATEDBGPRINT (RT_DEBUG_TRACE , ("3070 or 2070:%s (TxPower=%d, RFValue=%x)\n" , __FUNCTION__, TxPower, RFValue)); +ATEDBGPRINT (RT_DEBUG_TRACE , ("3070 or 2070:%s (TxPower=%d, RFValue=%x)\n" , __func__, TxPower, RFValue)); }else
@@ -481,7 +481,7 @@ static INT ATETxPwrHandler( Bbp94 =BBPR94_DEFAULT ; } -ATEDBGPRINT (RT_DEBUG_TRACE , ("%s (TxPower=%d, R3=%ld, BBP_R94=%d)\n" , __FUNCTION__, TxPower,R , Bbp94)); +ATEDBGPRINT (RT_DEBUG_TRACE , ("%s (TxPower=%d, R3=%ld, BBP_R94=%d)\n" , __func__, TxPower,R , Bbp94));if (pAd->ate.Channel <=14 ) {
@@ -2458,7 +2458,7 @@ INT Set_ATE_Load_E2P_Proc(UINT32 FileLength =0 ;UINT32 value =simple_strtol (arg,0 ,10 ); -ATEDBGPRINT (RT_DEBUG_ERROR , ("===> %s (value=%d)\n\n" , __FUNCTION__, value)); +ATEDBGPRINT (RT_DEBUG_ERROR , ("===> %s (value=%d)\n\n" , __func__, value));if (value >0 ) {
@@ -2482,14 +2482,14 @@ INT Set_ATE_Load_E2P_Proc(if (IS_ERR (srcf)) { -ate_print ("%s - Error %ld opening %s\n" , __FUNCTION__, -PTR_ERR (srcf), src); +ate_print ("%s - Error %ld opening %s\n" , __func__, -PTR_ERR (srcf), src);break ; }/* the object must have a read method */ if ((srcf->f_op ==NULL ) || (srcf->f_op->read ==NULL )) { -ate_print ("%s - %s does not have a read method\n" , __FUNCTION__, src); +ate_print ("%s - %s does not have a read method\n" , __func__, src);break ; }
@@ -2502,7 +2502,7 @@ INT Set_ATE_Load_E2P_Proc(if (FileLength !=EEPROM_SIZE ) {ate_print ("%s: error file length (=%d) in e2p.bin\n" , - __FUNCTION__, FileLength); + __func__, FileLength);break ; }else
@@ -2534,7 +2534,7 @@ INT Set_ATE_Load_E2P_Proc( current->fsuid = orgfsuid; current->fsgid = orgfsgid; } -ATEDBGPRINT (RT_DEBUG_ERROR , ("<=== %s (ret=%d)\n" , __FUNCTION__, ret)); +ATEDBGPRINT (RT_DEBUG_ERROR , ("<=== %s (ret=%d)\n" , __func__, ret));return ret;
@@ -2547,12 +2547,12 @@ INT Set_ATE_Load_E2P_Proc(USHORT WriteEEPROM[(EEPROM_SIZE /2 )];struct iwreq *wrq = (struct iwreq *)arg; -ATEDBGPRINT (RT_DEBUG_TRACE , ("===> %s (wrq->u.data.length = %d)\n\n" , __FUNCTION__, wrq->u.data.length)); +ATEDBGPRINT (RT_DEBUG_TRACE , ("===> %s (wrq->u.data.length = %d)\n\n" , __func__, wrq->u.data.length));if (wrq->u.data.length !=EEPROM_SIZE ) {ate_print ("%s: error length (=%d) from host\n" , - __FUNCTION__, wrq->u.data.length); + __func__, wrq->u.data.length);return FALSE; }else /* (wrq->u.data.length == EEPROM_SIZE) */
@@ -2571,7 +2571,7 @@ INT Set_ATE_Load_E2P_Proc( }while (FALSE); } -ATEDBGPRINT (RT_DEBUG_TRACE , ("<=== %s\n" , __FUNCTION__)); +ATEDBGPRINT (RT_DEBUG_TRACE , ("<=== %s\n" , __func__));return TRUE;
@@ -4344,7 +4344,7 @@ VOID RtmpDoAte( Command_Id =ntohs (pRaCfg->command_id); -ATEDBGPRINT (RT_DEBUG_TRACE ,("\n%s: Command_Id = 0x%04x !\n" , __FUNCTION__, Command_Id)); +ATEDBGPRINT (RT_DEBUG_TRACE ,("\n%s: Command_Id = 0x%04x !\n" , __func__, Command_Id));switch (Command_Id) {
@@ -6350,7 +6350,7 @@ BOOLEAN SyncTxRxConfig(PRTMP_ADAPTER pAd, USHORT offset, UCHAR value) pAd->ate.TxAntennaSel =2 ;break ;default : -DBGPRINT (RT_DEBUG_TRACE , ("%s -- Sth. wrong! : return FALSE; \n" , __FUNCTION__)); +DBGPRINT (RT_DEBUG_TRACE , ("%s -- Sth. wrong! : return FALSE; \n" , __func__));return FALSE; }break ;/* case BBP_R1 */
@@ -6388,13 +6388,13 @@ BOOLEAN SyncTxRxConfig(PRTMP_ADAPTER pAd, USHORT offset, UCHAR value) pAd->ate.RxAntennaSel =3 ;break ;default : -DBGPRINT (RT_DEBUG_ERROR , ("%s -- Impossible! : return FALSE; \n" , __FUNCTION__)); +DBGPRINT (RT_DEBUG_ERROR , ("%s -- Impossible! : return FALSE; \n" , __func__));return FALSE; }break ;/* case BBP_R3 */ default : -DBGPRINT (RT_DEBUG_ERROR , ("%s -- Sth. wrong! : return FALSE; \n" , __FUNCTION__)); +DBGPRINT (RT_DEBUG_ERROR , ("%s -- Sth. wrong! : return FALSE; \n" , __func__));return FALSE; }
drivers/staging/rt3070/rt_linux.c +9 -9
@@ -408,7 +408,7 @@ NDIS_STATUS RTMPAllocateNdisPacket(skb_put (GET_OS_PKT_TYPE (pPacket), HeaderLen+DataLen);RTMP_SET_PACKET_SOURCE (pPacket,PKTSRC_NDIS ); -// printk("%s : pPacket = %p, len = %d\n", __FUNCTION__, pPacket, GET_OS_PKT_LEN(pPacket)); +// printk("%s : pPacket = %p, len = %d\n", __func__, pPacket, GET_OS_PKT_LEN(pPacket)); *ppPacket = pPacket;return NDIS_STATUS_SUCCESS ; }
@@ -782,13 +782,13 @@ VOID RTMPSendWirelessEvent(if (event_table_len ==0 ) { -DBGPRINT (RT_DEBUG_ERROR , ("%s : The type(%0x02x) is not valid.\n" , __FUNCTION__, type)); +DBGPRINT (RT_DEBUG_ERROR , ("%s : The type(%0x02x) is not valid.\n" , __func__, type));return ; }if (event >= event_table_len) { -DBGPRINT (RT_DEBUG_ERROR , ("%s : The event(%0x02x) is not valid.\n" , __FUNCTION__, event)); +DBGPRINT (RT_DEBUG_ERROR , ("%s : The event(%0x02x) is not valid.\n" , __func__, event));return ; }
@@ -826,14 +826,14 @@ VOID RTMPSendWirelessEvent(//send wireless event wireless_send_event (pAd->net_dev,IWEVCUSTOM , &wrqu, pBuf); -//DBGPRINT(RT_DEBUG_TRACE, ("%s : %s\n", __FUNCTION__, pBuf)); +//DBGPRINT(RT_DEBUG_TRACE, ("%s : %s\n", __func__, pBuf)); kfree(pBuf); }else -DBGPRINT (RT_DEBUG_ERROR , ("%s : Can't allocate memory for wireless event.\n" , __FUNCTION__)); +DBGPRINT (RT_DEBUG_ERROR , ("%s : Can't allocate memory for wireless event.\n" , __func__));#else -DBGPRINT (RT_DEBUG_ERROR , ("%s : The Wireless Extension MUST be v15 or newer.\n" , __FUNCTION__)); +DBGPRINT (RT_DEBUG_ERROR , ("%s : The Wireless Extension MUST be v15 or newer.\n" , __func__));#endif /* WIRELESS_EXT >= 15 */ }
@@ -857,13 +857,13 @@ void send_monitor_packets(ASSERT (pRxBlk->pRxPacket);if (pRxBlk->DataSize <10 ) { -DBGPRINT (RT_DEBUG_ERROR , ("%s : Size is too small! (%d)\n" , __FUNCTION__, pRxBlk->DataSize)); +DBGPRINT (RT_DEBUG_ERROR , ("%s : Size is too small! (%d)\n" , __func__, pRxBlk->DataSize)); goto err_free_sk_buff; }if (pRxBlk->DataSize +sizeof (wlan_ng_prism2_header) >RX_BUFFER_AGGRESIZE ) { -DBGPRINT (RT_DEBUG_ERROR , ("%s : Size is too large! (%d)\n" , __FUNCTION__, pRxBlk->DataSize +sizeof (wlan_ng_prism2_header))); +DBGPRINT (RT_DEBUG_ERROR , ("%s : Size is too large! (%d)\n" , __func__, pRxBlk->DataSize +sizeof (wlan_ng_prism2_header))); goto err_free_sk_buff; }
@@ -919,7 +919,7 @@ void send_monitor_packets(if (skb_headroom (pOSPkt) < (sizeof (wlan_ng_prism2_header)+ header_len)) {if (pskb_expand_head (pOSPkt, (sizeof (wlan_ng_prism2_header) + header_len),0 ,GFP_ATOMIC )) { -DBGPRINT (RT_DEBUG_ERROR , ("%s : Reallocate header size of sk_buff fail!\n" , __FUNCTION__)); +DBGPRINT (RT_DEBUG_ERROR , ("%s : Reallocate header size of sk_buff fail!\n" , __func__)); goto err_free_sk_buff; }//end if }//end if
drivers/staging/rt3070/rt_linux.h +1 -1
@@ -124,7 +124,7 @@ typedef int (*HARD_START_XMIT_FUNC)(struct sk_buff *skb, struct net_device *net_#define RT_MOD_INC_USE_COUNT () \ if (!try_module_get(THIS_MODULE)) \ { \ - DBGPRINT(RT_DEBUG_ERROR, ("%s: cannot reserve module\n", __FUNCTION__)); \ + DBGPRINT(RT_DEBUG_ERROR, ("%s: cannot reserve module\n", __func__)); \ return -1; \ }
drivers/staging/rt3070/rt_profile.c +6 -6
@@ -1024,7 +1024,7 @@ NDIS_STATUS RTMPReadParametersHook( pAd->MlmeAux.SsidLen = pAd->CommonCfg.SsidLen;NdisZeroMemory (pAd->MlmeAux.Ssid,NDIS_802_11_LENGTH_SSID );NdisMoveMemory (pAd->MlmeAux.Ssid, tmpbuf, pAd->MlmeAux.SsidLen); -DBGPRINT (RT_DEBUG_TRACE , ("%s::(SSID=%s)\n" , __FUNCTION__, tmpbuf)); +DBGPRINT (RT_DEBUG_TRACE , ("%s::(SSID=%s)\n" , __func__, tmpbuf)); } } }
@@ -1043,7 +1043,7 @@ NDIS_STATUS RTMPReadParametersHook( pAd->StaCfg.BssType =BSS_INFRA ;// Reset Ralink supplicant to not use, it will be set to start when UI set PMK key pAd->StaCfg.WpaState =SS_NOTUSE ; - DBGPRINT(RT_DEBUG_TRACE, ("%s::(NetworkType=%d)\n", __FUNCTION__, pAd->StaCfg.BssType)); + DBGPRINT(RT_DEBUG_TRACE, ("%s::(NetworkType=%d)\n", __func__, pAd->StaCfg.BssType)); } }#endif // CONFIG_STA_SUPPORT //
@@ -1341,7 +1341,7 @@ NDIS_STATUS RTMPReadParametersHook( pAd->StaCfg.PortSecured =WPA_802_1X_PORT_NOT_SECURED ; - DBGPRINT(RT_DEBUG_TRACE, ("%s::(EncrypType=%d)\n", __FUNCTION__, pAd->StaCfg.WepStatus)); + DBGPRINT(RT_DEBUG_TRACE, ("%s::(EncrypType=%d)\n", __func__, pAd->StaCfg.WepStatus)); }#endif // CONFIG_STA_SUPPORT // }
@@ -1368,7 +1368,7 @@ NDIS_STATUS RTMPReadParametersHook( pAd->StaCfg.bMixCipher = FALSE;//RTMPMakeRSNIE(pAd, pAd->StaCfg.AuthMode, pAd->StaCfg.WepStatus, 0); - DBGPRINT(RT_DEBUG_TRACE, ("%s::(EncrypType=%d)\n", __FUNCTION__, pAd->StaCfg.WepStatus)); + DBGPRINT(RT_DEBUG_TRACE, ("%s::(EncrypType=%d)\n", __func__, pAd->StaCfg.WepStatus)); }#endif // CONFIG_STA_SUPPORT // }
@@ -1405,7 +1405,7 @@ NDIS_STATUS RTMPReadParametersHook(else { err =1 ; -DBGPRINT (RT_DEBUG_ERROR , ("%s::(WPAPSK key-string required 8 ~ 64 characters!)\n" , __FUNCTION__)); +DBGPRINT (RT_DEBUG_ERROR , ("%s::(WPAPSK key-string required 8 ~ 64 characters!)\n" , __func__)); }if (err ==0 )
@@ -1436,7 +1436,7 @@ NDIS_STATUS RTMPReadParametersHook( pAd->StaCfg.WpaState =SS_NOTUSE ; } -DBGPRINT (RT_DEBUG_TRACE , ("%s::(WPAPSK=%s)\n" , __FUNCTION__, tmpbuf)); +DBGPRINT (RT_DEBUG_TRACE , ("%s::(WPAPSK=%s)\n" , __func__, tmpbuf)); } } }
drivers/staging/rt3070/rtmp_def.h +1 -1
@@ -356,7 +356,7 @@/* sanity check for apidx */ #define MBSS_MR_APIDX_SANITY_CHECK (apidx) \ { if (apidx > MAX_MBSSID_NUM) { \ - printk("%s> Error! apidx = %d > MAX_MBSSID_NUM!\n", __FUNCTION__, apidx); \ + printk("%s> Error! apidx = %d > MAX_MBSSID_NUM!\n", __func__, apidx); \ apidx = MAIN_MBSSID; } }#define VALID_WCID (_wcid) ((_wcid) > 0 && (_wcid) < MAX_LEN_OF_MAC_TABLE )
drivers/staging/rt3070/sta_ioctl.c +21 -21
158 lines not on this page · raw message
Signature · 1 line
1.6.0.4
PATCH 1/1 Staging: comedi: replace __FUNCTION__ usages
__FUNCTION__ is gcc-specific, use __func__
--- drivers/staging/comedi/drivers/ni_660x.c | 6 +++--- drivers/staging/comedi/drivers/ni_mio_common.c | 24 ++++++++++++------------ drivers/staging/comedi/drivers/ni_pcimio.c | 10 +++++----- drivers/staging/comedi/drivers/ni_stc.h | 14 +++++++------- drivers/staging/comedi/drivers/ni_tio.c | 2 +- 5 files changed, 28 insertions(+), 28 deletions(-)
drivers/staging/comedi/drivers/ni_660x.c +3 -3
@@ -694,7 +694,7 @@ static enum NI_660x_Register ni_gpct_to_660x_register(enum ni_gpct_register reg)break ;default :rt_printk ("%s: unhandled register 0x%x in switch.\n" , - __FUNCTION__, reg); + __func__, reg);BUG ();return 0 ;break ;
@@ -718,7 +718,7 @@ static inline void ni_660x_write_register(struct comedi_device * dev,break ;default :rt_printk ("%s: %s: bug! unhandled case (reg=0x%x) in switch.\n" , - __FILE__, __FUNCTION__, reg); + __FILE__, __func__, reg);BUG ();break ; }
@@ -740,7 +740,7 @@ static inline unsigned ni_660x_read_register(struct comedi_device * dev,break ;default :rt_printk ("%s: %s: bug! unhandled case (reg=0x%x) in switch.\n" , - __FILE__, __FUNCTION__, reg); + __FILE__, __func__, reg);BUG ();break ; }
drivers/staging/comedi/drivers/ni_mio_common.c +12 -12
@@ -397,7 +397,7 @@ static inline void ni_set_bitfield(struct comedi_device * dev, int reg,break ;default :rt_printk ("Warning %s() called with invalid register\n" , - __FUNCTION__); + __func__);rt_printk ("reg is %d\n" , reg);break ; }
@@ -2845,7 +2845,7 @@ static int ni_m_series_ao_config_chanlist(struct comedi_device * dev,break ;default :rt_printk ("%s: bug! unhandled ao reference voltage\n" , - __FUNCTION__); + __func__);break ; }switch (krange->max + krange->min) {
@@ -2857,7 +2857,7 @@ static int ni_m_series_ao_config_chanlist(struct comedi_device * dev,break ;default :rt_printk ("%s: bug! unhandled ao offset voltage\n" , - __FUNCTION__); + __func__);break ; }if (timed)
@@ -4100,7 +4100,7 @@ static unsigned ni_gpct_to_stc_register(enum ni_gpct_register reg)break ;default :rt_printk ("%s: unhandled register 0x%x in switch.\n" , - __FUNCTION__, reg); + __func__, reg);BUG ();return 0 ;break ;
@@ -5225,7 +5225,7 @@ static unsigned ni_old_get_pfi_routing(struct comedi_device * dev, unsigned chanreturn NI_PFI_OUTPUT_G_GATE0 ;break ;default : -rt_printk ("%s: bug, unhandled case in switch.\n" , __FUNCTION__); +rt_printk ("%s: bug, unhandled case in switch.\n" , __func__);break ; }return 0 ;
@@ -5390,7 +5390,7 @@ static int ni_mseries_get_pll_parameters(unsigned reference_period_ns, }if (best_period_picosec ==0 ) {rt_printk ("%s: bug, failed to find pll parameters\n" , - __FUNCTION__); + __func__);return -EIO ; } *freq_divider = best_div;
@@ -5426,7 +5426,7 @@ static int ni_mseries_set_pll_master_clock(struct comedi_device * dev, unsignedif (period_ns < min_period_ns || period_ns > max_period_ns) {rt_printk ("%s: you must specify an input clock frequency between %i and %i nanosec " -"for the phased-lock loop.\n" , __FUNCTION__, +"for the phased-lock loop.\n" , __func__, min_period_ns, max_period_ns);return -EINVAL ; }
@@ -5498,7 +5498,7 @@ static int ni_mseries_set_pll_master_clock(struct comedi_device * dev, unsignedif (i == timeout) {rt_printk ("%s: timed out waiting for PLL to lock to reference clock source %i with period %i ns.\n" , - __FUNCTION__, source, period_ns); + __func__, source, period_ns);return -ETIMEDOUT ; }return 3 ;
@@ -5535,7 +5535,7 @@ static int ni_set_master_clock(struct comedi_device * dev, unsigned source,if (period_ns ==0 ) {rt_printk ("%s: we don't handle an unspecified clock period correctly yet, returning error.\n" , - __FUNCTION__); + __func__);return -EINVAL ; }else { devpriv->clock_ns = period_ns;
@@ -5558,7 +5558,7 @@ static int ni_valid_rtsi_output_source(struct comedi_device * dev, unsigned chanelse {rt_printk ("%s: invalid source for channel=%i, channel %i is always the RTSI clock for pre-m-series boards.\n" , - __FUNCTION__, chan, + __func__, chan, old_RTSI_clock_channel);return 0 ; }
@@ -5621,7 +5621,7 @@ static unsigned ni_get_rtsi_routing(struct comedi_device * dev, unsigned chan) }else {if (chan == old_RTSI_clock_channel)return NI_RTSI_OUTPUT_RTSI_OSC ; -rt_printk ("%s: bug! should never get here?\n" , __FUNCTION__); +rt_printk ("%s: bug! should never get here?\n" , __func__);return 0 ; } }
@@ -5716,7 +5716,7 @@ static int cs5529_wait_for_idle(struct comedi_device * dev) }//printk("looped %i times waiting for idle\n", i); if (i == timeout) { -rt_printk ("%s: %s: timeout\n" , __FILE__, __FUNCTION__); +rt_printk ("%s: %s: timeout\n" , __FILE__, __func__);return -ETIME ; }return 0 ;
drivers/staging/comedi/drivers/ni_pcimio.c +5 -5
@@ -1350,7 +1350,7 @@ static void m_series_stc_writew(struct comedi_device * dev, uint16_t data, int rcase DIO_Control_Register:rt_printk ("%s: FIXME: register 0x%x does not map cleanly on to m-series boards.\n" , - __FUNCTION__, reg); + __func__, reg);return ;break ;case G_Autoincrement_Register (0 ):
@@ -1411,7 +1411,7 @@ static void m_series_stc_writew(struct comedi_device * dev, uint16_t data, int rand M_Offset_SCXI_Serial_Data_Out (8 bit) */ default :rt_printk ("%s: bug! unhandled register=0x%x in switch.\n" , - __FUNCTION__, reg); + __func__, reg);BUG ();return ;break ;
@@ -1446,7 +1446,7 @@ static uint16_t m_series_stc_readw(struct comedi_device * dev, int reg)break ;default :rt_printk ("%s: bug! unhandled register=0x%x in switch.\n" , - __FUNCTION__, reg); + __func__, reg);BUG ();return 0 ;break ;
@@ -1487,7 +1487,7 @@ static void m_series_stc_writel(struct comedi_device * dev, uint32_t data, int rbreak ;default :rt_printk ("%s: bug! unhandled register=0x%x in switch.\n" , - __FUNCTION__, reg); + __func__, reg);BUG ();return ;break ;
@@ -1513,7 +1513,7 @@ static uint32_t m_series_stc_readl(struct comedi_device * dev, int reg)break ;default :rt_printk ("%s: bug! unhandled register=0x%x in switch.\n" , - __FUNCTION__, reg); + __func__, reg);BUG ();return 0 ;break ;
drivers/staging/comedi/drivers/ni_stc.h +7 -7
@@ -339,7 +339,7 @@ static inline unsigned RTSI_Output_Bit(unsigned channel, int is_mseries) max_channel =6 ; }if (channel > max_channel) { -rt_printk ("%s: bug, invalid RTSI_channel=%i\n" , __FUNCTION__, +rt_printk ("%s: bug, invalid RTSI_channel=%i\n" , __func__, channel);return 0 ; }
@@ -1085,7 +1085,7 @@ static inline int M_Offset_Static_AI_Control(int i) 0x263, };if (((unsigned )i) >=sizeof (offset) /sizeof (offset[0 ])) { -rt_printk ("%s: invalid channel=%i\n" , __FUNCTION__, i); +rt_printk ("%s: invalid channel=%i\n" , __func__, i);return offset[0 ]; }return offset[i];
@@ -1099,7 +1099,7 @@ static inline int M_Offset_AO_Reference_Attenuation(int channel) 0x267 };if (((unsigned )channel) >=sizeof (offset) /sizeof (offset[0 ])) { -rt_printk ("%s: invalid channel=%i\n" , __FUNCTION__, channel); +rt_printk ("%s: invalid channel=%i\n" , __func__, channel);return offset[0 ]; }return offset[channel];
@@ -1108,7 +1108,7 @@ static inline unsigned M_Offset_PFI_Output_Select(unsigned n) {if (n <1 || n >NUM_PFI_OUTPUT_SELECT_REGS ) {rt_printk ("%s: invalid pfi output select register=%i\n" , - __FUNCTION__, n); + __func__, n);return M_Offset_PFI_Output_Select_1; }return M_Offset_PFI_Output_Select_1 + (n -1 ) *2 ;
@@ -1162,7 +1162,7 @@ static inline unsigned MSeries_PLL_In_Source_Select_RTSI_Bits(unsigned RTSI_channel) {if (RTSI_channel >7 ) { -rt_printk ("%s: bug, invalid RTSI_channel=%i\n" , __FUNCTION__, +rt_printk ("%s: bug, invalid RTSI_channel=%i\n" , __func__, RTSI_channel);return 0 ; }
@@ -1183,7 +1183,7 @@ static inline unsigned MSeries_PLL_Divisor_Bits(unsigned divisor) {static const unsigned max_divisor =0x10 ;if (divisor <1 || divisor > max_divisor) { -rt_printk ("%s: bug, invalid divisor=%i\n" , __FUNCTION__, +rt_printk ("%s: bug, invalid divisor=%i\n" , __func__, divisor);return 0 ; }
@@ -1193,7 +1193,7 @@ static inline unsigned MSeries_PLL_Multiplier_Bits(unsigned multiplier) {static const unsigned max_multiplier =0x100 ;if (multiplier <1 || multiplier > max_multiplier) { -rt_printk ("%s: bug, invalid multiplier=%i\n" , __FUNCTION__, +rt_printk ("%s: bug, invalid multiplier=%i\n" , __func__, multiplier);return 0 ; }
drivers/staging/comedi/drivers/ni_tio.c +1 -1
@@ -1273,7 +1273,7 @@ static int ni_tio_set_other_src(struct ni_gpct *counter, unsigned index, counter_dev->regs[abz_reg] &= ~mask; counter_dev->regs[abz_reg] |= (source << shift) & mask;write_register (counter, counter_dev->regs[abz_reg], abz_reg); -// rt_printk("%s %x %d %d\n", __FUNCTION__, counter_dev->regs[abz_reg], index, source); +// rt_printk("%s %x %d %d\n", __func__, counter_dev->regs[abz_reg], index, source); return 0 ; }return -EINVAL ;
Signature · 1 line
1.6.0.4
PATCH 1/1 Staging: comedi: Remove useless code
Remove all code contained into CONFIG_COMEDI_RTAI, CONFIG_COMEDI_RTL, CONFIG_COMEDI_RTL_V1, CONFIG_COMEDI_FUSION and CONFIG_COMEDI_RT ifdef/endif preprocessor directives. Which all referred to method called "dual kernel approach" (where both a micro kernel OS and Linux running on same machine and IRQ dispatching is under the control of the first one) for achieve real-time behavior.
I take notice that:
1) Those are all completely undocumented.
2) No one express interest in keep those in sync so are unsupported.
3) As far I know, and at least for CONFIG_COMEDI_FUSION, are obsolete (FUSION was replaced by Xenomai long time ago).
4) Should be better to let respectively authors make a separate patch against Linux source and comedi drivers.
5) Removing those should do avoid confusion in Linux kernel developers.
6) Keep those in don't let us chance to break/change the interfaces.
7) Those aren't integrated with Kbuild so are useless in any case.
8) Removing those make the code more simple.
--- drivers/staging/comedi/Kconfig | 7 - drivers/staging/comedi/Makefile | 1 - drivers/staging/comedi/comedi_fops.c | 18 -- drivers/staging/comedi/comedi_ksyms.c | 7 - drivers/staging/comedi/comedi_rt.h | 75 ------- drivers/staging/comedi/drivers/comedi_rt_timer.c | 61 ------ .../staging/comedi/kcomedilib/kcomedilib_main.c | 9 - drivers/staging/comedi/rt.c | 216 -------------------- drivers/staging/comedi/rt_pend_tq.c | 52 ----- 9 files changed, 0 insertions(+), 446 deletions(-)
drivers/staging/comedi/Kconfig +0 -7
@@ -13,13 +13,6 @@ config COMEDI_DEBUG This is an option for use by developers; most people should say N here. This enables comedi core and driver debugging. -config COMEDI_RT - tristate "Comedi Real-time support" - depends on COMEDI && RT - default N - ---help--- - Enable Real time support for the Comedi core. - config COMEDI_PCI_DRIVERS tristate "Comedi PCI drivers" depends on COMEDI && PCI
drivers/staging/comedi/Makefile +0 -1
@@ -1,5 +1,4 @@ obj-$(CONFIG_COMEDI) += comedi.o -obj-$(CONFIG_COMEDI_RT) += comedi_rt.o obj-$(CONFIG_COMEDI) += kcomedilib/ obj-$(CONFIG_COMEDI) += drivers/
drivers/staging/comedi/comedi_fops.c +0 -18
@@ -1097,13 +1097,6 @@ static int do_cmd_ioctl(struct comedi_device *dev, void *arg, void *file)comedi_set_subdevice_runflags (s, ~0 ,SRF_USER |SRF_RUNNING ); -#ifdef CONFIG_COMEDI_RT -if (async->cmd.flags &TRIG_RT ) { -if (comedi_switch_to_rt (dev) ==0 ) -comedi_set_subdevice_runflags (s,SRF_RT ,SRF_RT ); - } -#endif - ret = s->do_cmd (dev, s);if (ret ==0 )return 0 ;
@@ -1738,12 +1731,6 @@ void do_become_nonbusy(struct comedi_device *dev, struct comedi_subdevice *s)struct comedi_async *async = s->async;comedi_set_subdevice_runflags (s,SRF_RUNNING ,0 ); -#ifdef CONFIG_COMEDI_RT -if (comedi_get_subdevice_runflags (s) &SRF_RT ) { -comedi_switch_to_non_rt (dev); -comedi_set_subdevice_runflags (s,SRF_RT ,0 ); - } -#endif if (async) {comedi_reset_async_buf (async); async->inttrig =NULL ;
@@ -2036,13 +2023,8 @@ void comedi_event(struct comedi_device *dev, struct comedi_subdevice *s)if (comedi_get_subdevice_runflags (s) &SRF_USER ) {if (dev->rt) { -#ifdef CONFIG_COMEDI_RT -/* pend wake up */ -comedi_rt_pend_wakeup (&async->wait_head); -#else printk ("BUG: comedi_event() code unreachable\n" ); -#endif }else {wake_up_interruptible (&async->wait_head);if (s->subdev_flags &SDF_CMD_READ ) {
drivers/staging/comedi/comedi_ksyms.c +0 -7
@@ -46,13 +46,6 @@ EXPORT_SYMBOL(range_bipolar2_5);EXPORT_SYMBOL (range_unipolar10);EXPORT_SYMBOL (range_unipolar5);EXPORT_SYMBOL (range_unknown); -#ifdef CONFIG_COMEDI_RT -EXPORT_SYMBOL (comedi_free_irq); -EXPORT_SYMBOL (comedi_request_irq); -EXPORT_SYMBOL (comedi_switch_to_rt); -EXPORT_SYMBOL (comedi_switch_to_non_rt); -EXPORT_SYMBOL (rt_pend_call); -#endif #ifdef CONFIG_COMEDI_DEBUG EXPORT_SYMBOL (comedi_debug);#endif
drivers/staging/comedi/comedi_rt.h +0 -75
108 lines not on this page · raw message
drivers/staging/comedi/drivers/comedi_rt_timer.c +0 -61
67 lines not on this page · raw message
drivers/staging/comedi/kcomedilib/kcomedilib_main.c +0 -9
@@ -150,10 +150,6 @@ int comedi_command(void *d, struct comedi_cmd *cmd) runflags =SRF_RUNNING ; -#ifdef CONFIG_COMEDI_RT -if (comedi_switch_to_rt (dev) ==0 ) - runflags |=SRF_RT ; -#endif comedi_set_subdevice_runflags (s, ~0 , runflags);comedi_reset_async_buf (async);
@@ -449,11 +445,6 @@ int comedi_cancel(void *d, unsigned int subdevice)if (ret)return ret; -#ifdef CONFIG_COMEDI_RT -if (comedi_get_subdevice_runflags (s) &SRF_RT ) -comedi_switch_to_non_rt (dev); - -#endif comedi_set_subdevice_runflags (s,SRF_RUNNING |SRF_RT ,0 ); s->async->inttrig =NULL ; s->busy =NULL ;
drivers/staging/comedi/rt.c +0 -216
231 lines not on this page · raw message
drivers/staging/comedi/rt_pend_tq.c +0 -52
74 lines not on this page · raw message
Signature · 1 line
1.6.0.4