Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1583956

Re: [PATCH] staging: ks7010: Unnecessary parentheses should be avoided

From Joe Perches <joe@perches.com>
Newsgroups linux.kernel
Subject Re: [PATCH] staging: ks7010: Unnecessary parentheses should be avoided
Date 2017-02-18 20:20 +0100
Message-ID <tciI2-5Nq-9@gated-at.bofh.it> (permalink)
References <tcfKa-41R-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sat, 2017-02-18 at 21:32 +0530, Arushi Singhal wrote:
> Unnecessary parentheses as reported by checkpatch.pl
[]
> diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c
[]
> @@ -121,19 +121,19 @@ int get_current_ap(struct ks_wlan_private *priv, struct link_ap_info_t *ap_info)
>  	}
>  
>  	/* bssid */
> -	memcpy(&(ap->bssid[0]), &(ap_info->bssid[0]), ETH_ALEN);
> +	memcpy(&ap->bssid[0], &ap_info->bssid[0], ETH_ALEN);

It's often nicer to read if &(foo[0]) is converted to foo like:

	memcpy(ap->bssid, ap_info->bssid, ETH_ALEN);

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] staging: ks7010: Unnecessary parentheses should be avoided Arushi Singhal <arushisinghal19971997@gmail.com> - 2017-02-18 17:10 +0100
  Re: [PATCH] staging: ks7010: Unnecessary parentheses should be  avoided Joe Perches <joe@perches.com> - 2017-02-18 20:20 +0100

csiph-web