* [PATCH] media: ddbridge: Move asm includes after linux ones
@ 2018-12-10 23:35 Nathan Chancellor
2018-12-11 21:19 ` Guenter Roeck
0 siblings, 1 reply; 2+ messages in thread
From: Nathan Chancellor @ 2018-12-10 23:35 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: linux-media, linux-kernel, Nathan Chancellor
Without this, cpumask_t and bool are not defined:
In file included from drivers/media/pci/ddbridge/ddbridge-ci.c:19:
In file included from drivers/media/pci/ddbridge/ddbridge.h:22:
./arch/arm/include/asm/irq.h:35:50: error: unknown type name 'cpumask_t'
extern void arch_trigger_cpumask_backtrace(const cpumask_t *mask,
^
./arch/arm/include/asm/irq.h:36:9: error: unknown type name 'bool'
bool exclude_self);
^
Doing a survey of the kernel tree, this appears to be expected because
'#include <asm/irq.h>' is always after the linux includes.
This also fixes warnings of this variety (with Clang):
In file included from drivers/media/pci/ddbridge/ddbridge-ci.c:19:
In file included from drivers/media/pci/ddbridge/ddbridge.h:56:
In file included from ./include/media/dvb_net.h:22:
In file included from ./include/linux/netdevice.h:50:
In file included from ./include/uapi/linux/neighbour.h:6:
In file included from ./include/linux/netlink.h:9:
In file included from ./include/net/scm.h:11:
In file included from ./include/linux/sched/signal.h:6:
./include/linux/signal.h:87:11: warning: array index 3 is past the end
of the array (which contains 2 elements) [-Warray-bounds]
return (set->sig[3] | set->sig[2] |
^ ~
./arch/arm/include/asm/signal.h:17:2: note: array 'sig' declared here
unsigned long sig[_NSIG_WORDS];
^
Fixes: b6973637c4cc ("media: ddbridge: remove another duplicate of io.h and sort includes")
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---
drivers/media/pci/ddbridge/ddbridge.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/media/pci/ddbridge/ddbridge.h b/drivers/media/pci/ddbridge/ddbridge.h
index 0be6ed216e65..b834449e78f8 100644
--- a/drivers/media/pci/ddbridge/ddbridge.h
+++ b/drivers/media/pci/ddbridge/ddbridge.h
@@ -18,9 +18,6 @@
#ifndef _DDBRIDGE_H_
#define _DDBRIDGE_H_
-#include <asm/dma.h>
-#include <asm/irq.h>
-
#include <linux/clk.h>
#include <linux/completion.h>
#include <linux/delay.h>
@@ -48,6 +45,9 @@
#include <linux/vmalloc.h>
#include <linux/workqueue.h>
+#include <asm/dma.h>
+#include <asm/irq.h>
+
#include <media/dmxdev.h>
#include <media/dvb_ca_en50221.h>
#include <media/dvb_demux.h>
--
2.20.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] media: ddbridge: Move asm includes after linux ones
2018-12-10 23:35 [PATCH] media: ddbridge: Move asm includes after linux ones Nathan Chancellor
@ 2018-12-11 21:19 ` Guenter Roeck
0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2018-12-11 21:19 UTC (permalink / raw)
To: Nathan Chancellor; +Cc: Mauro Carvalho Chehab, linux-media, linux-kernel
On Mon, Dec 10, 2018 at 04:35:14PM -0700, Nathan Chancellor wrote:
> Without this, cpumask_t and bool are not defined:
>
> In file included from drivers/media/pci/ddbridge/ddbridge-ci.c:19:
> In file included from drivers/media/pci/ddbridge/ddbridge.h:22:
> ./arch/arm/include/asm/irq.h:35:50: error: unknown type name 'cpumask_t'
> extern void arch_trigger_cpumask_backtrace(const cpumask_t *mask,
> ^
> ./arch/arm/include/asm/irq.h:36:9: error: unknown type name 'bool'
> bool exclude_self);
> ^
>
> Doing a survey of the kernel tree, this appears to be expected because
> '#include <asm/irq.h>' is always after the linux includes.
>
> This also fixes warnings of this variety (with Clang):
>
> In file included from drivers/media/pci/ddbridge/ddbridge-ci.c:19:
> In file included from drivers/media/pci/ddbridge/ddbridge.h:56:
> In file included from ./include/media/dvb_net.h:22:
> In file included from ./include/linux/netdevice.h:50:
> In file included from ./include/uapi/linux/neighbour.h:6:
> In file included from ./include/linux/netlink.h:9:
> In file included from ./include/net/scm.h:11:
> In file included from ./include/linux/sched/signal.h:6:
> ./include/linux/signal.h:87:11: warning: array index 3 is past the end
> of the array (which contains 2 elements) [-Warray-bounds]
> return (set->sig[3] | set->sig[2] |
> ^ ~
> ./arch/arm/include/asm/signal.h:17:2: note: array 'sig' declared here
> unsigned long sig[_NSIG_WORDS];
> ^
>
> Fixes: b6973637c4cc ("media: ddbridge: remove another duplicate of io.h and sort includes")
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Tested-by: Guenter Roeck <linux@roeck-us.net>
> ---
> drivers/media/pci/ddbridge/ddbridge.h | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/media/pci/ddbridge/ddbridge.h b/drivers/media/pci/ddbridge/ddbridge.h
> index 0be6ed216e65..b834449e78f8 100644
> --- a/drivers/media/pci/ddbridge/ddbridge.h
> +++ b/drivers/media/pci/ddbridge/ddbridge.h
> @@ -18,9 +18,6 @@
> #ifndef _DDBRIDGE_H_
> #define _DDBRIDGE_H_
>
> -#include <asm/dma.h>
> -#include <asm/irq.h>
> -
> #include <linux/clk.h>
> #include <linux/completion.h>
> #include <linux/delay.h>
> @@ -48,6 +45,9 @@
> #include <linux/vmalloc.h>
> #include <linux/workqueue.h>
>
> +#include <asm/dma.h>
> +#include <asm/irq.h>
> +
> #include <media/dmxdev.h>
> #include <media/dvb_ca_en50221.h>
> #include <media/dvb_demux.h>
> --
> 2.20.0
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-12-11 21:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-10 23:35 [PATCH] media: ddbridge: Move asm includes after linux ones Nathan Chancellor
2018-12-11 21:19 ` Guenter Roeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).