Add necessary #includes to asm-powerpc/spu.h
PATCH 1/1 Add necessary #includes to asm-powerpc/spu.h
Subject: Add necessary #includes to asm-powerpc/spu.h.
From: Maynard Johnson <[email protected]>
This patch adds a couple of #includes to asm-powerpc/spu.h to prevent compilation warnings that can occur when spu.h is included from a source file where fs.h and notifier.h have not been included already.
Signed-off-by Maynard Johnson <[email protected]>
include/asm-powerpc/spu.h +2 -0
@@ -24,6 +24,8 @@#define _SPU_H#ifdef __KERNEL__ +#include <linux/fs.h> +#include <linux/notifier.h> #include <linux/workqueue.h> #include <linux/sysdev.h>
Review
Quoted 8 lines · Maynard Johnson
#define
_SPU_H
#ifdef__KERNEL__(quoted diff) +2
-0+#include <linux/fs.h> +#include <linux/notifier.h> #include <linux/workqueue.h> #include <linux/sysdev.h>
Thanks for pointing this out. I'm fixing this in a different way though, with by adding forward-declarations of the structures to spu.h in order to avoid making the include hierarchy worse. I'll submit that in a clean patch along with my next batch of fixes.
Arnd <><
include/asm-powerpc/spu.h +2 -0
@@ -161,6 +161,7 @@ struct spu_syscall_block {extern long spu_sys_callback (struct spu_syscall_block *s);/* syscalls implemented in spufs */ +struct file ; extern struct spufs_calls { asmlinkage long (*create_thread)(const char __user *name, unsigned int flags, mode_t mode);
@@ -232,6 +233,7 @@ void spu_remove_sysdev_attr_group(struct* to object-id spufs file from user space and the notifer * function can assume that spu->ctx is valid. */ +struct notifier_block ;int spu_switch_event_register (struct notifier_block * n);int spu_switch_event_unregister (struct notifier_block * n);