afs: Declare init_hckernel_mutex()

The function init_hckernel_mutex() (in rand.c) is flagged due to a
missing prototype 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 a function prototype for init_hckernel_mutex() to afs_osi.h and
remove the prototype from afs_osi.c

There are no functional changes with this commit.

Reviewed-on: https://gerrit.openafs.org/15622
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit ccc2af429710104793fb4659b10697cceab182b3)

Change-Id: Ic5eb4584a980657a01a1cb4411c0c1f03b1f3560
Reviewed-on: https://gerrit.openafs.org/15693
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-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:
Cheyenne Wills 2024-02-08 11:50:16 -07:00 committed by Benjamin Kaduk
parent b1c93f1387
commit 25e17fe719
2 changed files with 5 additions and 5 deletions

View File

@ -25,11 +25,6 @@
* -- On HP called from afsc_link.
* -- On SGI called from afs_init. */
/* No hckernel-specific header for this prototype. */
#ifndef UKERNEL
extern void init_hckernel_mutex(void);
#endif
afs_lock_t afs_ftf; /* flush text lock */
#ifdef AFS_SGI_ENV

View File

@ -458,4 +458,9 @@ extern int osi_ShouldDeferRemunlink(struct vcache *avc);
# define osi_ShouldDeferRemunlink(avc) 0
#endif
/* No hckernel-specific header for this prototype. */
#ifndef UKERNEL
extern void init_hckernel_mutex(void);
#endif
#endif /* _AFS_OSI_ */