Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b8ab70b0 authored by Matthias Beyer's avatar Matthias Beyer Committed by Greg Kroah-Hartman
Browse files

Staging: bcm: Qos.c: Replaced do-while(0) breaks with continue



This patch replaces the do-while(0); loop which is used for breaking if
a check fails by using the `continue` statement. This saves one
indentation level.

Signed-off-by: default avatarMatthias Beyer <mail@beyermatthias.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 81797eaf
Loading
Loading
Loading
Loading
+46 −49
Original line number Diff line number Diff line
@@ -501,16 +501,15 @@ USHORT ClassifyPacket(struct bcm_mini_adapter *Adapter, struct sk_buff *skb)
		 * Iterate through all classifiers which are already in order of priority
		 * to classify the packet until match found
		 */
		do {
		if (false == Adapter->astClassifierTable[uiLoopIndex].bUsed) {
			bClassificationSucceed = false;
				break;
			continue;
		}
		BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL,  "Adapter->PackInfo[%d].bvalid=True\n", uiLoopIndex);

		if (0 == Adapter->astClassifierTable[uiLoopIndex].ucDirection) {
			bClassificationSucceed = false; /* cannot be processed for classification. */
				break;	/* it is a down link connection */
			continue;	/* it is a down link connection */
		}

		pstClassifierRule = &Adapter->astClassifierTable[uiLoopIndex];
@@ -518,7 +517,7 @@ USHORT ClassifyPacket(struct bcm_mini_adapter *Adapter, struct sk_buff *skb)
		uiSfIndex = SearchSfid(Adapter, pstClassifierRule->ulSFID);
		if (uiSfIndex >= NO_OF_QUEUES) {
			BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL,  "Queue Not Valid. SearchSfid for this classifier Failed\n");
				break;
			continue;
		}

		if (Adapter->PackInfo[uiSfIndex].bEthCSSupport) {
@@ -526,7 +525,7 @@ USHORT ClassifyPacket(struct bcm_mini_adapter *Adapter, struct sk_buff *skb)
			if (eEthUnsupportedFrame == stEthCsPktInfo.eNwpktEthFrameType) {
				BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, " ClassifyPacket : Packet Not a Valid Supported Ethernet Frame\n");
				bClassificationSucceed = false;
					break;
				continue;
			}


@@ -536,13 +535,13 @@ USHORT ClassifyPacket(struct bcm_mini_adapter *Adapter, struct sk_buff *skb)

			if (!bClassificationSucceed) {
				BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL,  "ClassifyPacket : Ethernet CS Classification Failed\n");
					break;
				continue;
			}
		} else { /* No ETH Supported on this SF */
			if (eEthOtherFrame != stEthCsPktInfo.eNwpktEthFrameType) {
				BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, " ClassifyPacket : Packet Not a 802.3 Ethernet Frame... hence not allowed over non-ETH CS SF\n");
				bClassificationSucceed = false;
					break;
				continue;
			}
		}

@@ -553,7 +552,7 @@ USHORT ClassifyPacket(struct bcm_mini_adapter *Adapter, struct sk_buff *skb)
			if (stEthCsPktInfo.eNwpktIPFrameType == eNonIPPacket) {
				BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, " ClassifyPacket : Packet is Not an IP Packet\n");
				bClassificationSucceed = false;
					break;
				continue;
			}
			BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Dump IP Header :\n");
			DumpFullPacket((PUCHAR)pIpHeader, 20);
@@ -563,8 +562,6 @@ USHORT ClassifyPacket(struct bcm_mini_adapter *Adapter, struct sk_buff *skb)
			else if (stEthCsPktInfo.eNwpktIPFrameType == eIPv6Packet)
				bClassificationSucceed = IpVersion6(Adapter, pIpHeader, pstClassifierRule);
		}

		} while (0);
	}

	if (bClassificationSucceed == TRUE) {