Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Apr 2021 09:01:22 +0200
From:      Gary Jennejohn <gljennjohn@gmail.com>
To:        Kevin Bowling <kevin.bowling@kev009.com>
Cc:        Rick Macklem <rmacklem@uoguelph.ca>, Neel Chauhan <nc@freebsd.org>, src-committers <src-committers@freebsd.org>, "dev-commits-src-all@FreeBSD.org" <dev-commits-src-all@freebsd.org>, "dev-commits-src-main@FreeBSD.org" <dev-commits-src-main@freebsd.org>
Subject:   Re: git: e657f3de6dc2 - main - linuxkpi: Remove unneeded {} in atomic_dec_and_lock_irqsave()
Message-ID:  <20210427070122.302abed2@ernst.home>
In-Reply-To: <CAK7dMtDKj4KxsUFS3Zx2UTh6T54usftsL%2B=zNZMgq5bVYKpCCQ@mail.gmail.com>
References:  <202104261525.13QFPrbg086311@gitrepo.freebsd.org> <CAK7dMtDuJ_4z2Xwej1hpGcXC6LaP5Wwo5ymbA_4-tds22spOgg@mail.gmail.com> <9b006e97a64d01d128d81bc09f0891ea@freebsd.org> <YTOPR0101MB09705574F7B6F13B4331D17CDD429@YTOPR0101MB0970.CANPRD01.PROD.OUTLOOK.COM> <CAK7dMtDKj4KxsUFS3Zx2UTh6T54usftsL%2B=zNZMgq5bVYKpCCQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 26 Apr 2021 17:16:01 -0700
Kevin Bowling <kevin.bowling@kev009.com> wrote:

> Yup, I don't want to fatigue Neel or the tree with unnecessary churn,
> he had the parens, someone said something about brackets {} and he
> removed the parens.  Since the function needs a rework per mjg's
> review, it could be done when that occurs.
> 

I'd say that the misunderstanding was caused by the use of the word
brackets in the comment.

Looking up bracket on wiktionary gives this definitiotn:

5.  Any of the characters "(", ")", "[", "]", "{", "}", "<" and ">",
used in pairs to enclose parenthetic remarks, sections of mathematical
expressions, etc.

    (Britain) "(" and ")" specifically, the other forms above
    requiring adjectives for disambiguation.

    (US) "[" and "]" specifically - as opposed to the other forms,
    which have their own technical names. 

So, if Neel is used to BE he would remove the parens, which he did.  I,
as an American, would have been looking for [] and been confused by not
finding any.

So, in future it might be best to explicitly use e.g. {}, [], () in such
comments.

> On Mon, Apr 26, 2021 at 3:29 PM Rick Macklem <rmacklem@uoguelph.ca> wrote:
> >
> > Neel wrote:  
> > >On 2021-04-26 09:47, Kevin Bowling wrote:  
> > >> I'm not sure all the context or conversation here but the convention
> > >> is to not use bare return values, i.e in style(9) "Values in return
> > >> statements should be enclosed in parentheses." and that's what was
> > >> asked to be changed on this mailing list.  
> > Just fyi to everyone, there is this in style(9):
> >      In general code can be considered ___new code___ when it makes up about 50%
> >      or more of the file(s) involved.  This is enough to break precedents in
> >      the existing code and use the current style guidelines.
> >
> > As such, if the "return 0;" predates this patch series, Neel is correct
> > to use "return 1;", since that precedent has already been established.
> > I'll admit I see the above ignored a lot and personally don't care if
> > the above generality is followed, but it is in style(9) and I do
> > think a consistent style is preferred over a jumble within a source file.
> >
> > rick
> >
> > The review: https://reviews.freebsd.org/D29988
> >
> > I believe I was asked to do this in the review.
> >
> > -Neel  
> > >
> > > Can you use and link to Phabricator for your src commits?  As much as
> > > possible it is preferable to get it right in one go, for MFCs,
> > > bisection, etc and this kind of churn should be preventable with quick
> > > reviews.  Feel free to tag me as a reviewer.  
> >
> > Sure, will do next time.
> >
> >  
> > > Regards,
> > > Kevin  
> >
> > -Neel
> >  
> _______________________________________________
> dev-commits-src-all@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
> To unsubscribe, send any mail to "dev-commits-src-all-unsubscribe@freebsd.org"


-- 
Gary Jennejohn



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20210427070122.302abed2>