Warning fixes for 3.2-rt (and other branches)
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(-)
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
@@ -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 }
PATCH 2/2 work-simple: Add missing #include <linux/export.h>
In reply to Ben Hutchingswork-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
@@ -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)