git: e657f3de6dc2 - main - linuxkpi: Remove unneeded {} in atomic_dec_and_lock_irqsave()
Kevin Bowling
kevin.bowling at kev009.com
Mon Apr 26 16:47:48 UTC 2021
Hi Neel,
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.
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.
Regards,
Kevin
On Mon, Apr 26, 2021 at 8:25 AM Neel Chauhan <nc at freebsd.org> wrote:
>
> The branch main has been updated by nc (ports committer):
>
> URL: https://cgit.FreeBSD.org/src/commit/?id=e657f3de6dc29147b5373d2cc2cc47e580931e30
>
> commit e657f3de6dc29147b5373d2cc2cc47e580931e30
> Author: Neel Chauhan <nc at FreeBSD.org>
> AuthorDate: 2021-04-26 15:25:33 +0000
> Commit: Neel Chauhan <nc at FreeBSD.org>
> CommitDate: 2021-04-26 15:25:33 +0000
>
> linuxkpi: Remove unneeded {} in atomic_dec_and_lock_irqsave()
> ---
> sys/compat/linuxkpi/common/include/linux/spinlock.h | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/sys/compat/linuxkpi/common/include/linux/spinlock.h b/sys/compat/linuxkpi/common/include/linux/spinlock.h
> index 1ad8f8ff1aad..83f45b1a2a40 100644
> --- a/sys/compat/linuxkpi/common/include/linux/spinlock.h
> +++ b/sys/compat/linuxkpi/common/include/linux/spinlock.h
> @@ -166,9 +166,8 @@ atomic_dec_and_lock_irqsave(atomic_t *cnt, spinlock_t *lock,
> unsigned long flags)
> {
> spin_lock_irqsave(lock, flags);
> - if (atomic_dec_and_test(cnt)) {
> + if (atomic_dec_and_test(cnt))
> return 1;
> - }
> spin_unlock_irqrestore(lock, flags);
> return 0;
> }
> _______________________________________________
> dev-commits-src-main at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main
> To unsubscribe, send any mail to "dev-commits-src-main-unsubscribe at freebsd.org"
More information about the dev-commits-src-main
mailing list