Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Apr 2021 15:45:10 GMT
From:      Neel Chauhan <nc@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 9db8b85a942d - stable/13 - linuxkpi: Remove unneeded {} in atomic_dec_and_lock_irqsave()
Message-ID:  <202104261545.13QFjAYB012989@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by nc (ports committer):

URL: https://cgit.FreeBSD.org/src/commit/?id=9db8b85a942dd5e73c0c17198835097a30dc1f7c

commit 9db8b85a942dd5e73c0c17198835097a30dc1f7c
Author:     Neel Chauhan <nc@FreeBSD.org>
AuthorDate: 2021-04-26 15:25:33 +0000
Commit:     Neel Chauhan <nc@FreeBSD.org>
CommitDate: 2021-04-26 15:45:05 +0000

    linuxkpi: Remove unneeded {} in atomic_dec_and_lock_irqsave()
    
    (cherry picked from commit e657f3de6dc29147b5373d2cc2cc47e580931e30)
---
 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;
 }



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