mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 05:27:44 +00:00
afs: Add includes to pick up function prototypes
The functions defined in LINUX/osi_crypto.c, osi_pagecopy.c, osi_probe.c, and osi_syscall.c have function prototypes defined in existing header files, however either due to missing includes or preprocessor conditionals that skip the includes, these function prototypes are not being pulled in. These functions are flagged due to missing prototypes when building against a Linux 6.8 kernel (which sets the -Wmissing-declarations and -Wmissing-prototypes compiler flags as default). Linux 6.8 commit: 'Makefile.extrawarn: turn on missing-prototypes globally' (0fcb70851f). When building against a kernel with CONFIG_WERROR=y, the build fails. Add the necessary includes to osi_crypto.c and osi_pagecopy.c and re-arrange the includes in osi_probe.c and osi_syscall.c to ensure that the function prototypes are present when building the Linux kernel module. Reviewed-on: https://gerrit.openafs.org/15641 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> (cherry picked from commit 3683f15278e34e13d7272928eaf666f0acc4e1e9) Change-Id: Iac704fc98d0d685358224049f383d68aa7a105f8 Reviewed-on: https://gerrit.openafs.org/15694 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: Michael Meffie <mmeffie@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
This commit is contained in:
parent
25e17fe719
commit
8b516820ab
@ -25,6 +25,9 @@
|
||||
#include <afsconfig.h>
|
||||
#include "afs/param.h"
|
||||
|
||||
#include "afs/sysincludes.h"
|
||||
#include "afsincludes.h"
|
||||
|
||||
#include <linux/random.h>
|
||||
|
||||
int
|
||||
|
@ -61,6 +61,7 @@
|
||||
#include <linux/wait.h>
|
||||
#include <linux/workqueue.h>
|
||||
#include <linux/slab.h>
|
||||
#include "osi_pagecopy.h"
|
||||
|
||||
static DECLARE_WAIT_QUEUE_HEAD (afs_pagecopy_wq);
|
||||
static spinlock_t afs_pagecopy_lock;
|
||||
|
@ -48,9 +48,13 @@
|
||||
#ifdef OSI_PROBE_STANDALONE
|
||||
# define OSI_PROBE_DEBUG
|
||||
#endif
|
||||
|
||||
#ifndef OSI_PROBE_STANDALONE
|
||||
# include <afsconfig.h>
|
||||
# include "afs/param.h"
|
||||
|
||||
# include "afs/sysincludes.h"
|
||||
# include "afsincludes.h"
|
||||
#endif
|
||||
|
||||
#include <linux/version.h>
|
||||
@ -61,10 +65,6 @@
|
||||
/* Slightly kludgy, but too bad */
|
||||
#define scsi_command_size scsi_command_size_tbl
|
||||
#endif
|
||||
#ifndef OSI_PROBE_STANDALONE
|
||||
# include "afs/sysincludes.h"
|
||||
# include "afsincludes.h"
|
||||
#endif
|
||||
#include <linux/sched.h>
|
||||
#ifdef HAVE_LINUX_CONFIG_H
|
||||
# include <linux/config.h>
|
||||
|
@ -14,6 +14,10 @@
|
||||
#include <afsconfig.h>
|
||||
#include "afs/param.h"
|
||||
|
||||
#include <linux/module.h> /* early to avoid printf->printk mapping */
|
||||
#include "afs/sysincludes.h"
|
||||
#include "afsincludes.h"
|
||||
|
||||
#ifdef LINUX_KEYRING_SUPPORT
|
||||
/* The syscall probing stuff is unnecessary (and is never called) if we have
|
||||
* keyrings support; we rely on keyrings instead of group ids to track PAGs.
|
||||
@ -31,9 +35,6 @@ osi_syscall_clean(void)
|
||||
|
||||
#else /* LINUX_KEYRING_SUPPORT */
|
||||
|
||||
#include <linux/module.h> /* early to avoid printf->printk mapping */
|
||||
#include "afs/sysincludes.h"
|
||||
#include "afsincludes.h"
|
||||
#include <linux/unistd.h> /* For syscall numbers. */
|
||||
#include <linux/mm.h>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user