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


Groups > linux.kernel > #1584238

Re: [Outreachy kernel] Re: [PATCH 1/2] staging: ks7010: Unnecessary parentheses are removed.

From Julia Lawall <julia.lawall@lip6.fr>
Newsgroups linux.kernel
Subject Re: [Outreachy kernel] Re: [PATCH 1/2] staging: ks7010: Unnecessary parentheses are removed.
Date 2017-02-19 20:30 +0100
Message-ID <tcFlf-2T6-7@gated-at.bofh.it> (permalink)
References <tcEpb-2iE-1@gated-at.bofh.it> <tcEyR-2lV-5@gated-at.bofh.it> <tcESe-2tv-31@gated-at.bofh.it> <tcFbz-2Pz-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



On Sun, 19 Feb 2017, Joe Perches wrote:

> On Sun, 2017-02-19 at 19:58 +0100, Julia Lawall wrote:
> > On Sun, 19 Feb 2017, Joe Perches wrote:
> > > On Sun, 2017-02-19 at 23:56 +0530, Arushi Singhal wrote:
> > > > Unnecessary parentheses should be avoided as reported by checkpatch.pl.
> > > > Remove unnecessary parentheses, as reported by checkpatch as are nicer
> > > > to read.For example:-
> > > > It's often nicer to read if &(foo[0]) is converted to foo like:
> > > >      memcpy(&(ap->bssid[0]), &(ap_info->bssid[0]), ETH_ALEN);
> > > >      memcpy(ap->bssid, ap_info->bssid, ETH_ALEN);
> > > []
> > > > diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c
> > > []
> > > > @@ -212,7 +212,7 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info,
> > > >  	memset(ap, 0, sizeof(struct local_ap_t));
> > > >
> > > >  	/* bssid */
> > > > -	memcpy(&(ap->bssid[0]), &(ap_info->bssid[0]), ETH_ALEN);
> > > > +	memcpy(&ap->bssid[0], &ap_info->bssid[0], ETH_ALEN);
> > >
> > > This code doesn't match the suggested style of
> > > your commit message.
> >
> > Is what is suggested in the commit message correct?  That is, is the 0th
> > element of an array always at the same address as a pointer to the array
> > itself?
>
> I think your wording is a little fuzzy.
>
> Assuming you mean not a pointer to the array,
> but the array itself, yes.

Yes, I mean the array itself,sorry.  Thanks.

Arushi, it would be good it you could make the change you proposed to
make.  The calls would look much more normal that way.

thanks,
julia

>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1487531915.2198.38.camel%40perches.com.
> For more options, visit https://groups.google.com/d/optout.
>

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


Thread

[PATCH 1/2] staging: ks7010: Unnecessary parentheses are removed. Arushi Singhal <arushisinghal19971997@gmail.com> - 2017-02-19 19:30 +0100
  Re: [PATCH 1/2] staging: ks7010: Unnecessary parentheses are  removed. Joe Perches <joe@perches.com> - 2017-02-19 19:40 +0100
    Re: [Outreachy kernel] Re: [PATCH 1/2] staging: ks7010: Unnecessary  parentheses are removed. Julia Lawall <julia.lawall@lip6.fr> - 2017-02-19 20:00 +0100
      Re: [Outreachy kernel] Re: [PATCH 1/2] staging: ks7010: Unnecessary  parentheses are removed. Joe Perches <joe@perches.com> - 2017-02-19 20:20 +0100
        Re: [Outreachy kernel] Re: [PATCH 1/2] staging: ks7010: Unnecessary  parentheses are removed. Julia Lawall <julia.lawall@lip6.fr> - 2017-02-19 20:30 +0100
  Re: [Outreachy kernel] [PATCH 1/2] staging: ks7010: Unnecessary  parentheses are removed. Julia Lawall <julia.lawall@lip6.fr> - 2017-02-19 20:00 +0100

csiph-web