some sparse fixes
Some small fixes for sparse warnings.
PATCH 1/3 arm: add definition of arch_irq_work_raise()
The arm <asm/irq_work.h> does not define arch_irq_work_raise() so is triggering the following sparse warning. Add a definiton to fix this:
kernel/irq_work.c:70:13: warning: symbol 'arch_irq_work_raise' was not declared. Should it be static? arch/arm/kernel/smp.c:582:6: warning: symbol 'arch_irq_work_raise' was not declared. Should it be static?
--- arch/arm/include/asm/irq_work.h | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/include/asm/irq_work.h +2 -0
@@ -9,4 +9,6 @@ static inline bool arch_irq_work_has_interrupt(void) return is_smp(); } +extern void arch_irq_work_raise (void ); +#endif /* _ASM_ARM_IRQ_WORK_H */
Signature · 1 line
2.35.1
PATCH 2/3 arm: dma-mapping: fix pointer/integer warning
In reply to Ben DooksFix the use of a pointer assignment from integer where false is being used instead of NULL. Fix the following warning by usign NULL:
arch/arm/mm/dma-mapping.c:712:52: warning: Using plain integer as NULL pointer
--- arch/arm/mm/dma-mapping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mm/dma-mapping.c +1 -1
@@ -709,7 +709,7 @@ static void *__dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, *handle =DMA_MAPPING_ERROR ; allowblock =gfpflags_allow_blocking (gfp); - cma = allowblock ?dev_get_cma_area (dev) : false; + cma = allowblock ?dev_get_cma_area (dev) :NULL ;if (cma) buf->allocator = &cma_allocator;
Signature · 1 line
2.35.1
PATCH 3/3 arm: fix undeclared soft_restart
In reply to Ben DooksThe soft_restart() is declared in <asm/system_misc.h> so include that to fix the following sparse warning:
arch/arm/kernel/reboot.c:78:6: warning: symbol 'soft_restart' was not declared. Should it be static?
--- arch/arm/kernel/reboot.c | 1 + 1 file changed, 1 insertion(+)
arch/arm/kernel/reboot.c +1 -0
@@ -10,6 +10,7 @@#include <asm/cacheflush.h> #include <asm/idmap.h> #include <asm/virt.h> +#include <asm/system_misc.h> #include "reboot.h"
Signature · 1 line
2.35.1