* some sparse fixes
@ 2022-07-21 21:17 Ben Dooks
2022-07-21 21:17 ` [PATCH 1/3] arm: add definition of arch_irq_work_raise() Ben Dooks
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Ben Dooks @ 2022-07-21 21:17 UTC (permalink / raw)
To: linux-kernel, linux-arm-kernel; +Cc: linux
Some small fixes for sparse warnings.
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 1/3] arm: add definition of arch_irq_work_raise()
2022-07-21 21:17 some sparse fixes Ben Dooks
@ 2022-07-21 21:17 ` Ben Dooks
2022-07-21 21:17 ` [PATCH 2/3] arm: dma-mapping: fix pointer/integer warning Ben Dooks
2022-07-21 21:17 ` [PATCH 3/3] arm: fix undeclared soft_restart Ben Dooks
2 siblings, 0 replies; 4+ messages in thread
From: Ben Dooks @ 2022-07-21 21:17 UTC (permalink / raw)
To: linux-kernel, linux-arm-kernel; +Cc: linux, Ben Dooks
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?
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
---
arch/arm/include/asm/irq_work.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/include/asm/irq_work.h b/arch/arm/include/asm/irq_work.h
index 8895999834cc..3149e4dc1b54 100644
--- a/arch/arm/include/asm/irq_work.h
+++ b/arch/arm/include/asm/irq_work.h
@@ -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 */
--
2.35.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/3] arm: dma-mapping: fix pointer/integer warning
2022-07-21 21:17 some sparse fixes Ben Dooks
2022-07-21 21:17 ` [PATCH 1/3] arm: add definition of arch_irq_work_raise() Ben Dooks
@ 2022-07-21 21:17 ` Ben Dooks
2022-07-21 21:17 ` [PATCH 3/3] arm: fix undeclared soft_restart Ben Dooks
2 siblings, 0 replies; 4+ messages in thread
From: Ben Dooks @ 2022-07-21 21:17 UTC (permalink / raw)
To: linux-kernel, linux-arm-kernel; +Cc: linux, Ben Dooks
Fix 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
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
---
arch/arm/mm/dma-mapping.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index 059cce018570..1483b6a4319d 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -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;
--
2.35.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/3] arm: fix undeclared soft_restart
2022-07-21 21:17 some sparse fixes Ben Dooks
2022-07-21 21:17 ` [PATCH 1/3] arm: add definition of arch_irq_work_raise() Ben Dooks
2022-07-21 21:17 ` [PATCH 2/3] arm: dma-mapping: fix pointer/integer warning Ben Dooks
@ 2022-07-21 21:17 ` Ben Dooks
2 siblings, 0 replies; 4+ messages in thread
From: Ben Dooks @ 2022-07-21 21:17 UTC (permalink / raw)
To: linux-kernel, linux-arm-kernel; +Cc: linux, Ben Dooks
The 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?
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
---
arch/arm/kernel/reboot.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/kernel/reboot.c b/arch/arm/kernel/reboot.c
index 2cb943422554..3f0d5c3dae11 100644
--- a/arch/arm/kernel/reboot.c
+++ b/arch/arm/kernel/reboot.c
@@ -10,6 +10,7 @@
#include <asm/cacheflush.h>
#include <asm/idmap.h>
#include <asm/virt.h>
+#include <asm/system_misc.h>
#include "reboot.h"
--
2.35.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-07-21 21:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-21 21:17 some sparse fixes Ben Dooks
2022-07-21 21:17 ` [PATCH 1/3] arm: add definition of arch_irq_work_raise() Ben Dooks
2022-07-21 21:17 ` [PATCH 2/3] arm: dma-mapping: fix pointer/integer warning Ben Dooks
2022-07-21 21:17 ` [PATCH 3/3] arm: fix undeclared soft_restart Ben Dooks
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox