Skip to contentSkip to conversation

pstore: Fix annotation on declaration of pstore_exit_fs

PATCH In review Nathan Chancellor 2 participants 2 messages Oct 19, 2018 Pstore filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pstore: Fix annotation on declaration of pstore_exit_fs

Clang warns (trimmed for brevity):

fs/pstore/inode.c:504:6: error: section does not match previous declaration [-Werror,-Wsection]
void __exit pstore_exit_fs(void)

     ^
fs/pstore/internal.h:42:6: note: previous attribute is here
void __init     pstore_exit_fs(void);
     ^
Fixes a4fb3d2fefd2 ("pstore: Centralize init/exit routines")
---
 fs/pstore/internal.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/pstore/internal.h +1 -1
index 98bb4fa6e6a7..7062ea4bc57c 100644
@@ -39,6 +39,6 @@ extern void	pstore_record_init(struct pstore_record *record,
 
 /* Called during pstore init/exit. */
 int __init	pstore_init_fs(void);
-void __init	pstore_exit_fs(void);
+void __exit	pstore_exit_fs(void);
 
 #endif
Signature · 1 line
2.19.1
#1 lore raw
Quoted 21 lines · Nathan Chancellor

Clang warns (trimmed for brevity):

fs/pstore/inode.c:504:6: error: section does not match previous declaration [-Werror,-Wsection]
void __exit pstore_exit_fs(void)

     ^
fs/pstore/internal.h:42:6: note: previous attribute is here
void __init     pstore_exit_fs(void);
     ^
Fixes a4fb3d2fefd2 ("pstore: Centralize init/exit routines")
---
 fs/pstore/internal.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/pstore/internal.h +0 -0
index 98bb4fa6e6a7..7062ea4bc57c 100644

fs/pstore/internal.h extern void pstore_record_init(struct pstore_record *record, · line 42

Quoted 5 lines
fs/pstore/internal.h +1 -1
@@ -39,6 +39,6 @@ extern void   pstore_record_init(struct pstore_record *record,
 
 /* Called during pstore init/exit. */
 int __init     pstore_init_fs(void);
-void __init    pstore_exit_fs(void);
+void __exit    pstore_exit_fs(void);

Whoops! Thanks, I'll fold this fix into the patch.

-Kees

Quoted 5 lines
fs/pstore/internal.h +0 -1
 #endif
--

2.19.1

Signature · 2 lines
Kees Cook
Pixel Security