lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <89c16e6f-4120-c358-3961-8ec1bbdae3f2@gmail.com>
Date:   Fri, 21 Apr 2023 07:19:44 +0200
From:   Philipp Hortmann <philipp.g.hortmann@...il.com>
To:     Stephan Snyman <rooiratel@...yglitch.net>,
        gregkh@...uxfoundation.org
Cc:     kamrankhadijadj@...il.com, linux-staging@...ts.linux.dev,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: rtl8192e: add missing braces {}

On 4/20/23 15:32, Stephan Snyman wrote:
> Add missing braces to if/else statements to adhere to the
> Linux kernel coding-style guidelines.
> These issues were reported by checkpatch.pl
> 
> "CHECK: braces {} should be used on all arms of this statement"
> 
> Signed-off-by: Stephan Snyman <rooiratel@...yglitch.net>
> ---
>   drivers/staging/rtl8192e/rtllib_rx.c | 14 +++++++++-----
>   1 file changed, 9 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
> index b649d02dc5c8..d44bf261de54 100644
> --- a/drivers/staging/rtl8192e/rtllib_rx.c
> +++ b/drivers/staging/rtl8192e/rtllib_rx.c
> @@ -264,8 +264,9 @@ static int rtllib_is_eapol_frame(struct rtllib_device *ieee,
>   		   RTLLIB_FCTL_FROMDS &&
>   		   memcmp(hdr->addr1, dev->dev_addr, ETH_ALEN) == 0) {
>   		/* FromDS frame with own addr as DA */
> -	} else
> +	} else {
>   		return 0;
> +	}
>   
>   	if (skb->len < 24 + 8)
>   		return 0;
> @@ -433,8 +434,9 @@ static int is_duplicate_packet(struct rtllib_device *ieee,
>   		if (*last_frag + 1 != frag)
>   			/* out-of-order fragment */
>   			goto drop;
> -	} else
> +	} else {
>   		*last_seq = seq;
> +	}
>   
>   	*last_frag = frag;
>   	*last_time = jiffies;
> @@ -2314,8 +2316,9 @@ static inline int rtllib_network_init(
>   	if (stats->freq == RTLLIB_52GHZ_BAND) {
>   		/* for A band (No DS info) */
>   		network->channel = stats->received_channel;
> -	} else
> +	} else {
>   		network->flags |= NETWORK_HAS_CCK;
> +	}
>   
>   	network->wpa_ie_len = 0;
>   	network->rsn_ie_len = 0;
> @@ -2329,9 +2332,10 @@ static inline int rtllib_network_init(
>   		return 1;
>   
>   	network->mode = 0;
> -	if (stats->freq == RTLLIB_52GHZ_BAND)
> +
> +	if (stats->freq == RTLLIB_52GHZ_BAND) {
>   		network->mode = IEEE_A;
> -	else {
> +	} else {
>   		if (network->flags & NETWORK_HAS_OFDM)
>   			network->mode |= IEEE_G;
>   		if (network->flags & NETWORK_HAS_CCK)

Tested-by: Philipp Hortmann <philipp.g.hortmann@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ