Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Apr 2021 15:25:53 GMT
From:      Neel Chauhan <nc@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: e657f3de6dc2 - main - linuxkpi: Remove unneeded {} in atomic_dec_and_lock_irqsave()
Message-ID:  <202104261525.13QFPrbg086311@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@FreeBSD.org>
AuthorDate: 2021-04-26 15:25:33 +0000
Commit:     Neel Chauhan <nc@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;
 }



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