Skip to contentSkip to conversation

Warning fixes for 3.2-rt (and other branches)

PATCH New Ben Hutchings 1 participant 3 messages Sep 29, 2016 – Sep 30, 2016 IRQ

lore
Share & tools
lore
#0 lore raw

cover Warning fixes for 3.2-rt (and other branches)

These patches fix longstanding warnings seen when building 3.2-rt.

Ben.

Ben Hutchings (2):
genirq: Fix pointer cast warning for randomness on 32-bit
architectures
work-simple: Add missing #include <linux/export.h>

 kernel/irq/manage.c  | 3 ++-
 kernel/work-simple.c | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)
#1 lore raw

PATCH 1/2 genirq: Fix pointer cast warning for randomness on 32-bit architectures

gcc warns about casting directly from a 32-bit pointer to u64. In the current rt patch series we cast to unsigned long to avoid the warning, but this fix hasn't been backported to all versions.

---
 kernel/irq/manage.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
kernel/irq/manage.c +2 -1
index c4677795d7c8..b1683ba80c88 100644
@@ -897,7 +897,8 @@ static int irq_thread(void *data)
 #ifdef CONFIG_PREEMPT_RT_FULL
 			migrate_disable();
 			add_interrupt_randomness(action->irq, 0,
-						 desc->random_ip ^ (u64) action);
+						 desc->random_ip ^
+						 (unsigned long) action);
 			migrate_enable();
 #endif
 		}
#2 lore raw

PATCH 2/2 work-simple: Add missing #include <linux/export.h>

In reply to Ben Hutchings

work-simple.c uses EXPORT_SYMBOL_GPL(), defined in <linux/export.h>.

---
I'm not sure there's any need for these exports so the correct fix might be to remove them.

Ben.

 kernel/work-simple.c | 1 +
 1 file changed, 1 insertion(+)
kernel/work-simple.c +1 -0
index c996f755dba6..e57a0522573f 100644
@@ -10,6 +10,7 @@
 #include <linux/kthread.h>
 #include <linux/slab.h>
 #include <linux/spinlock.h>
+#include <linux/export.h>
 
 #define SWORK_EVENT_PENDING     (1 << 0)