From 93669f535752e759b820a21883a6a8c6fba4e73e Mon Sep 17 00:00:00 2001 From: Cheyenne Wills Date: Mon, 12 Feb 2024 09:43:29 -0700 Subject: [PATCH 19/29] 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 Tested-by: Benjamin Kaduk Reviewed-by: Benjamin Kaduk (cherry picked from commit fae4003b403420d0b548920c7837a2d2b6e432ae) Change-Id: I7d435455fc60cc10200ee91d0d76534367ab5883 --- src/afs/afs_callback.c | 2 ++ src/afs/afs_prototypes.h | 37 ------------------------------------- 2 files changed, 2 insertions(+), 37 deletions(-) diff --git a/src/afs/afs_callback.c b/src/afs/afs_callback.c index 56e8cd2cc..1fe990edf 100644 --- a/src/afs/afs_callback.c +++ b/src/afs/afs_callback.c @@ -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" diff --git a/src/afs/afs_prototypes.h b/src/afs/afs_prototypes.h index d7894dd67..b9811f892 100644 --- a/src/afs/afs_prototypes.h +++ b/src/afs/afs_prototypes.h @@ -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; -- 2.44.0