summaryrefslogtreecommitdiffstats
path: root/drivers/staging/bcm
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2014-07-29 14:48:29 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-30 17:13:24 -0700
commitb0162025eb763278a2df8b453bd1518fe5e87b81 (patch)
tree8e498cd64da04f8838c052baffb4df616d4059da /drivers/staging/bcm
parentc242233e5b578ef08362d98171c10519876d0d93 (diff)
downloadlinux-stable-b0162025eb763278a2df8b453bd1518fe5e87b81.tar.gz
linux-stable-b0162025eb763278a2df8b453bd1518fe5e87b81.tar.bz2
linux-stable-b0162025eb763278a2df8b453bd1518fe5e87b81.zip
Staging: bcm: IPv6Protocol.c: Reindented switch-case
This patch removes the unneccessary blocks inside the case statements and fixes the indentation of their content. Signed-off-by: Matthias Beyer <mail@beyermatthias.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/bcm')
-rw-r--r--drivers/staging/bcm/IPv6Protocol.c88
1 files changed, 40 insertions, 48 deletions
diff --git a/drivers/staging/bcm/IPv6Protocol.c b/drivers/staging/bcm/IPv6Protocol.c
index e013c5ad9660..44021da1dc2b 100644
--- a/drivers/staging/bcm/IPv6Protocol.c
+++ b/drivers/staging/bcm/IPv6Protocol.c
@@ -34,12 +34,9 @@ static UCHAR *GetNextIPV6ChainedHeader(UCHAR **ppucPayload,
switch (*pucNextHeader) {
case IPV6HDR_TYPE_HOPBYHOP:
- {
-
- BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG,
- DBG_LVL_ALL, "\nIPv6 HopByHop Header");
- usNextHeaderOffset += sizeof(struct bcm_ipv6_options_hdr);
- }
+ BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG,
+ DBG_LVL_ALL, "\nIPv6 HopByHop Header");
+ usNextHeaderOffset += sizeof(struct bcm_ipv6_options_hdr);
break;
case IPV6HDR_TYPE_ROUTING:
@@ -48,37 +45,41 @@ static UCHAR *GetNextIPV6ChainedHeader(UCHAR **ppucPayload,
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG,
DBG_LVL_ALL, "\nIPv6 Routing Header");
- pstIpv6RoutingHeader = (struct bcm_ipv6_routing_hdr *)pucPayloadPtr;
+ pstIpv6RoutingHeader =
+ (struct bcm_ipv6_routing_hdr *)pucPayloadPtr;
usNextHeaderOffset += sizeof(struct bcm_ipv6_routing_hdr);
- usNextHeaderOffset += pstIpv6RoutingHeader->ucNumAddresses * IPV6_ADDRESS_SIZEINBYTES;
-
+ usNextHeaderOffset += pstIpv6RoutingHeader->ucNumAddresses *
+ IPV6_ADDRESS_SIZEINBYTES;
}
break;
- case IPV6HDR_TYPE_FRAGMENTATION:
- {
- BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG,
- DBG_LVL_ALL,
- "\nIPv6 Fragmentation Header");
- usNextHeaderOffset += sizeof(struct bcm_ipv6_fragment_hdr);
- }
+ case IPV6HDR_TYPE_FRAGMENTATION:
+ BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG,
+ DBG_LVL_ALL,
+ "\nIPv6 Fragmentation Header");
+ usNextHeaderOffset += sizeof(struct bcm_ipv6_fragment_hdr);
break;
+
case IPV6HDR_TYPE_DESTOPTS:
{
- struct bcm_ipv6_dest_options_hdr *pstIpv6DestOptsHdr = (struct bcm_ipv6_dest_options_hdr *)pucPayloadPtr;
+ struct bcm_ipv6_dest_options_hdr *pstIpv6DestOptsHdr =
+ (struct bcm_ipv6_dest_options_hdr *)pucPayloadPtr;
int nTotalOptions = pstIpv6DestOptsHdr->ucHdrExtLen;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG,
DBG_LVL_ALL,
"\nIPv6 DestOpts Header Header");
usNextHeaderOffset += sizeof(struct bcm_ipv6_dest_options_hdr);
- usNextHeaderOffset += nTotalOptions * IPV6_DESTOPTS_HDR_OPTIONSIZE ;
-
+ usNextHeaderOffset += nTotalOptions *
+ IPV6_DESTOPTS_HDR_OPTIONSIZE ;
}
break;
+
+
case IPV6HDR_TYPE_AUTHENTICATION:
{
- struct bcm_ipv6_authentication_hdr *pstIpv6AuthHdr = (struct bcm_ipv6_authentication_hdr *)pucPayloadPtr;
+ struct bcm_ipv6_authentication_hdr *pstIpv6AuthHdr =
+ (struct bcm_ipv6_authentication_hdr *)pucPayloadPtr;
int nHdrLen = pstIpv6AuthHdr->ucLength;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG,
@@ -87,44 +88,35 @@ static UCHAR *GetNextIPV6ChainedHeader(UCHAR **ppucPayload,
usNextHeaderOffset += nHdrLen * 4;
}
break;
- case IPV6HDR_TYPE_ENCRYPTEDSECURITYPAYLOAD:
- {
- BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG,
- DBG_LVL_ALL,
- "\nIPv6 Encrypted Security Payload Header");
- *bParseDone = TRUE;
- }
+ case IPV6HDR_TYPE_ENCRYPTEDSECURITYPAYLOAD:
+ BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG,
+ DBG_LVL_ALL,
+ "\nIPv6 Encrypted Security Payload Header");
+ *bParseDone = TRUE;
break;
+
case IPV6_ICMP_HDR_TYPE:
- {
- BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG,
- DBG_LVL_ALL, "\nICMP Header");
- *bParseDone = TRUE;
- }
+ BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG,
+ DBG_LVL_ALL, "\nICMP Header");
+ *bParseDone = TRUE;
break;
+
case TCP_HEADER_TYPE:
- {
- BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG,
- DBG_LVL_ALL, "\nTCP Header");
- *bParseDone = TRUE;
- }
+ BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG,
+ DBG_LVL_ALL, "\nTCP Header");
+ *bParseDone = TRUE;
break;
+
case UDP_HEADER_TYPE:
- {
- BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG,
- DBG_LVL_ALL, "\nUDP Header");
- *bParseDone = TRUE;
- }
+ BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG,
+ DBG_LVL_ALL, "\nUDP Header");
+ *bParseDone = TRUE;
break;
- default:
- {
- *bParseDone = TRUE;
- }
+ default:
+ *bParseDone = TRUE;
break;
-
-
}
if (*bParseDone == false) {