Backports Archive on lore.kernel.org
 help / color / Atom feed
From: AceLan Kao <acelan.kao@canonical.com>
To: hauke@hauke-m.de, mcgrof@kernel.org, backports@vger.kernel.org
Subject: [PATCH v3 3/3] backports: fix compilation error against v4.4 kernel
Date: Wed, 27 Mar 2019 11:00:44 +0800
Message-ID: <20190327030044.28263-4-acelan.kao@canonical.com> (raw)
In-Reply-To: <20190327030044.28263-1-acelan.kao@canonical.com>

Add the smp_acquire__after_ctrl_dep macro to compat/lib-refcount.c to
fix the compilation error

/tmp/tmp.Z85sMNyuzD/backports-5.1-rc1-test1/backports-5.1-rc1/compat/lib-refcount.c:
In function 'backport_refcount_sub_and_test_checked':
/tmp/tmp.Z85sMNyuzD/backports-5.1-rc1-test1/backports-5.1-rc1/compat/lib-refcount.c:198:3:
error: implicit declaration of function 'smp_acquire__after_ctrl_dep'
[-Werror=implicit-function-declaration]
   smp_acquire__after_ctrl_dep();
   ^

Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
---
 patches/lib-refcount.patch | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/patches/lib-refcount.patch b/patches/lib-refcount.patch
index 28106342..ae568f8d 100644
--- a/patches/lib-refcount.patch
+++ b/patches/lib-refcount.patch
@@ -2,11 +2,15 @@ diff --git a/compat/lib-refcount.c b/compat/lib-refcount.c
 index 5d0582a..8d108f9 100644
 --- a/compat/lib-refcount.c
 +++ b/compat/lib-refcount.c
-@@ -39,6 +39,7 @@
+@@ -42,6 +42,11 @@
  #include <linux/refcount.h>
  #include <linux/spinlock.h>
  #include <linux/bug.h>
 +#include <linux/export.h>
++
++#ifndef smp_acquire__after_ctrl_dep
++#define smp_acquire__after_ctrl_dep()           smp_rmb()
++#endif
  
  /**
   * refcount_add_not_zero_checked - add a value to a refcount unless it is 0
-- 
2.17.1

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

  parent reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-27  3:00 [PATCH v3 0/3] backports: to make iwlwifi backported from v5.1-rc1 can be compiled AceLan Kao
2019-03-27  3:00 ` [PATCH v3 1/3] backports: remove mt76.patch AceLan Kao
2019-03-27  3:00 ` [PATCH v3 2/3] backports: update backport/backport-include/net/netlink.h AceLan Kao
2019-03-27  3:00 ` AceLan Kao [this message]
2019-03-28 15:02 ` [PATCH v3 0/3] backports: to make iwlwifi backported from v5.1-rc1 can be compiled Hauke Mehrtens

Reply instructions:

You may reply publically 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=20190327030044.28263-4-acelan.kao@canonical.com \
    --to=acelan.kao@canonical.com \
    --cc=backports@vger.kernel.org \
    --cc=hauke@hauke-m.de \
    --cc=mcgrof@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

Backports Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/backports/0 backports/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 backports backports/ https://lore.kernel.org/backports \
		backports@vger.kernel.org backports@archiver.kernel.org
	public-inbox-index backports


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.backports


AGPL code for this site: git clone https://public-inbox.org/ public-inbox