Date: Mon, 26 Apr 2021 17:18:31 +0200 From: Emmanuel Vadot <manu@bidouilliste.com> To: Neel Chauhan <nc@FreeBSD.org> Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: c8de6e20150a - main - linuxkpi: Elimiate brackets on return in spinlock.h Message-ID: <20210426171831.cb9961436fc128c91fe62b04@bidouilliste.com> In-Reply-To: <202104261516.13QFGkjV072950@gitrepo.freebsd.org> References: <202104261516.13QFGkjV072950@gitrepo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 26 Apr 2021 15:16:46 GMT Neel Chauhan <nc@FreeBSD.org> wrote: > The branch main has been updated by nc (ports committer): > > URL: https://cgit.FreeBSD.org/src/commit/?id=c8de6e20150a3c10575a27532a25b00342a7f452 > > commit c8de6e20150a3c10575a27532a25b00342a7f452 > Author: Neel Chauhan <nc@FreeBSD.org> > AuthorDate: 2021-04-26 15:16:48 +0000 > Commit: Neel Chauhan <nc@FreeBSD.org> > CommitDate: 2021-04-26 15:16:48 +0000 > > linuxkpi: Elimiate brackets on return in spinlock.h > --- > sys/compat/linuxkpi/common/include/linux/spinlock.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/sys/compat/linuxkpi/common/include/linux/spinlock.h b/sys/compat/linuxkpi/common/include/linux/spinlock.h > index 7ef474b671dc..1ad8f8ff1aad 100644 > --- a/sys/compat/linuxkpi/common/include/linux/spinlock.h > +++ b/sys/compat/linuxkpi/common/include/linux/spinlock.h > @@ -167,10 +167,10 @@ atomic_dec_and_lock_irqsave(atomic_t *cnt, spinlock_t *lock, > { > spin_lock_irqsave(lock, flags); > if (atomic_dec_and_test(cnt)) { > - return (1); > + return 1; > } > spin_unlock_irqrestore(lock, flags); > - return (0); > + return 0; > } > > #endif /* _LINUX_SPINLOCK_H_ */ That's not what Hans said, you didn't needed the brackets ('{' and '}') around the return (1); You need the parentesis around returns value. -- Emmanuel Vadot <manu@bidouilliste.com> <manu@FreeBSD.org>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20210426171831.cb9961436fc128c91fe62b04>