All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luca Coelho <luca@coelho.fi>
To: backports@vger.kernel.org
Cc: Luca Coelho <luciano.coelho@intel.com>
Subject: [PATCH 3/6] backport: add atomic_fetch_add_unless()
Date: Fri, 15 Mar 2019 16:33:15 +0200	[thread overview]
Message-ID: <20190315143318.4714-4-luca@coelho.fi> (raw)
In-Reply-To: <20190315143318.4714-1-luca@coelho.fi>

From: Luca Coelho <luciano.coelho@intel.com>

The iwlwifi driver now needs this function.  Backport it.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 backport/backport-include/linux/atomic.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/backport/backport-include/linux/atomic.h b/backport/backport-include/linux/atomic.h
index b4dd2e1d34f0..9ceb586e864a 100644
--- a/backport/backport-include/linux/atomic.h
+++ b/backport/backport-include/linux/atomic.h
@@ -51,4 +51,13 @@
 
 #endif /* atomic_try_cmpxchg_acquire */
 
+#if LINUX_VERSION_IS_LESS(4,19,0)
+#ifndef atomic_fetch_add_unless
+static inline int atomic_fetch_add_unless(atomic_t *v, int a, int u)
+{
+	return __atomic_add_unless(v, a, u);
+}
+#endif
+#endif
+
 #endif /* __BP_ATOMIC_H */
-- 
2.20.1

--
To unsubscribe from this list: send the line "unsubscribe backports" in

  parent reply	other threads:[~2019-03-15 14:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-15 14:33 [PATCH 0/6] backport: some patches from our internal tree 2019-03-15 Luca Coelho
2019-03-15 14:33 ` [PATCH 1/6] backport: add v5.* to the Makefile Luca Coelho
2019-03-15 14:33 ` [PATCH 2/6] backports: update iwlwifi pci device removal patch for v5.0 Luca Coelho
2019-03-15 14:33 ` Luca Coelho [this message]
2019-03-15 14:33 ` [PATCH 4/6] backport: add include ftrace_event.h back to backport-4.0.c Luca Coelho
2019-03-15 14:33 ` [PATCH 5/6] backport: fix handling of nospec.h for 4.15.0 and 4.15.1 Luca Coelho
2019-03-15 14:33 ` [PATCH 6/6] backports: genetlink: avoid NULL dereference Luca Coelho
2019-03-19 21:55 ` [PATCH 0/6] backport: some patches from our internal tree 2019-03-15 Hauke Mehrtens
2019-03-28 15:03 ` Hauke Mehrtens

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=20190315143318.4714-4-luca@coelho.fi \
    --to=luca@coelho.fi \
    --cc=backports@vger.kernel.org \
    --cc=luciano.coelho@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.