afs: Remove SRXAFSCB* protos from afs_prototypes.h

The prototypes for the afscbint RPC functions (SRXAFSCB_*) implemented
in afs_callback.c are defined in 2 locations, afs_protypes.h and
afscbint.h (which is generated by rxgen).

Remove the protoypes for the SRXAFSCB_* functions from afs_prototypes.h
as they are redundant and are currently out of sync (the prototypes
for SRXAFSCB_GetCellByNum() and SRXAFSCB_TellMeAboutYourself() are
not present in afs_prototypes.h).  Also remove a redundant prototype for
afs_RXCallBackServer() which was prototyped both before and in the
middle of the SRXAFSCB* prototypes.

Since afs_callback.c only pulled in afs_prototypes.h and not afscbint.h,
add an include for afscbint.h to ensure that the all the prototypes for
the SRXAFSCB_* functions are present.

The 2 functions listed above 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.

Reviewed-on: https://gerrit.openafs.org/15644
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit fae4003b403420d0b548920c7837a2d2b6e432ae)

Change-Id: I7d435455fc60cc10200ee91d0d76534367ab5883
Reviewed-on: https://gerrit.openafs.org/15697
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:
Cheyenne Wills 2024-02-12 09:43:29 -07:00 committed by Benjamin Kaduk
parent 96932160fa
commit 53752b01bc
2 changed files with 2 additions and 37 deletions

View File

@ -19,6 +19,8 @@
#include "afs/sysincludes.h" /*Standard vendor system headers */
#include "afsincludes.h" /*AFS-based standard headers */
#define FSINT_COMMON_XG
#include "afs/afscbint.h"
#include "afs/afs_stats.h" /*Cache Manager stats */
#include "afs/opr.h"
#include "afs/afs_args.h"

View File

@ -64,45 +64,8 @@ extern unsigned int lastCallBack_dv;
extern osi_timeval32_t lastCallBack_time;
extern struct interfaceAddr afs_cb_interface;
extern int afs_RXCallBackServer(void);
extern int SRXAFSCB_GetCE(struct rx_call *a_call, afs_int32 a_index,
struct AFSDBCacheEntry *a_result);
extern int SRXAFSCB_GetCE64(struct rx_call *a_call, afs_int32 a_index,
struct AFSDBCacheEntry64 *a_result);
extern int SRXAFSCB_GetLock(struct rx_call *a_call, afs_int32 a_index,
struct AFSDBLock *a_result);
extern int SRXAFSCB_CallBack(struct rx_call *a_call,
struct AFSCBFids *a_fids,
struct AFSCBs *a_callbacks);
extern int SRXAFSCB_Probe(struct rx_call *a_call);
extern int SRXAFSCB_InitCallBackState(struct rx_call *a_call);
extern int SRXAFSCB_XStatsVersion(struct rx_call *a_call,
afs_int32 * a_versionP);
extern int SRXAFSCB_GetXStats(struct rx_call *a_call,
afs_int32 a_clientVersionNum,
afs_int32 a_collectionNumber,
afs_int32 * a_srvVersionNumP,
afs_int32 * a_timeP, AFSCB_CollData * a_dataP);
extern int afs_RXCallBackServer(void);
extern int shutdown_CB(void);
extern int SRXAFSCB_InitCallBackState2(struct rx_call *a_call,
struct interfaceAddr *addr);
extern int SRXAFSCB_WhoAreYou(struct rx_call *a_call,
struct interfaceAddr *addr);
extern int SRXAFSCB_InitCallBackState3(struct rx_call *a_call,
afsUUID * a_uuid);
extern int SRXAFSCB_ProbeUuid(struct rx_call *a_call, afsUUID * a_uuid);
extern int SRXAFSCB_GetServerPrefs(struct rx_call *a_call, afs_int32 a_index,
afs_int32 * a_srvr_addr,
afs_int32 * a_srvr_rank);
extern int SRXAFSCB_GetCellServDB(struct rx_call *a_call, afs_int32 a_index,
char **a_name, serverList * a_hosts);
extern int SRXAFSCB_GetLocalCell(struct rx_call *a_call, char **a_name);
extern int SRXAFSCB_GetCacheConfig(struct rx_call *a_call,
afs_uint32 callerVersion,
afs_uint32 * serverVersion,
afs_uint32 * configCount,
cacheConfig * config);
/* afs_cbqueue.c */
extern afs_rwlock_t afs_xcbhash;