Commit 8c3d9092 authored by L. Alberto Giménez's avatar L. Alberto Giménez Committed by Greg Kroah-Hartman
Browse files

Staging: rt2860: Sanitize DBGPRINT_ERR macro



Cleaner implementation. Avoids the need of the double parenthesis to call the
macro.

Signed-off-by: default avatarL. Alberto Giménez <agimenez@sysvalve.es>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 3be305fd
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -247,7 +247,7 @@
			}						\
		}							\
		if (BbpCsr.field.Busy == BUSY) {			\
			DBGPRINT_ERR(("BBP(viaMCU=%d) read R%d fail\n", (_bViaMCU), _bbpID));	\
			DBGPRINT_ERR("BBP(viaMCU=%d) read R%d fail\n", (_bViaMCU), _bbpID);	\
			*(_pV) = (_pAd)->BbpWriteLatch[_bbpID];               \
			if ((_bViaMCU) == TRUE) {			\
				RTMP_IO_READ32(_pAd, _regID, &BbpCsr.word);				\
@@ -336,11 +336,11 @@
			}						\
		}							\
	} else {							\
		DBGPRINT_ERR((" , brt30xxBanMcuCmd = %d, Read BBP %d \n", (_A)->brt30xxBanMcuCmd, (_I)));	\
		DBGPRINT_ERR(" , brt30xxBanMcuCmd = %d, Read BBP %d \n", (_A)->brt30xxBanMcuCmd, (_I));	\
		*(_pV) = (_A)->BbpWriteLatch[_I];			\
	}								\
	if ((BbpCsr.field.Busy == BUSY) || ((_A)->bPCIclkOff == TRUE)) { \
		DBGPRINT_ERR(("BBP read R%d=0x%x fail\n", _I, BbpCsr.word)); \
		DBGPRINT_ERR("BBP read R%d=0x%x fail\n", _I, BbpCsr.word); \
		*(_pV) = (_A)->BbpWriteLatch[_I];			\
	}								\
}
@@ -378,7 +378,7 @@
			break;						\
		}							\
		if (_busyCnt == MAX_BUSY_COUNT) {			\
			DBGPRINT_ERR(("BBP write R%d fail\n", _bbpID));	\
			DBGPRINT_ERR("BBP write R%d fail\n", _bbpID);	\
			if ((_bViaMCU) == TRUE) {			\
				RTMP_IO_READ32(_pAd, H2M_BBP_AGENT, &BbpCsr.word);	\
				BbpCsr.field.Busy = 0;			\
@@ -459,15 +459,15 @@
				break;															\
			}																	\
		} else {						\
			DBGPRINT_ERR(("  brt30xxBanMcuCmd = %d. Write BBP %d \n",  (_A)->brt30xxBanMcuCmd, (_I)));	\
			DBGPRINT_ERR("  brt30xxBanMcuCmd = %d. Write BBP %d \n",  (_A)->brt30xxBanMcuCmd, (_I));	\
		}																	\
		if ((BusyCnt == MAX_BUSY_COUNT) || ((_A)->bPCIclkOff == TRUE)) { \
			if (BusyCnt == MAX_BUSY_COUNT)				\
				(_A)->AccessBBPFailCount++;					\
			DBGPRINT_ERR(("BBP write R%d=0x%x fail. BusyCnt= %d.bPCIclkOff = %d. \n", _I, BbpCsr.word, BusyCnt, (_A)->bPCIclkOff));	\
			DBGPRINT_ERR("BBP write R%d=0x%x fail. BusyCnt= %d.bPCIclkOff = %d. \n", _I, BbpCsr.word, BusyCnt, (_A)->bPCIclkOff);	\
		}																	\
	} else {							\
		DBGPRINT_ERR(("****** BBP_Write_Latch Buffer exceeds max boundry ****** \n"));	\
		DBGPRINT_ERR("****** BBP_Write_Latch Buffer exceeds max boundry ****** \n");	\
	}																		\
}
#endif /* RTMP_MAC_PCI // */
+3 −3
Original line number Diff line number Diff line
@@ -1270,13 +1270,13 @@ BOOLEAN CntlEnqueueForRecv(struct rt_rtmp_adapter *pAd,

	/* First check the size, it MUST not exceed the mlme queue size */
	if (MsgLen > MGMT_DMA_BUFFER_SIZE) {
		DBGPRINT_ERR(("CntlEnqueueForRecv: frame too large, size = %ld \n", MsgLen));
		DBGPRINT_ERR("CntlEnqueueForRecv: frame too large, size = %ld \n", MsgLen);
		return FALSE;
	} else if (MsgLen != sizeof(struct rt_frame_ba_req)) {
		DBGPRINT_ERR(("CntlEnqueueForRecv: BlockAck Request frame length size = %ld incorrect\n", MsgLen));
		DBGPRINT_ERR("CntlEnqueueForRecv: BlockAck Request frame length size = %ld incorrect\n", MsgLen);
		return FALSE;
	} else if (MsgLen != sizeof(struct rt_frame_ba_req)) {
		DBGPRINT_ERR(("CntlEnqueueForRecv: BlockAck Request frame length size = %ld incorrect\n", MsgLen));
		DBGPRINT_ERR("CntlEnqueueForRecv: BlockAck Request frame length size = %ld incorrect\n", MsgLen);
		return FALSE;
	}

+1 −1
Original line number Diff line number Diff line
@@ -1366,7 +1366,7 @@ void RTMPResumeMsduTransmission(struct rt_rtmp_adapter *pAd)
	/* R66 should not be 0 */
	if (pAd->BbpTuning.R66CurrentValue == 0) {
		pAd->BbpTuning.R66CurrentValue = 0x38;
		DBGPRINT_ERR(("RTMPResumeMsduTransmission, R66CurrentValue=0...\n"));
		DBGPRINT_ERR("RTMPResumeMsduTransmission, R66CurrentValue=0...\n");
	}

	RTMP_BBP_IO_WRITE8_BY_REG_ID(pAd, BBP_R66,
+5 −5
Original line number Diff line number Diff line
@@ -89,7 +89,7 @@ int RTMPAllocTxRxRingMemory(struct rt_rtmp_adapter *pAd)

			if (pAd->TxDescRing[num].AllocVa == NULL) {
				ErrorValue = ERRLOG_OUT_OF_SHARED_MEMORY;
				DBGPRINT_ERR(("Failed to allocate a big buffer\n"));
				DBGPRINT_ERR("Failed to allocate a big buffer\n");
				Status = NDIS_STATUS_RESOURCES;
				break;
			}
@@ -121,7 +121,7 @@ int RTMPAllocTxRxRingMemory(struct rt_rtmp_adapter *pAd)

			if (pAd->TxBufSpace[num].AllocVa == NULL) {
				ErrorValue = ERRLOG_OUT_OF_SHARED_MEMORY;
				DBGPRINT_ERR(("Failed to allocate a big buffer\n"));
				DBGPRINT_ERR("Failed to allocate a big buffer\n");
				Status = NDIS_STATUS_RESOURCES;
				break;
			}
@@ -197,7 +197,7 @@ int RTMPAllocTxRxRingMemory(struct rt_rtmp_adapter *pAd)

		if (pAd->MgmtDescRing.AllocVa == NULL) {
			ErrorValue = ERRLOG_OUT_OF_SHARED_MEMORY;
			DBGPRINT_ERR(("Failed to allocate a big buffer\n"));
			DBGPRINT_ERR("Failed to allocate a big buffer\n");
			Status = NDIS_STATUS_RESOURCES;
			break;
		}
@@ -251,7 +251,7 @@ int RTMPAllocTxRxRingMemory(struct rt_rtmp_adapter *pAd)

		if (pAd->RxDescRing.AllocVa == NULL) {
			ErrorValue = ERRLOG_OUT_OF_SHARED_MEMORY;
			DBGPRINT_ERR(("Failed to allocate a big buffer\n"));
			DBGPRINT_ERR("Failed to allocate a big buffer\n");
			Status = NDIS_STATUS_RESOURCES;
			break;
		}
@@ -304,7 +304,7 @@ int RTMPAllocTxRxRingMemory(struct rt_rtmp_adapter *pAd)
			/* Error handling */
			if (pDmaBuf->AllocVa == NULL) {
				ErrorValue = ERRLOG_OUT_OF_SHARED_MEMORY;
				DBGPRINT_ERR(("Failed to allocate RxRing's 1st buffer\n"));
				DBGPRINT_ERR("Failed to allocate RxRing's 1st buffer\n");
				Status = NDIS_STATUS_RESOURCES;
				break;
			}
+1 −1
Original line number Diff line number Diff line
@@ -236,7 +236,7 @@ int NICInitTransmit(struct rt_rtmp_adapter *pAd)
		os_alloc_mem(pAd, (u8 **) (&pAd->MgmtDescRing.AllocVa),
			     pAd->MgmtDescRing.AllocSize);
		if (pAd->MgmtDescRing.AllocVa == NULL) {
			DBGPRINT_ERR(("Failed to allocate a big buffer for MgmtDescRing!\n"));
			DBGPRINT_ERR("Failed to allocate a big buffer for MgmtDescRing!\n");
			Status = NDIS_STATUS_RESOURCES;
			goto out1;
		}
Loading