From: Ingo Molnar <mingo@kernel.org>
To: Fabian Frederick <fabf@skynet.be>
Cc: Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 01/14] locking/atomic: import atomic_dec_not_zero()
Date: Tue, 31 Jan 2017 08:33:12 +0100 [thread overview]
Message-ID: <20170131073312.GA11851@gmail.com> (raw)
In-Reply-To: <20170130183938.12702-1-fabf@skynet.be>
* Fabian Frederick <fabf@skynet.be> wrote:
> complementary definition to atomic_inc_not_zero() featured in
> lib/fault-inject.c
>
> Signed-off-by: Fabian Frederick <fabf@skynet.be>
> ---
> include/linux/atomic.h | 2 ++
> lib/fault-inject.c | 2 --
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/atomic.h b/include/linux/atomic.h
> index e71835b..d8e6551 100644
> --- a/include/linux/atomic.h
> +++ b/include/linux/atomic.h
> @@ -517,6 +517,8 @@ static inline int atomic_add_unless(atomic_t *v, int a, int u)
> #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
> #endif
>
> +#define atomic_dec_not_zero(v) atomic_add_unless((v), -1, 0)
> +
> #ifndef atomic_andnot
> static inline void atomic_andnot(int i, atomic_t *v)
> {
> diff --git a/lib/fault-inject.c b/lib/fault-inject.c
> index 6a823a5..4ad5dcc 100644
> --- a/lib/fault-inject.c
> +++ b/lib/fault-inject.c
> @@ -52,8 +52,6 @@ static void fail_dump(struct fault_attr *attr)
> }
> }
>
> -#define atomic_dec_not_zero(v) atomic_add_unless((v), -1, 0)
> -
Why did you convert the tabs to spaces?
Thanks,
Ingo
next prev parent reply other threads:[~2017-01-31 7:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-30 18:39 [PATCH 01/14] locking/atomic: import atomic_dec_not_zero() Fabian Frederick
2017-01-31 7:33 ` Ingo Molnar [this message]
2017-01-31 10:41 ` Peter Zijlstra
2017-01-31 17:41 ` Fabian Frederick
2017-01-31 19:17 ` Peter Zijlstra
2017-01-31 20:55 ` Fabian Frederick
2017-02-01 9:25 ` Peter Zijlstra
2017-02-01 19:24 ` Fabian Frederick
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170131073312.GA11851@gmail.com \
--to=mingo@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=fabf@skynet.be \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).