ignatenkobrain / rpms / kernel

Forked from rpms/kernel 3 years ago
Clone
24d93b
From 5265f6ea5a6643c5b2aa13e8e4664962251b37ea Mon Sep 17 00:00:00 2001
24d93b
From: Chad Dupuis <chad.dupuis@qlogic.com>
24d93b
Date: Thu, 13 Mar 2014 14:16:40 -0400
24d93b
Subject: [PATCH] qla2xxx: Fix build errors related to invalid print fields on
24d93b
 some architectures.
24d93b
24d93b
Fixes some build warnings such as:
24d93b
drivers/scsi/qla2xxx/qla_attr.c:162:6: warning: format '%lx' expects argument of
24d93b
type 'long unsigned int', but argument 6 has type 'size_t'"
24d93b
and
24d93b
drivers/scsi/qla2xxx/qla_init.c:5198:7: warning: format '%lx' expects argument
24d93b
of type 'long unsigned int', but argument 5 has type 'uint32_t' [-Wformat]
24d93b
24d93b
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
24d93b
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
24d93b
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
24d93b
---
24d93b
 drivers/scsi/qla2xxx/qla_attr.c |  6 +++---
24d93b
 drivers/scsi/qla2xxx/qla_init.c | 12 ++++++------
24d93b
 2 files changed, 9 insertions(+), 9 deletions(-)
24d93b
24d93b
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
24d93b
index da5ae11..1a976c0 100644
24d93b
--- a/drivers/scsi/qla2xxx/qla_attr.c
24d93b
+++ b/drivers/scsi/qla2xxx/qla_attr.c
24d93b
@@ -159,7 +159,7 @@ qla2x00_sysfs_read_fw_dump_template(struct file *filp, struct kobject *kobj,
24d93b
 		return 0;
24d93b
 
24d93b
 	ql_dbg(ql_dbg_user, vha, 0x70e2,
24d93b
-	    "chunk <- off=%llx count=%lx\n", off, count);
24d93b
+	    "chunk <- off=%llx count=%zx\n", off, count);
24d93b
 	return memory_read_from_buffer(buf, count, &off,
24d93b
 	    ha->fw_dump_template, ha->fw_dump_template_len);
24d93b
 }
24d93b
@@ -200,11 +200,11 @@ qla2x00_sysfs_write_fw_dump_template(struct file *filp, struct kobject *kobj,
24d93b
 	if (off + count > ha->fw_dump_template_len) {
24d93b
 		count = ha->fw_dump_template_len - off;
24d93b
 		ql_dbg(ql_dbg_user, vha, 0x70d3,
24d93b
-		    "chunk -> truncating to %lx bytes.\n", count);
24d93b
+		    "chunk -> truncating to %zx bytes.\n", count);
24d93b
 	}
24d93b
 
24d93b
 	ql_dbg(ql_dbg_user, vha, 0x70d4,
24d93b
-	    "chunk -> off=%llx count=%lx\n", off, count);
24d93b
+	    "chunk -> off=%llx count=%zx\n", off, count);
24d93b
 	memcpy(ha->fw_dump_template + off, buf, count);
24d93b
 
24d93b
 	if (off + count == ha->fw_dump_template_len) {
24d93b
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
24d93b
index c64ee86..462836c 100644
24d93b
--- a/drivers/scsi/qla2xxx/qla_init.c
24d93b
+++ b/drivers/scsi/qla2xxx/qla_init.c
24d93b
@@ -5452,8 +5452,8 @@ qla24xx_load_risc_flash(scsi_qla_host_t *vha, uint32_t *srisc_addr,
24d93b
 	    "-> template size %x bytes\n", dlen);
24d93b
 	if (dlen > risc_size * sizeof(*dcode)) {
24d93b
 		ql_log(ql_log_warn, vha, 0x0167,
24d93b
-		    "Failed fwdump template exceeds array by %lx bytes\n",
24d93b
-		    dlen - risc_size * sizeof(*dcode));
24d93b
+		    "Failed fwdump template exceeds array by %x bytes\n",
24d93b
+		    (uint32_t)(dlen - risc_size * sizeof(*dcode)));
24d93b
 		goto default_template;
24d93b
 	}
24d93b
 	ha->fw_dump_template_len = dlen;
24d93b
@@ -5719,8 +5719,8 @@ qla24xx_load_risc_blob(scsi_qla_host_t *vha, uint32_t *srisc_addr)
24d93b
 	ha->fw_dump_template_len = 0;
24d93b
 
24d93b
 	ql_dbg(ql_dbg_init, vha, 0x171,
24d93b
-	    "Loading fwdump template from %lx\n",
24d93b
-	    (void *)fwcode - (void *)blob->fw->data);
24d93b
+	    "Loading fwdump template from %x\n",
24d93b
+	    (uint32_t)((void *)fwcode - (void *)blob->fw->data));
24d93b
 	risc_size = be32_to_cpu(fwcode[2]);
24d93b
 	ql_dbg(ql_dbg_init, vha, 0x172,
24d93b
 	    "-> array size %x dwords\n", risc_size);
24d93b
@@ -5754,8 +5754,8 @@ qla24xx_load_risc_blob(scsi_qla_host_t *vha, uint32_t *srisc_addr)
24d93b
 	    "-> template size %x bytes\n", dlen);
24d93b
 	if (dlen > risc_size * sizeof(*fwcode)) {
24d93b
 		ql_log(ql_log_warn, vha, 0x0177,
24d93b
-		    "Failed fwdump template exceeds array by %lx bytes\n",
24d93b
-		    dlen - risc_size * sizeof(*fwcode));
24d93b
+		    "Failed fwdump template exceeds array by %x bytes\n",
24d93b
+		    (uint32_t)(dlen - risc_size * sizeof(*fwcode)));
24d93b
 		goto default_template;
24d93b
 	}
24d93b
 	ha->fw_dump_template_len = dlen;
24d93b
-- 
24d93b
1.8.3.1
24d93b
24d93b
From b9469523631bd376a5f877d4e816f3a81c12b790 Mon Sep 17 00:00:00 2001
24d93b
From: Paul Bolle <pebolle@tiscali.nl>
24d93b
Date: Mon, 30 Jun 2014 16:32:29 +0200
24d93b
Subject: [PATCH] x86: Remove unused variable "polling"
24d93b
24d93b
Compile tested. "polling" is unused since commit f80c5b39b80a
24d93b
("sched/idle, x86: Switch from TS_POLLING to TIF_POLLING_NRFLAG").
24d93b
24d93b
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
24d93b
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
24d93b
Cc: Jiri Kosina <jkosina@suse.cz>
24d93b
Link: http://lkml.kernel.org/r/1404138749.2978.6.camel@x41
24d93b
Signed-off-by: Ingo Molnar <mingo@kernel.org>
24d93b
---
24d93b
 arch/x86/kernel/apm_32.c | 1 -
24d93b
 1 file changed, 1 deletion(-)
24d93b
24d93b
diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c
24d93b
index 8fdcec6..66d3b1f 100644
24d93b
--- a/arch/x86/kernel/apm_32.c
24d93b
+++ b/arch/x86/kernel/apm_32.c
24d93b
@@ -841,7 +841,6 @@ static int apm_do_idle(void)
24d93b
 	u32 eax;
24d93b
 	u8 ret = 0;
24d93b
 	int idled = 0;
24d93b
-	int polling;
24d93b
 	int err = 0;
24d93b
 
24d93b
 	if (!need_resched()) {
24d93b
-- 
24d93b
1.8.3.1
24d93b
24d93b
From 75c2e0e53d2fb5df66b8fe162d71930348ac0b96 Mon Sep 17 00:00:00 2001
24d93b
From: John Stultz <john.stultz@linaro.org>
24d93b
Date: Wed, 16 Jul 2014 21:03:56 +0000
24d93b
Subject: [PATCH] ktime: Change ktime_set() to take 64bit seconds value
24d93b
24d93b
In order to support dates past 2038 on 32bit systems, ktime_set()
24d93b
needs to handle 64bit second values.
24d93b
24d93b
[ tglx: Removed the BITS_PER_LONG check ]
24d93b
24d93b
Signed-off-by: John Stultz <john.stultz@linaro.org>
24d93b
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
24d93b
Signed-off-by: John Stultz <john.stultz@linaro.org>
24d93b
---
24d93b
 include/linux/ktime.h | 7 +++----
24d93b
 1 file changed, 3 insertions(+), 4 deletions(-)
24d93b
24d93b
diff --git a/include/linux/ktime.h b/include/linux/ktime.h
24d93b
index e4e9a9f..6950c96 100644
24d93b
--- a/include/linux/ktime.h
24d93b
+++ b/include/linux/ktime.h
24d93b
@@ -71,13 +71,12 @@ typedef union ktime ktime_t;		/* Kill this */
24d93b
  *
24d93b
  * Return the ktime_t representation of the value
24d93b
  */
24d93b
-static inline ktime_t ktime_set(const long secs, const unsigned long nsecs)
24d93b
+static inline ktime_t ktime_set(const s64 secs, const unsigned long nsecs)
24d93b
 {
24d93b
-#if (BITS_PER_LONG == 64)
24d93b
 	if (unlikely(secs >= KTIME_SEC_MAX))
24d93b
 		return (ktime_t){ .tv64 = KTIME_MAX };
24d93b
-#endif
24d93b
-	return (ktime_t) { .tv64 = (s64)secs * NSEC_PER_SEC + (s64)nsecs };
24d93b
+
24d93b
+	return (ktime_t) { .tv64 = secs * NSEC_PER_SEC + (s64)nsecs };
24d93b
 }
24d93b
 
24d93b
 /* Subtract two ktime_t variables. rem = lhs -rhs: */
24d93b
-- 
24d93b
1.8.3.1
24d93b
24d93b
From 80a667f7ab1beee42b31e263ba4681fdfe00a0b6 Mon Sep 17 00:00:00 2001
24d93b
From: Florian Westphal <fw@strlen.de>
24d93b
Date: Wed, 17 Jun 2015 23:58:28 +0200
24d93b
Subject: [PATCH] netfilter: xtables: fix warnings on 32bit platforms
24d93b
24d93b
On 32bit archs gcc complains due to cast from void* to u64.
24d93b
Add intermediate casts to long to silence these warnings.
24d93b
24d93b
include/linux/netfilter/x_tables.h:376:10: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
24d93b
include/linux/netfilter/x_tables.h:384:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
24d93b
include/linux/netfilter/x_tables.h:391:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
24d93b
include/linux/netfilter/x_tables.h:400:22: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
24d93b
24d93b
Fixes: 71ae0dff02d756e ("netfilter: xtables: use percpu rule counters")
24d93b
Reported-by: kbuild test robot <fengguang.wu@intel.com>
24d93b
Signed-off-by: Florian Westphal <fw@strlen.de>
24d93b
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
24d93b
---
24d93b
 include/linux/netfilter/x_tables.h | 8 ++++----
24d93b
 1 file changed, 4 insertions(+), 4 deletions(-)
24d93b
24d93b
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h
24d93b
index d08f0ed..781b6fe 100644
24d93b
--- a/include/linux/netfilter/x_tables.h
24d93b
+++ b/include/linux/netfilter/x_tables.h
24d93b
@@ -390,7 +390,7 @@ static inline u64 xt_percpu_counter_alloc(void)
24d93b
 		if (res == NULL)
24d93b
 			return (u64) -ENOMEM;
24d93b
 
24d93b
-		return (__force u64) res;
24d93b
+		return (u64) (__force unsigned long) res;
24d93b
 	}
24d93b
 
24d93b
 	return 0;
24d93b
@@ -398,14 +398,14 @@ static inline u64 xt_percpu_counter_alloc(void)
24d93b
 static inline void xt_percpu_counter_free(u64 pcnt)
24d93b
 {
24d93b
 	if (nr_cpu_ids > 1)
24d93b
-		free_percpu((void __percpu *) pcnt);
24d93b
+		free_percpu((void __percpu *) (unsigned long) pcnt);
24d93b
 }
24d93b
 
24d93b
 static inline struct xt_counters *
24d93b
 xt_get_this_cpu_counter(struct xt_counters *cnt)
24d93b
 {
24d93b
 	if (nr_cpu_ids > 1)
24d93b
-		return this_cpu_ptr((void __percpu *) cnt->pcnt);
24d93b
+		return this_cpu_ptr((void __percpu *) (unsigned long) cnt->pcnt);
24d93b
 
24d93b
 	return cnt;
24d93b
 }
24d93b
@@ -414,7 +414,7 @@ static inline struct xt_counters *
24d93b
 xt_get_per_cpu_counter(struct xt_counters *cnt, unsigned int cpu)
24d93b
 {
24d93b
 	if (nr_cpu_ids > 1)
24d93b
-		return per_cpu_ptr((void __percpu *) cnt->pcnt, cpu);
24d93b
+		return per_cpu_ptr((void __percpu *) (unsigned long) cnt->pcnt, cpu);
24d93b
 
24d93b
 	return cnt;
24d93b
 }
24d93b
-- 
24d93b
1.8.3.1
24d93b