git: c8de6e20150a - main - linuxkpi: Elimiate brackets on return in spinlock.h
Emmanuel Vadot
manu at bidouilliste.com
Mon Apr 26 15:18:34 UTC 2021
On Mon, 26 Apr 2021 15:16:46 GMT
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=c8de6e20150a3c10575a27532a25b00342a7f452
>
> commit c8de6e20150a3c10575a27532a25b00342a7f452
> Author: Neel Chauhan <nc at FreeBSD.org>
> AuthorDate: 2021-04-26 15:16:48 +0000
> Commit: Neel Chauhan <nc at 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 at bidouilliste.com> <manu at FreeBSD.org>
More information about the dev-commits-src-all
mailing list