linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 08/14] ipmi: use atomic_dec_not_zero()
@ 2017-01-30 18:47 Fabian Frederick
  2017-07-28 14:27 ` Corey Minyard
  0 siblings, 1 reply; 3+ messages in thread
From: Fabian Frederick @ 2017-01-30 18:47 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-kernel, Corey Minyard, openipmi-developer, Fabian Frederick

instead of atomic_add_unless(value, -1, 0)

Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 drivers/char/ipmi/ipmi_msghandler.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
index 9f69995..961d677 100644
--- a/drivers/char/ipmi/ipmi_msghandler.c
+++ b/drivers/char/ipmi/ipmi_msghandler.c
@@ -3851,7 +3851,7 @@ static void handle_new_recv_msgs(ipmi_smi_t intf)
 	 * If the pretimout count is non-zero, decrement one from it and
 	 * deliver pretimeouts to all the users.
 	 */
-	if (atomic_add_unless(&intf->watchdog_pretimeouts_to_deliver, -1, 0)) {
+	if (atomic_dec_not_zero(&intf->watchdog_pretimeouts_to_deliver)) {
 		ipmi_user_t user;
 
 		rcu_read_lock();
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 08/14] ipmi: use atomic_dec_not_zero()
  2017-01-30 18:47 [PATCH 08/14] ipmi: use atomic_dec_not_zero() Fabian Frederick
@ 2017-07-28 14:27 ` Corey Minyard
  2017-07-28 14:44   ` Corey Minyard
  0 siblings, 1 reply; 3+ messages in thread
From: Corey Minyard @ 2017-07-28 14:27 UTC (permalink / raw)
  To: Fabian Frederick, Andrew Morton; +Cc: linux-kernel, openipmi-developer

I missed this until now, and I see it hasn't been applied yet.  It's 
queued for the next release.

Thanks,

-corey

On 01/30/2017 12:47 PM, Fabian Frederick wrote:
> instead of atomic_add_unless(value, -1, 0)
>
> Signed-off-by: Fabian Frederick <fabf@skynet.be>
> ---
>   drivers/char/ipmi/ipmi_msghandler.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
> index 9f69995..961d677 100644
> --- a/drivers/char/ipmi/ipmi_msghandler.c
> +++ b/drivers/char/ipmi/ipmi_msghandler.c
> @@ -3851,7 +3851,7 @@ static void handle_new_recv_msgs(ipmi_smi_t intf)
>   	 * If the pretimout count is non-zero, decrement one from it and
>   	 * deliver pretimeouts to all the users.
>   	 */
> -	if (atomic_add_unless(&intf->watchdog_pretimeouts_to_deliver, -1, 0)) {
> +	if (atomic_dec_not_zero(&intf->watchdog_pretimeouts_to_deliver)) {
>   		ipmi_user_t user;
>   
>   		rcu_read_lock();

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 08/14] ipmi: use atomic_dec_not_zero()
  2017-07-28 14:27 ` Corey Minyard
@ 2017-07-28 14:44   ` Corey Minyard
  0 siblings, 0 replies; 3+ messages in thread
From: Corey Minyard @ 2017-07-28 14:44 UTC (permalink / raw)
  To: Fabian Frederick, Andrew Morton; +Cc: linux-kernel, openipmi-developer

On 07/28/2017 09:27 AM, Corey Minyard wrote:
> I missed this until now, and I see it hasn't been applied yet.  It's 
> queued for the next release.
>

Well, never mind, I see the main update didn't go in.

-corey

> Thanks,
>
> -corey
>
> On 01/30/2017 12:47 PM, Fabian Frederick wrote:
>> instead of atomic_add_unless(value, -1, 0)
>>
>> Signed-off-by: Fabian Frederick <fabf@skynet.be>
>> ---
>>   drivers/char/ipmi/ipmi_msghandler.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/char/ipmi/ipmi_msghandler.c 
>> b/drivers/char/ipmi/ipmi_msghandler.c
>> index 9f69995..961d677 100644
>> --- a/drivers/char/ipmi/ipmi_msghandler.c
>> +++ b/drivers/char/ipmi/ipmi_msghandler.c
>> @@ -3851,7 +3851,7 @@ static void handle_new_recv_msgs(ipmi_smi_t intf)
>>        * If the pretimout count is non-zero, decrement one from it and
>>        * deliver pretimeouts to all the users.
>>        */
>> -    if (atomic_add_unless(&intf->watchdog_pretimeouts_to_deliver, 
>> -1, 0)) {
>> +    if (atomic_dec_not_zero(&intf->watchdog_pretimeouts_to_deliver)) {
>>           ipmi_user_t user;
>>             rcu_read_lock();
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-07-28 14:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-30 18:47 [PATCH 08/14] ipmi: use atomic_dec_not_zero() Fabian Frederick
2017-07-28 14:27 ` Corey Minyard
2017-07-28 14:44   ` Corey Minyard

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).