From b0162025eb763278a2df8b453bd1518fe5e87b81 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Tue, 29 Jul 2014 14:48:29 +0200 Subject: [PATCH] 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 Signed-off-by: Greg Kroah-Hartman --- drivers/staging/bcm/IPv6Protocol.c | 88 ++++++++++++++---------------- 1 file 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) { -- 2.39.5