fanghuilin / rpms / kernel

Forked from rpms/kernel 3 years ago
Clone
aa5af0
From b9469523631bd376a5f877d4e816f3a81c12b790 Mon Sep 17 00:00:00 2001
aa5af0
From: Paul Bolle <pebolle@tiscali.nl>
aa5af0
Date: Mon, 30 Jun 2014 16:32:29 +0200
aa5af0
Subject: [PATCH] x86: Remove unused variable "polling"
aa5af0
aa5af0
Compile tested. "polling" is unused since commit f80c5b39b80a
aa5af0
("sched/idle, x86: Switch from TS_POLLING to TIF_POLLING_NRFLAG").
aa5af0
aa5af0
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
aa5af0
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
aa5af0
Cc: Jiri Kosina <jkosina@suse.cz>
aa5af0
Link: http://lkml.kernel.org/r/1404138749.2978.6.camel@x41
aa5af0
Signed-off-by: Ingo Molnar <mingo@kernel.org>
aa5af0
---
aa5af0
 arch/x86/kernel/apm_32.c | 1 -
aa5af0
 1 file changed, 1 deletion(-)
aa5af0
aa5af0
diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c
aa5af0
index 8fdcec6..66d3b1f 100644
aa5af0
--- a/arch/x86/kernel/apm_32.c
aa5af0
+++ b/arch/x86/kernel/apm_32.c
aa5af0
@@ -841,7 +841,6 @@ static int apm_do_idle(void)
aa5af0
 	u32 eax;
aa5af0
 	u8 ret = 0;
aa5af0
 	int idled = 0;
aa5af0
-	int polling;
aa5af0
 	int err = 0;
aa5af0
 
aa5af0
 	if (!need_resched()) {
aa5af0
-- 
aa5af0
1.8.3.1
aa5af0
aa5af0
From 75c2e0e53d2fb5df66b8fe162d71930348ac0b96 Mon Sep 17 00:00:00 2001
aa5af0
From: John Stultz <john.stultz@linaro.org>
aa5af0
Date: Wed, 16 Jul 2014 21:03:56 +0000
aa5af0
Subject: [PATCH] ktime: Change ktime_set() to take 64bit seconds value
aa5af0
aa5af0
In order to support dates past 2038 on 32bit systems, ktime_set()
aa5af0
needs to handle 64bit second values.
aa5af0
aa5af0
[ tglx: Removed the BITS_PER_LONG check ]
aa5af0
aa5af0
Signed-off-by: John Stultz <john.stultz@linaro.org>
aa5af0
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
aa5af0
Signed-off-by: John Stultz <john.stultz@linaro.org>
aa5af0
---
aa5af0
 include/linux/ktime.h | 7 +++----
aa5af0
 1 file changed, 3 insertions(+), 4 deletions(-)
aa5af0
aa5af0
diff --git a/include/linux/ktime.h b/include/linux/ktime.h
aa5af0
index e4e9a9f..6950c96 100644
aa5af0
--- a/include/linux/ktime.h
aa5af0
+++ b/include/linux/ktime.h
aa5af0
@@ -71,13 +71,12 @@ typedef union ktime ktime_t;		/* Kill this */
aa5af0
  *
aa5af0
  * Return the ktime_t representation of the value
aa5af0
  */
aa5af0
-static inline ktime_t ktime_set(const long secs, const unsigned long nsecs)
aa5af0
+static inline ktime_t ktime_set(const s64 secs, const unsigned long nsecs)
aa5af0
 {
aa5af0
-#if (BITS_PER_LONG == 64)
aa5af0
 	if (unlikely(secs >= KTIME_SEC_MAX))
aa5af0
 		return (ktime_t){ .tv64 = KTIME_MAX };
aa5af0
-#endif
aa5af0
-	return (ktime_t) { .tv64 = (s64)secs * NSEC_PER_SEC + (s64)nsecs };
aa5af0
+
aa5af0
+	return (ktime_t) { .tv64 = secs * NSEC_PER_SEC + (s64)nsecs };
aa5af0
 }
aa5af0
 
aa5af0
 /* Subtract two ktime_t variables. rem = lhs -rhs: */
aa5af0
-- 
aa5af0
1.8.3.1
aa5af0
aa5af0
From 80a667f7ab1beee42b31e263ba4681fdfe00a0b6 Mon Sep 17 00:00:00 2001
aa5af0
From: Florian Westphal <fw@strlen.de>
aa5af0
Date: Wed, 17 Jun 2015 23:58:28 +0200
aa5af0
Subject: [PATCH] netfilter: xtables: fix warnings on 32bit platforms
aa5af0
aa5af0
On 32bit archs gcc complains due to cast from void* to u64.
aa5af0
Add intermediate casts to long to silence these warnings.
aa5af0
aa5af0
include/linux/netfilter/x_tables.h:376:10: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
aa5af0
include/linux/netfilter/x_tables.h:384:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
aa5af0
include/linux/netfilter/x_tables.h:391:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
aa5af0
include/linux/netfilter/x_tables.h:400:22: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
aa5af0
aa5af0
Fixes: 71ae0dff02d756e ("netfilter: xtables: use percpu rule counters")
aa5af0
Reported-by: kbuild test robot <fengguang.wu@intel.com>
aa5af0
Signed-off-by: Florian Westphal <fw@strlen.de>
aa5af0
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
aa5af0
---
aa5af0
 include/linux/netfilter/x_tables.h | 8 ++++----
aa5af0
 1 file changed, 4 insertions(+), 4 deletions(-)
aa5af0
aa5af0
diff -up ./include/linux/netfilter/x_tables.h.int ./include/linux/netfilter/x_tables.h
aa5af0
--- ./include/linux/netfilter/x_tables.h.int	2018-03-22 06:40:12.000000000 +0900
aa5af0
+++ ./include/linux/netfilter/x_tables.h	2018-04-15 23:09:40.000000000 +0900
aa5af0
@@ -381,7 +381,7 @@ static inline struct xt_counters *
aa5af0
 xt_get_this_cpu_counter(struct xt_counters *cnt)
aa5af0
 {
aa5af0
 	if (nr_cpu_ids > 1)
aa5af0
-		return this_cpu_ptr((void __percpu *) cnt->pcnt);
aa5af0
+		return this_cpu_ptr((void __percpu *) (unsigned long) cnt->pcnt);
aa5af0
 
aa5af0
 	return cnt;
aa5af0
 }
aa5af0
@@ -390,7 +390,7 @@ static inline struct xt_counters *
aa5af0
 xt_get_per_cpu_counter(struct xt_counters *cnt, unsigned int cpu)
aa5af0
 {
aa5af0
 	if (nr_cpu_ids > 1)
aa5af0
-		return per_cpu_ptr((void __percpu *) cnt->pcnt, cpu);
aa5af0
+		return per_cpu_ptr((void __percpu *) (unsigned long) cnt->pcnt, cpu);
aa5af0
 
aa5af0
 	return cnt;
aa5af0
 }