* [git-pull -tip] fix headers_check warnings
@ 2009-02-02 16:56 Jaswinder Singh Rajput
2009-02-02 17:21 ` Cyrill Gorcunov
2009-02-02 17:49 ` Arnd Bergmann
0 siblings, 2 replies; 8+ messages in thread
From: Jaswinder Singh Rajput @ 2009-02-02 16:56 UTC (permalink / raw)
To: Ingo Molnar, x86 maintainers, Andrew Morton, Sam Ravnborg,
David Miller, LKML, reiserfs-devel
Ingo,
The following changes since commit 1ff8f739c7cc4eaa89b6ba986494f458ff7bdbef:
Jaswinder Singh Rajput (1):
headers_check fix: xtensa, swab.h
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6-tipclean.git core/header-fixes
Jaswinder Singh Rajput (7):
headers_check fix: linux/coda_psdev.h
headers_check fix: linux/in6.h
headers_check fix: linux/nubus.h
headers_check fix: linux/socket.h
headers_check fix: linux/reinserfs_fs.h
headers_check fix: x86, prctl.h
headers_check fix: x86, setup.h
arch/x86/include/asm/prctl.h | 6 +++-
arch/x86/include/asm/setup.h | 45 ++++++++++++++++++++---------------------
include/linux/coda_psdev.h | 15 ++++++-------
include/linux/in6.h | 2 +-
include/linux/nubus.h | 2 +
include/linux/reiserfs_fs.h | 8 +++++++
include/linux/socket.h | 6 +++-
7 files changed, 48 insertions(+), 36 deletions(-)
This patcset fixes 31 headers_check warnings:
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/linux/coda_psdev.h:90: extern's make no sense in userspace
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/linux/in6.h:47: extern's make no sense in userspace
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/linux/in6.h:49: extern's make no sense in userspace
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/linux/nubus.h:296: extern's make no sense in userspace
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/linux/nubus.h:298: extern's make no sense in userspace
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/linux/nubus.h:302: extern's make no sense in userspace
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/linux/socket.h:29: extern's make no sense in userspace
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/linux/reiserfs_fs.h:687: extern's make no sense in userspace
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/linux/reiserfs_fs.h:995: extern's make no sense in userspace
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/linux/reiserfs_fs.h:997: extern's make no sense in userspace
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/linux/reiserfs_fs.h:1467: extern's make no sense in userspace
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/linux/reiserfs_fs.h:1760: extern's make no sense in userspace
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/linux/reiserfs_fs.h:1764: extern's make no sense in userspace
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/linux/reiserfs_fs.h:1766: extern's make no sense in userspace
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/linux/reiserfs_fs.h:1769: extern's make no sense in userspace
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/linux/reiserfs_fs.h:1771: extern's make no sense in userspace
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/linux/reiserfs_fs.h:1805: extern's make no sense in userspace
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/linux/reiserfs_fs.h:1948: extern's make no sense in userspace
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/linux/reiserfs_fs.h:1949: extern's make no sense in userspace
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/linux/reiserfs_fs.h:1950: extern's make no sense in userspace
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/linux/reiserfs_fs.h:1951: extern's make no sense in userspace
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/linux/reiserfs_fs.h:1962: extern's make no sense in userspace
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/linux/reiserfs_fs.h:1963: extern's make no sense in userspace
/home/jaswinder/jaswinder-git/linux-2.6/usr/include/linux/reiserfs_fs.h:1964: extern's make no sense in userspace
/home/jaswinder/jaswinder-git/linux-2.6-tip/usr/include/asm/prctl.h:10: extern's make no sense in userspace
/home/jaswinder/jaswinder-git/linux-2.6-tip/usr/include/asm/setup.h:16: extern's make no sense in userspace
/home/jaswinder/jaswinder-git/linux-2.6-tip/usr/include/asm/setup.h:17: extern's make no sense in userspace
/home/jaswinder/jaswinder-git/linux-2.6-tip/usr/include/asm/setup.h:23: extern's make no sense in userspace
/home/jaswinder/jaswinder-git/linux-2.6-tip/usr/include/asm/setup.h:24: extern's make no sense in userspace
/home/jaswinder/jaswinder-git/linux-2.6-tip/usr/include/asm/setup.h:51: extern's make no sense in userspace
/home/jaswinder/jaswinder-git/linux-2.6-tip/usr/include/asm/setup.h:52: extern's make no sense in userspace
Complete diff:
diff --git a/arch/x86/include/asm/prctl.h b/arch/x86/include/asm/prctl.h
index a889464..fdbeb85 100644
--- a/arch/x86/include/asm/prctl.h
+++ b/arch/x86/include/asm/prctl.h
@@ -6,8 +6,10 @@
#define ARCH_GET_FS 0x1003
#define ARCH_GET_GS 0x1004
-#ifdef CONFIG_X86_64
+#ifdef __KERNEL__
+# ifdef CONFIG_X86_64
extern long sys_arch_prctl(int, unsigned long);
-#endif /* CONFIG_X86_64 */
+# endif /* CONFIG_X86_64 */
+#endif /* __KERNEL__ */
#endif /* _ASM_X86_PRCTL_H */
diff --git a/arch/x86/include/asm/setup.h b/arch/x86/include/asm/setup.h
index ebe858c..5a3a137 100644
--- a/arch/x86/include/asm/setup.h
+++ b/arch/x86/include/asm/setup.h
@@ -5,23 +5,6 @@
#ifndef __ASSEMBLY__
-/* Interrupt control for vSMPowered x86_64 systems */
-void vsmp_init(void);
-
-
-void setup_bios_corruption_check(void);
-
-
-#ifdef CONFIG_X86_VISWS
-extern void visws_early_detect(void);
-extern int is_visws_box(void);
-#else
-static inline void visws_early_detect(void) { }
-static inline int is_visws_box(void) { return 0; }
-#endif
-
-extern int wakeup_secondary_cpu_via_nmi(int apicid, unsigned long start_eip);
-extern int wakeup_secondary_cpu_via_init(int apicid, unsigned long start_eip);
/*
* Any setup quirks to be performed?
*/
@@ -48,12 +31,6 @@ struct x86_quirks {
int (*update_genapic)(void);
};
-extern struct x86_quirks *x86_quirks;
-extern unsigned long saved_video_mode;
-
-#ifndef CONFIG_PARAVIRT
-#define paravirt_post_allocator_init() do {} while (0)
-#endif
#endif /* __ASSEMBLY__ */
#ifdef __KERNEL__
@@ -78,6 +55,28 @@ extern unsigned long saved_video_mode;
#ifndef __ASSEMBLY__
#include <asm/bootparam.h>
+/* Interrupt control for vSMPowered x86_64 systems */
+void vsmp_init(void);
+
+void setup_bios_corruption_check(void);
+
+#ifdef CONFIG_X86_VISWS
+extern void visws_early_detect(void);
+extern int is_visws_box(void);
+#else
+static inline void visws_early_detect(void) { }
+static inline int is_visws_box(void) { return 0; }
+#endif
+
+extern int wakeup_secondary_cpu_via_nmi(int apicid, unsigned long start_eip);
+extern int wakeup_secondary_cpu_via_init(int apicid, unsigned long start_eip);
+extern struct x86_quirks *x86_quirks;
+extern unsigned long saved_video_mode;
+
+#ifndef CONFIG_PARAVIRT
+#define paravirt_post_allocator_init() do {} while (0)
+#endif
+
#ifndef _SETUP
/*
diff --git a/include/linux/coda_psdev.h b/include/linux/coda_psdev.h
index 07ae8f8..6f06352 100644
--- a/include/linux/coda_psdev.h
+++ b/include/linux/coda_psdev.h
@@ -24,7 +24,7 @@ static inline struct venus_comm *coda_vcp(struct super_block *sb)
return (struct venus_comm *)((sb)->s_fs_info);
}
-
+#ifdef __KERNEL__
/* upcalls */
int venus_rootfid(struct super_block *sb, struct CodaFid *fidp);
int venus_getattr(struct super_block *sb, struct CodaFid *fid,
@@ -64,6 +64,12 @@ int coda_downcall(int opcode, union outputArgs *out, struct super_block *sb);
int venus_fsync(struct super_block *sb, struct CodaFid *fid);
int venus_statfs(struct dentry *dentry, struct kstatfs *sfs);
+/*
+ * Statistics
+ */
+
+extern struct venus_comm coda_comms[];
+#endif /* __KERNEL__ */
/* messages between coda filesystem in kernel and Venus */
struct upc_req {
@@ -82,11 +88,4 @@ struct upc_req {
#define REQ_WRITE 0x4
#define REQ_ABORT 0x8
-
-/*
- * Statistics
- */
-
-extern struct venus_comm coda_comms[];
-
#endif
diff --git a/include/linux/in6.h b/include/linux/in6.h
index bc49204..718bf21 100644
--- a/include/linux/in6.h
+++ b/include/linux/in6.h
@@ -44,11 +44,11 @@ struct in6_addr
* NOTE: Be aware the IN6ADDR_* constants and in6addr_* externals are defined
* in network byte order, not in host byte order as are the IPv4 equivalents
*/
+#ifdef __KERNEL__
extern const struct in6_addr in6addr_any;
#define IN6ADDR_ANY_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } }
extern const struct in6_addr in6addr_loopback;
#define IN6ADDR_LOOPBACK_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } }
-#ifdef __KERNEL__
extern const struct in6_addr in6addr_linklocal_allnodes;
#define IN6ADDR_LINKLOCAL_ALLNODES_INIT \
{ { { 0xff,2,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } }
diff --git a/include/linux/nubus.h b/include/linux/nubus.h
index 7382af3..9be57d9 100644
--- a/include/linux/nubus.h
+++ b/include/linux/nubus.h
@@ -296,6 +296,7 @@ struct nubus_dev {
struct nubus_board* board;
};
+#ifdef __KERNEL__
/* This is all NuBus devices (used to find devices later on) */
extern struct nubus_dev* nubus_devices;
/* This is all NuBus cards */
@@ -351,6 +352,7 @@ void nubus_get_rsrc_mem(void* dest,
void nubus_get_rsrc_str(void* dest,
const struct nubus_dirent *dirent,
int maxlen);
+#endif /* __KERNEL__ */
/* We'd like to get rid of this eventually. Only daynaport.c uses it now. */
static inline void *nubus_slot_addr(int slot)
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
index bc5114d..a4db55f 100644
--- a/include/linux/reiserfs_fs.h
+++ b/include/linux/reiserfs_fs.h
@@ -698,7 +698,9 @@ static inline void cpu_key_k_offset_dec(struct cpu_key *key)
/* object identifier for root dir */
#define REISERFS_ROOT_OBJECTID 2
#define REISERFS_ROOT_PARENT_OBJECTID 1
+#ifdef __KERNEL__
extern struct reiserfs_key root_key;
+#endif /* __KERNEL__ */
/*
* Picture represents a leaf of the S+tree
@@ -1006,10 +1008,12 @@ struct reiserfs_de_head {
#define de_visible(deh) test_bit_unaligned (DEH_Visible, &((deh)->deh_state))
#define de_hidden(deh) !test_bit_unaligned (DEH_Visible, &((deh)->deh_state))
+#ifdef __KERNEL__
extern void make_empty_dir_item_v1(char *body, __le32 dirid, __le32 objid,
__le32 par_dirid, __le32 par_objid);
extern void make_empty_dir_item(char *body, __le32 dirid, __le32 objid,
__le32 par_dirid, __le32 par_objid);
+#endif /* __KERNEL__ */
/* array of the entry headers */
/* get item body */
@@ -1478,7 +1482,9 @@ struct item_operations {
void (*print_vi) (struct virtual_item * vi);
};
+#ifdef __KERNEL__
extern struct item_operations *item_ops[TYPE_ANY + 1];
+#endif /* __KERNEL__ */
#define op_bytes_number(ih,bsize) item_ops[le_ih_k_type (ih)]->bytes_number (ih, bsize)
#define op_is_left_mergeable(key,bsize) item_ops[le_key_k_type (le_key_version (key), key)]->is_left_mergeable (key, bsize)
@@ -1679,6 +1685,7 @@ struct reiserfs_transaction_handle {
struct list_head t_list;
};
+#ifdef __KERNEL__
/* used to keep track of ordered and tail writes, attached to the buffer
* head through b_journal_head.
*/
@@ -2203,4 +2210,5 @@ int reiserfs_unpack(struct inode *inode, struct file *filp);
/* xattr stuff */
#define REISERFS_XATTR_DIR_SEM(s) (REISERFS_SB(s)->xattr_dir_sem)
+#endif /* __KERNEL__ */
#endif /* _LINUX_REISER_FS_H */
diff --git a/include/linux/socket.h b/include/linux/socket.h
index 20fc4bb..afc0190 100644
--- a/include/linux/socket.h
+++ b/include/linux/socket.h
@@ -24,10 +24,12 @@ struct __kernel_sockaddr_storage {
#include <linux/types.h> /* pid_t */
#include <linux/compiler.h> /* __user */
-#ifdef CONFIG_PROC_FS
+#ifdef __KERNEL__
+# ifdef CONFIG_PROC_FS
struct seq_file;
extern void socket_seq_show(struct seq_file *seq);
-#endif
+# endif
+#endif /* __KERNEL__ */
typedef unsigned short sa_family_t;
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [git-pull -tip] fix headers_check warnings
2009-02-02 16:56 [git-pull -tip] fix headers_check warnings Jaswinder Singh Rajput
@ 2009-02-02 17:21 ` Cyrill Gorcunov
2009-02-02 17:30 ` Jaswinder Singh Rajput
2009-02-02 17:49 ` Arnd Bergmann
1 sibling, 1 reply; 8+ messages in thread
From: Cyrill Gorcunov @ 2009-02-02 17:21 UTC (permalink / raw)
To: Jaswinder Singh Rajput
Cc: Ingo Molnar, x86 maintainers, Andrew Morton, Sam Ravnborg,
David Miller, LKML, reiserfs-devel, H. Peter Anvin
[Jaswinder Singh Rajput - Mon, Feb 02, 2009 at 10:26:05PM +0530]
| Ingo,
|
| The following changes since commit 1ff8f739c7cc4eaa89b6ba986494f458ff7bdbef:
| Jaswinder Singh Rajput (1):
| headers_check fix: xtensa, swab.h
|
| are available in the git repository at:
|
| git://git.kernel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6-tipclean.git core/header-fixes
|
| Jaswinder Singh Rajput (7):
| headers_check fix: linux/coda_psdev.h
| headers_check fix: linux/in6.h
| headers_check fix: linux/nubus.h
| headers_check fix: linux/socket.h
| headers_check fix: linux/reinserfs_fs.h
| headers_check fix: x86, prctl.h
| headers_check fix: x86, setup.h
|
| arch/x86/include/asm/prctl.h | 6 +++-
| arch/x86/include/asm/setup.h | 45 ++++++++++++++++++++---------------------
| include/linux/coda_psdev.h | 15 ++++++-------
| include/linux/in6.h | 2 +-
| include/linux/nubus.h | 2 +
| include/linux/reiserfs_fs.h | 8 +++++++
| include/linux/socket.h | 6 +++-
| 7 files changed, 48 insertions(+), 36 deletions(-)
|
...
|
| Complete diff:
| diff --git a/arch/x86/include/asm/prctl.h b/arch/x86/include/asm/prctl.h
| index a889464..fdbeb85 100644
| --- a/arch/x86/include/asm/prctl.h
| +++ b/arch/x86/include/asm/prctl.h
| @@ -6,8 +6,10 @@
| #define ARCH_GET_FS 0x1003
| #define ARCH_GET_GS 0x1004
|
| -#ifdef CONFIG_X86_64
| +#ifdef __KERNEL__
| +# ifdef CONFIG_X86_64
| extern long sys_arch_prctl(int, unsigned long);
| -#endif /* CONFIG_X86_64 */
| +# endif /* CONFIG_X86_64 */
| +#endif /* __KERNEL__ */
|
...
Hi Jaswinder,
it seems we have a clash here :) I thought this part
was just dropped out
http://lkml.org/lkml/2009/1/14/461
and Peter had been applying it on tip:x86/header-fixes
http://lkml.org/lkml/2009/1/14/549
but maybe it's just lost...
-- Cyrill --
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [git-pull -tip] fix headers_check warnings
2009-02-02 17:21 ` Cyrill Gorcunov
@ 2009-02-02 17:30 ` Jaswinder Singh Rajput
2009-02-02 17:49 ` H. Peter Anvin
0 siblings, 1 reply; 8+ messages in thread
From: Jaswinder Singh Rajput @ 2009-02-02 17:30 UTC (permalink / raw)
To: Cyrill Gorcunov
Cc: Ingo Molnar, x86 maintainers, Andrew Morton, Sam Ravnborg,
David Miller, LKML, reiserfs-devel, H. Peter Anvin
On Mon, 2009-02-02 at 20:21 +0300, Cyrill Gorcunov wrote:
> [Jaswinder Singh Rajput - Mon, Feb 02, 2009 at 10:26:05PM +0530]
> | Ingo,
> |
> | The following changes since commit 1ff8f739c7cc4eaa89b6ba986494f458ff7bdbef:
> | Jaswinder Singh Rajput (1):
> | headers_check fix: xtensa, swab.h
> |
> | are available in the git repository at:
> |
> | git://git.kernel.org/pub/scm/linux/kernel/git/jaswinder/linux-2.6-tipclean.git core/header-fixes
> |
> | Jaswinder Singh Rajput (7):
> | headers_check fix: linux/coda_psdev.h
> | headers_check fix: linux/in6.h
> | headers_check fix: linux/nubus.h
> | headers_check fix: linux/socket.h
> | headers_check fix: linux/reinserfs_fs.h
> | headers_check fix: x86, prctl.h
> | headers_check fix: x86, setup.h
> |
> | arch/x86/include/asm/prctl.h | 6 +++-
> | arch/x86/include/asm/setup.h | 45 ++++++++++++++++++++---------------------
> | include/linux/coda_psdev.h | 15 ++++++-------
> | include/linux/in6.h | 2 +-
> | include/linux/nubus.h | 2 +
> | include/linux/reiserfs_fs.h | 8 +++++++
> | include/linux/socket.h | 6 +++-
> | 7 files changed, 48 insertions(+), 36 deletions(-)
> |
> ...
> |
> | Complete diff:
> | diff --git a/arch/x86/include/asm/prctl.h b/arch/x86/include/asm/prctl.h
> | index a889464..fdbeb85 100644
> | --- a/arch/x86/include/asm/prctl.h
> | +++ b/arch/x86/include/asm/prctl.h
> | @@ -6,8 +6,10 @@
> | #define ARCH_GET_FS 0x1003
> | #define ARCH_GET_GS 0x1004
> |
> | -#ifdef CONFIG_X86_64
> | +#ifdef __KERNEL__
> | +# ifdef CONFIG_X86_64
> | extern long sys_arch_prctl(int, unsigned long);
> | -#endif /* CONFIG_X86_64 */
> | +# endif /* CONFIG_X86_64 */
> | +#endif /* __KERNEL__ */
> |
> ...
>
> Hi Jaswinder,
>
> it seems we have a clash here :) I thought this part
> was just dropped out
>
> http://lkml.org/lkml/2009/1/14/461
>
> and Peter had been applying it on tip:x86/header-fixes
>
> http://lkml.org/lkml/2009/1/14/549
>
> but maybe it's just lost...
No, you cannot remove sys_arch_prctl otherwise you will get sparse
warning like this:
CHECK arch/x86/kernel/process_64.c
arch/x86/kernel/process_64.c:833:6: warning: symbol 'sys_arch_prctl' was not declared. Should it be static?
--
JSR
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [git-pull -tip] fix headers_check warnings
2009-02-02 17:30 ` Jaswinder Singh Rajput
@ 2009-02-02 17:49 ` H. Peter Anvin
2009-02-02 17:53 ` Cyrill Gorcunov
2009-02-02 18:12 ` Jaswinder Singh Rajput
0 siblings, 2 replies; 8+ messages in thread
From: H. Peter Anvin @ 2009-02-02 17:49 UTC (permalink / raw)
To: Jaswinder Singh Rajput
Cc: Cyrill Gorcunov, Ingo Molnar, x86 maintainers, Andrew Morton,
Sam Ravnborg, David Miller, LKML, reiserfs-devel
Jaswinder Singh Rajput wrote:
>>
>> Hi Jaswinder,
>>
>> it seems we have a clash here :) I thought this part
>> was just dropped out
>>
>> http://lkml.org/lkml/2009/1/14/461
>>
>> and Peter had been applying it on tip:x86/header-fixes
>>
>> http://lkml.org/lkml/2009/1/14/549
>>
>> but maybe it's just lost...
>
> No, you cannot remove sys_arch_prctl otherwise you will get sparse
> warning like this:
>
> CHECK arch/x86/kernel/process_64.c
> arch/x86/kernel/process_64.c:833:6: warning: symbol 'sys_arch_prctl' was not declared. Should it be static?
>
Perhaps we can just move this prototype to <asm/syscalls.h>.
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [git-pull -tip] fix headers_check warnings
2009-02-02 17:49 ` H. Peter Anvin
@ 2009-02-02 17:53 ` Cyrill Gorcunov
2009-02-02 18:12 ` Jaswinder Singh Rajput
1 sibling, 0 replies; 8+ messages in thread
From: Cyrill Gorcunov @ 2009-02-02 17:53 UTC (permalink / raw)
To: H. Peter Anvin
Cc: Jaswinder Singh Rajput, Ingo Molnar, x86 maintainers,
Andrew Morton, Sam Ravnborg, David Miller, LKML, reiserfs-devel
[H. Peter Anvin - Mon, Feb 02, 2009 at 09:49:14AM -0800]
| Jaswinder Singh Rajput wrote:
| >>
| >> Hi Jaswinder,
| >>
| >> it seems we have a clash here :) I thought this part
| >> was just dropped out
| >>
| >> http://lkml.org/lkml/2009/1/14/461
| >>
| >> and Peter had been applying it on tip:x86/header-fixes
| >>
| >> http://lkml.org/lkml/2009/1/14/549
| >>
| >> but maybe it's just lost...
| >
| > No, you cannot remove sys_arch_prctl otherwise you will get sparse
| > warning like this:
| >
| > CHECK arch/x86/kernel/process_64.c
| > arch/x86/kernel/process_64.c:833:6: warning: symbol 'sys_arch_prctl' was not declared. Should it be static?
| >
|
| Perhaps we can just move this prototype to <asm/syscalls.h>.
|
| -hpa
|
| --
| H. Peter Anvin, Intel Open Source Technology Center
| I work for Intel. I don't speak on their behalf.
|
Hmm...
For internal use we refer to do_arch_prctl and
sys_arch_prctl supposed to be syscall wrapper.
Yes, Peter, you're right! It seems this call
was missed there.
-Cyrill-
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [git-pull -tip] fix headers_check warnings
2009-02-02 17:49 ` H. Peter Anvin
2009-02-02 17:53 ` Cyrill Gorcunov
@ 2009-02-02 18:12 ` Jaswinder Singh Rajput
1 sibling, 0 replies; 8+ messages in thread
From: Jaswinder Singh Rajput @ 2009-02-02 18:12 UTC (permalink / raw)
To: H. Peter Anvin
Cc: Cyrill Gorcunov, Ingo Molnar, x86 maintainers, Andrew Morton,
Sam Ravnborg, David Miller, LKML, reiserfs-devel
On Mon, 2009-02-02 at 09:49 -0800, H. Peter Anvin wrote:
> Jaswinder Singh Rajput wrote:
> >>
> >> Hi Jaswinder,
> >>
> >> it seems we have a clash here :) I thought this part
> >> was just dropped out
> >>
> >> http://lkml.org/lkml/2009/1/14/461
> >>
> >> and Peter had been applying it on tip:x86/header-fixes
> >>
> >> http://lkml.org/lkml/2009/1/14/549
> >>
> >> but maybe it's just lost...
> >
> > No, you cannot remove sys_arch_prctl otherwise you will get sparse
> > warning like this:
> >
> > CHECK arch/x86/kernel/process_64.c
> > arch/x86/kernel/process_64.c:833:6: warning: symbol 'sys_arch_prctl' was not declared. Should it be static?
> >
>
> Perhaps we can just move this prototype to <asm/syscalls.h>.
>
fixed and send git pull V2.
--
JSR
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [git-pull -tip] fix headers_check warnings
2009-02-02 16:56 [git-pull -tip] fix headers_check warnings Jaswinder Singh Rajput
2009-02-02 17:21 ` Cyrill Gorcunov
@ 2009-02-02 17:49 ` Arnd Bergmann
2009-02-03 14:37 ` Jaswinder Singh Rajput
1 sibling, 1 reply; 8+ messages in thread
From: Arnd Bergmann @ 2009-02-02 17:49 UTC (permalink / raw)
To: Jaswinder Singh Rajput
Cc: Ingo Molnar, x86 maintainers, Andrew Morton, Sam Ravnborg,
David Miller, LKML, reiserfs-devel
On Monday 02 February 2009, Jaswinder Singh Rajput wrote:
> @@ -6,8 +6,10 @@
> #define ARCH_GET_FS 0x1003
> #define ARCH_GET_GS 0x1004
>
> -#ifdef CONFIG_X86_64
> +#ifdef __KERNEL__
> +# ifdef CONFIG_X86_64
> extern long sys_arch_prctl(int, unsigned long);
> -#endif /* CONFIG_X86_64 */
> +# endif /* CONFIG_X86_64 */
> +#endif /* __KERNEL__ */
The prototype declares a system call and should consequently
be moved to arch/x86/include/syscalls.h, without the #ifdef.
Generally, prototypes do not need to be put into #ifdef.
> diff --git a/include/linux/coda_psdev.h b/include/linux/coda_psdev.h
> index 07ae8f8..6f06352 100644
> --- a/include/linux/coda_psdev.h
> +++ b/include/linux/coda_psdev.h
> @@ -24,7 +24,7 @@ static inline struct venus_comm *coda_vcp(struct super_block *sb)
> return (struct venus_comm *)((sb)->s_fs_info);
> }
>
> -
> +#ifdef __KERNEL__
> /* upcalls */
> int venus_rootfid(struct super_block *sb, struct CodaFid *fidp);
> int venus_getattr(struct super_block *sb, struct CodaFid *fid,
The definitions preceeding this also should not get exported: struct venus_comm
and coda_vcp use kernel internal types so they cannot be part of the public
interface. kstatfs is another internal type.
> --- a/include/linux/nubus.h
> +++ b/include/linux/nubus.h
> @@ -296,6 +296,7 @@ struct nubus_dev {
> struct nubus_board* board;
> };
>
> +#ifdef __KERNEL__
> /* This is all NuBus devices (used to find devices later on) */
> extern struct nubus_dev* nubus_devices;
> /* This is all NuBus cards */
struct nubus_board and struct nubus_dev are clearly kernel internal,
as they reference a proc_dir_ent.
> --- a/include/linux/reiserfs_fs.h
> +++ b/include/linux/reiserfs_fs.h
The reiserfs_fs.h file is still such a mess that I would think it's
impossible anyone actually used this from a program. Just try
gcc -xc -S -o /dev/null -I. -Wall --std=c99 linux/reiserfs_fs.h
from your usr/include directory!
It would be possible to use it to describe the on-disk data layout
to user space, but that is obviously done elsewhere already, so
I'd think the cleanest way would be to #ifdef __KERNEL__ everything
except for the REISERFS_IOC_ definitions (but not REISERFS_IOC32).
Even that can be argued is pointless because these ioctl numbers are
now generic across file systems.
>
> +#ifdef __KERNEL__
> /* used to keep track of ordered and tail writes, attached to the buffer
> * head through b_journal_head.
> */
> @@ -2203,4 +2210,5 @@ int reiserfs_unpack(struct inode *inode, struct file *filp);
> /* xattr stuff */
> #define REISERFS_XATTR_DIR_SEM(s) (REISERFS_SB(s)->xattr_dir_sem)
>
> +#endif /* __KERNEL__ */
> #endif /* _LINUX_REISER_FS_H */
Here you accidentally removed the ioctl definitions from reiserfs.h,
removing the only reason we were exporting it in the first place.
> diff --git a/include/linux/socket.h b/include/linux/socket.h
> index 20fc4bb..afc0190 100644
> --- a/include/linux/socket.h
> +++ b/include/linux/socket.h
> @@ -24,10 +24,12 @@ struct __kernel_sockaddr_storage {
> #include <linux/types.h> /* pid_t */
> #include <linux/compiler.h> /* __user */
>
> -#ifdef CONFIG_PROC_FS
> +#ifdef __KERNEL__
> +# ifdef CONFIG_PROC_FS
> struct seq_file;
> extern void socket_seq_show(struct seq_file *seq);
> -#endif
> +# endif
> +#endif /* __KERNEL__ */
>
You can drop the #ifdef CONFIG_PROC_FS here, the prototype does not hurt.
Arnd <><
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [git-pull -tip] fix headers_check warnings
2009-02-02 17:49 ` Arnd Bergmann
@ 2009-02-03 14:37 ` Jaswinder Singh Rajput
0 siblings, 0 replies; 8+ messages in thread
From: Jaswinder Singh Rajput @ 2009-02-03 14:37 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Ingo Molnar, x86 maintainers, Andrew Morton, Sam Ravnborg,
David Miller, LKML, reiserfs-devel
On Mon, 2009-02-02 at 18:49 +0100, Arnd Bergmann wrote:
> On Monday 02 February 2009, Jaswinder Singh Rajput wrote:
>
> > @@ -6,8 +6,10 @@
> > #define ARCH_GET_FS 0x1003
> > #define ARCH_GET_GS 0x1004
> >
> > -#ifdef CONFIG_X86_64
> > +#ifdef __KERNEL__
> > +# ifdef CONFIG_X86_64
> > extern long sys_arch_prctl(int, unsigned long);
> > -#endif /* CONFIG_X86_64 */
> > +# endif /* CONFIG_X86_64 */
> > +#endif /* __KERNEL__ */
>
> The prototype declares a system call and should consequently
> be moved to arch/x86/include/syscalls.h, without the #ifdef.
> Generally, prototypes do not need to be put into #ifdef.
>
This is already fixed as suggested by Peter.
> > diff --git a/include/linux/coda_psdev.h b/include/linux/coda_psdev.h
> > index 07ae8f8..6f06352 100644
> > --- a/include/linux/coda_psdev.h
> > +++ b/include/linux/coda_psdev.h
> > @@ -24,7 +24,7 @@ static inline struct venus_comm *coda_vcp(struct super_block *sb)
> > return (struct venus_comm *)((sb)->s_fs_info);
> > }
> >
> > -
> > +#ifdef __KERNEL__
> > /* upcalls */
> > int venus_rootfid(struct super_block *sb, struct CodaFid *fidp);
> > int venus_getattr(struct super_block *sb, struct CodaFid *fid,
>
> The definitions preceeding this also should not get exported: struct venus_comm
> and coda_vcp use kernel internal types so they cannot be part of the public
> interface. kstatfs is another internal type.
>
Fixed.
> > --- a/include/linux/nubus.h
> > +++ b/include/linux/nubus.h
> > @@ -296,6 +296,7 @@ struct nubus_dev {
> > struct nubus_board* board;
> > };
> >
> > +#ifdef __KERNEL__
> > /* This is all NuBus devices (used to find devices later on) */
> > extern struct nubus_dev* nubus_devices;
> > /* This is all NuBus cards */
>
> struct nubus_board and struct nubus_dev are clearly kernel internal,
> as they reference a proc_dir_ent.
>
> > --- a/include/linux/reiserfs_fs.h
> > +++ b/include/linux/reiserfs_fs.h
>
> The reiserfs_fs.h file is still such a mess that I would think it's
> impossible anyone actually used this from a program. Just try
> gcc -xc -S -o /dev/null -I. -Wall --std=c99 linux/reiserfs_fs.h
> from your usr/include directory!
>
> It would be possible to use it to describe the on-disk data layout
> to user space, but that is obviously done elsewhere already, so
> I'd think the cleanest way would be to #ifdef __KERNEL__ everything
> except for the REISERFS_IOC_ definitions (but not REISERFS_IOC32).
> Even that can be argued is pointless because these ioctl numbers are
> now generic across file systems.
>
Fixed.
> > diff --git a/include/linux/socket.h b/include/linux/socket.h
> > index 20fc4bb..afc0190 100644
> > --- a/include/linux/socket.h
> > +++ b/include/linux/socket.h
> > @@ -24,10 +24,12 @@ struct __kernel_sockaddr_storage {
> > #include <linux/types.h> /* pid_t */
> > #include <linux/compiler.h> /* __user */
> >
> > -#ifdef CONFIG_PROC_FS
> > +#ifdef __KERNEL__
> > +# ifdef CONFIG_PROC_FS
> > struct seq_file;
> > extern void socket_seq_show(struct seq_file *seq);
> > -#endif
> > +# endif
> > +#endif /* __KERNEL__ */
> >
>
> You can drop the #ifdef CONFIG_PROC_FS here, the prototype does not hurt.
Even using #ifdef CONFIG_PROC_FS will not hurt, I want to stay in safe
side ;-)
Thanks,
--
JSR
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2009-02-03 14:38 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-02 16:56 [git-pull -tip] fix headers_check warnings Jaswinder Singh Rajput
2009-02-02 17:21 ` Cyrill Gorcunov
2009-02-02 17:30 ` Jaswinder Singh Rajput
2009-02-02 17:49 ` H. Peter Anvin
2009-02-02 17:53 ` Cyrill Gorcunov
2009-02-02 18:12 ` Jaswinder Singh Rajput
2009-02-02 17:49 ` Arnd Bergmann
2009-02-03 14:37 ` Jaswinder Singh Rajput
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox