backports.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] backports: fix some dev_coredumpm() problem
@ 2017-10-11 14:31 Johannes Berg
  2017-10-11 14:31 ` [PATCH 2/5] backports: backport from_timer() and timer_setup() Johannes Berg
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Johannes Berg @ 2017-10-11 14:31 UTC (permalink / raw)
  To: backports; +Cc: Johannes Berg

From: Johannes Berg <johannes.berg@intel.com>

Sometimes the argument is const, sometimes not, just cast
away that difference.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 backport/compat/backport-4.7.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/backport/compat/backport-4.7.c b/backport/compat/backport-4.7.c
index b064707767c6..372951b60382 100644
--- a/backport/compat/backport-4.7.c
+++ b/backport/compat/backport-4.7.c
@@ -176,7 +176,9 @@ void dev_coredumpsg(struct device *dev, struct scatterlist *table,
 		    size_t datalen, gfp_t gfp)
 {
 	dev_coredumpm(dev, THIS_MODULE, table, datalen, gfp,
-		      devcd_read_from_sgtable, devcd_free_sgtable);
+		      /* cast away some const problems */
+		      (void *)devcd_read_from_sgtable,
+		      (void *)devcd_free_sgtable);
 }
 EXPORT_SYMBOL_GPL(dev_coredumpsg);
 #endif /* >= 3.18.0 */
-- 
2.14.2

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

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

* [PATCH 2/5] backports: backport from_timer() and timer_setup()
  2017-10-11 14:31 [PATCH 1/5] backports: fix some dev_coredumpm() problem Johannes Berg
@ 2017-10-11 14:31 ` Johannes Berg
  2017-10-11 14:31 ` [PATCH 3/5] backports: remove genregdb Makefile change Johannes Berg
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Johannes Berg @ 2017-10-11 14:31 UTC (permalink / raw)
  To: backports; +Cc: Johannes Berg

From: Johannes Berg <johannes.berg@intel.com>

These are needed for Kees's new timer API, and luckily
he already provided them for conversion purposes :-)

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 backport/backport-include/linux/timer.h | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/backport/backport-include/linux/timer.h b/backport/backport-include/linux/timer.h
index df560a26f77f..85f74d40deda 100644
--- a/backport/backport-include/linux/timer.h
+++ b/backport/backport-include/linux/timer.h
@@ -32,4 +32,20 @@ static inline void setup_deferrable_timer_key(struct timer_list *timer,
 
 #endif
 
+#ifndef from_timer
+#define TIMER_DATA_TYPE          unsigned long
+#define TIMER_FUNC_TYPE          void (*)(TIMER_DATA_TYPE)
+
+static inline void timer_setup(struct timer_list *timer,
+			       void (*callback) (struct timer_list *),
+			       unsigned int flags)
+{
+	__setup_timer(timer, (TIMER_FUNC_TYPE) callback,
+		      (TIMER_DATA_TYPE) timer, flags);
+}
+
+#define from_timer(var, callback_timer, timer_fieldname) \
+	container_of(callback_timer, typeof(*var), timer_fieldname)
+#endif
+
 #endif /* _BACKPORT_TIMER_H */
-- 
2.14.2

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

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

* [PATCH 3/5] backports: remove genregdb Makefile change
  2017-10-11 14:31 [PATCH 1/5] backports: fix some dev_coredumpm() problem Johannes Berg
  2017-10-11 14:31 ` [PATCH 2/5] backports: backport from_timer() and timer_setup() Johannes Berg
@ 2017-10-11 14:31 ` Johannes Berg
  2017-10-11 14:31 ` [PATCH 4/5] backports: add OPTIMIZER_HIDE_VAR Johannes Berg
  2017-10-11 14:31 ` [PATCH 5/5] backports: add crypto_memneq() Johannes Berg
  3 siblings, 0 replies; 5+ messages in thread
From: Johannes Berg @ 2017-10-11 14:31 UTC (permalink / raw)
  To: backports; +Cc: Johannes Berg

From: Johannes Berg <johannes.berg@intel.com>

This piece of code no longer exists.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 patches/0013-fix-makefile-includes/net_wireless_Makefile.patch | 10 ----------
 1 file changed, 10 deletions(-)
 delete mode 100644 patches/0013-fix-makefile-includes/net_wireless_Makefile.patch

diff --git a/patches/0013-fix-makefile-includes/net_wireless_Makefile.patch b/patches/0013-fix-makefile-includes/net_wireless_Makefile.patch
deleted file mode 100644
index ff94708212f3..000000000000
--- a/patches/0013-fix-makefile-includes/net_wireless_Makefile.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/net/wireless/Makefile
-+++ b/net/wireless/Makefile
-@@ -19,6 +19,6 @@ cfg80211-$(CONFIG_CFG80211_INTERNAL_REGD
- CFLAGS_trace.o := -I$(src)
- 
- $(obj)/regdb.c: $(src)/db.txt $(src)/genregdb.awk
--	@$(AWK) -f $(srctree)/$(src)/genregdb.awk < $< > $@
-+	@$(AWK) -f $(src)/genregdb.awk < $< > $@
- 
- clean-files := regdb.c
-- 
2.14.2

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

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

* [PATCH 4/5] backports: add OPTIMIZER_HIDE_VAR
  2017-10-11 14:31 [PATCH 1/5] backports: fix some dev_coredumpm() problem Johannes Berg
  2017-10-11 14:31 ` [PATCH 2/5] backports: backport from_timer() and timer_setup() Johannes Berg
  2017-10-11 14:31 ` [PATCH 3/5] backports: remove genregdb Makefile change Johannes Berg
@ 2017-10-11 14:31 ` Johannes Berg
  2017-10-11 14:31 ` [PATCH 5/5] backports: add crypto_memneq() Johannes Berg
  3 siblings, 0 replies; 5+ messages in thread
From: Johannes Berg @ 2017-10-11 14:31 UTC (permalink / raw)
  To: backports; +Cc: Johannes Berg

From: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 backport/backport-include/linux/compiler-gccN.h | 4 ++++
 backport/backport-include/linux/compiler.h      | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/backport/backport-include/linux/compiler-gccN.h b/backport/backport-include/linux/compiler-gccN.h
index 23ad803dce0b..97e7541d1ab1 100644
--- a/backport/backport-include/linux/compiler-gccN.h
+++ b/backport/backport-include/linux/compiler-gccN.h
@@ -120,3 +120,7 @@
 #endif
 
 #endif	/* gcc version >= 40000 specific checks */
+
+#ifndef OPTIMIZER_HIDE_VAR
+#define OPTIMIZER_HIDE_VAR(var) __asm__ ("" : "=r" (var) : "0" (var))
+#endif
diff --git a/backport/backport-include/linux/compiler.h b/backport/backport-include/linux/compiler.h
index e5af565b13dc..53c069df10a8 100644
--- a/backport/backport-include/linux/compiler.h
+++ b/backport/backport-include/linux/compiler.h
@@ -88,4 +88,8 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s
 })
 #endif
 
+#ifndef OPTIMIZER_HIDE_VAR
+#define OPTIMIZER_HIDE_VAR(var) barrier()
+#endif
+
 #endif /* __BACKPORT_LINUX_COMPILER_H */
-- 
2.14.2

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

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

* [PATCH 5/5] backports: add crypto_memneq()
  2017-10-11 14:31 [PATCH 1/5] backports: fix some dev_coredumpm() problem Johannes Berg
                   ` (2 preceding siblings ...)
  2017-10-11 14:31 ` [PATCH 4/5] backports: add OPTIMIZER_HIDE_VAR Johannes Berg
@ 2017-10-11 14:31 ` Johannes Berg
  3 siblings, 0 replies; 5+ messages in thread
From: Johannes Berg @ 2017-10-11 14:31 UTC (permalink / raw)
  To: backports; +Cc: Johannes Berg

From: Johannes Berg <johannes.berg@intel.com>

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 backport/backport-include/crypto/algapi.h | 16 ++++++++++++++++
 backport/compat/Makefile                  |  2 +-
 copy-list                                 |  3 +++
 3 files changed, 20 insertions(+), 1 deletion(-)
 create mode 100644 backport/backport-include/crypto/algapi.h

diff --git a/backport/backport-include/crypto/algapi.h b/backport/backport-include/crypto/algapi.h
new file mode 100644
index 000000000000..b6fbdd9bf224
--- /dev/null
+++ b/backport/backport-include/crypto/algapi.h
@@ -0,0 +1,16 @@
+#ifndef __BP_ALGAPI_H
+#define __BP_ALGAPI_H
+#include <linux/version.h>
+#include_next <crypto/algapi.h>
+
+#if LINUX_VERSION_IS_LESS(3,13,0)
+#define __crypto_memneq LINUX_BACKPORT(__crypto_memneq)
+noinline unsigned long __crypto_memneq(const void *a, const void *b, size_t size);
+#define crypto_memneq LINUX_BACKPORT(crypto_memneq)
+static inline int crypto_memneq(const void *a, const void *b, size_t size)
+{
+        return __crypto_memneq(a, b, size) != 0UL ? 1 : 0;
+}
+#endif
+
+#endif /* __BP_ALGAPI_H */
diff --git a/backport/compat/Makefile b/backport/compat/Makefile
index 1078357fd04b..1658f588c68f 100644
--- a/backport/compat/Makefile
+++ b/backport/compat/Makefile
@@ -20,7 +20,7 @@ compat-$(CPTCFG_KERNEL_3_9) += compat-3.9.o
 compat-$(CPTCFG_KERNEL_3_10) += backport-3.10.o
 compat-$(CPTCFG_KERNEL_3_11) += backport-3.11.o
 compat-$(CPTCFG_KERNEL_3_12) += backport-3.12.o
-compat-$(CPTCFG_KERNEL_3_13) += backport-3.13.o
+compat-$(CPTCFG_KERNEL_3_13) += backport-3.13.o memneq.o
 compat-$(CPTCFG_KERNEL_3_14) += backport-3.14.o
 compat-$(CPTCFG_KERNEL_3_15) += backport-3.15.o
 compat-$(CPTCFG_KERNEL_3_17) += backport-3.17.o
diff --git a/copy-list b/copy-list
index 88e91c617125..678ebe2f59fc 100644
--- a/copy-list
+++ b/copy-list
@@ -20,6 +20,9 @@ include/linux/fixp-arith.h
 include/linux/bitfield.h
 include/linux/average.h
 
+# crypto_memneq
+crypto/memneq.c -> compat/memneq.c
+
 # 802.11
 drivers/net/wireless/Kconfig
 drivers/net/wireless/Makefile
-- 
2.14.2

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

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

end of thread, other threads:[~2017-10-11 14:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-11 14:31 [PATCH 1/5] backports: fix some dev_coredumpm() problem Johannes Berg
2017-10-11 14:31 ` [PATCH 2/5] backports: backport from_timer() and timer_setup() Johannes Berg
2017-10-11 14:31 ` [PATCH 3/5] backports: remove genregdb Makefile change Johannes Berg
2017-10-11 14:31 ` [PATCH 4/5] backports: add OPTIMIZER_HIDE_VAR Johannes Berg
2017-10-11 14:31 ` [PATCH 5/5] backports: add crypto_memneq() Johannes Berg

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