These declarations are never implemented since the beginning of git history.
Remove these, then merge the two #ifdef block for simplification.
Signed-off-by: Yue Haibing <[email protected]>
---
include/linux/sunrpc/stats.h | 23 +++++++----------------
1 file changed, 7 insertions(+), 16 deletions(-)
diff --git a/include/linux/sunrpc/stats.h b/include/linux/sunrpc/stats.h
index d94d4f410507..3ce1550d1beb 100644
--- a/include/linux/sunrpc/stats.h
+++ b/include/linux/sunrpc/stats.h
@@ -43,22 +43,6 @@ struct net;
#ifdef CONFIG_PROC_FS
int rpc_proc_init(struct net *);
void rpc_proc_exit(struct net *);
-#else
-static inline int rpc_proc_init(struct net *net)
-{
- return 0;
-}
-
-static inline void rpc_proc_exit(struct net *net)
-{
-}
-#endif
-
-#ifdef MODULE
-void rpc_modcount(struct inode *, int);
-#endif
-
-#ifdef CONFIG_PROC_FS
struct proc_dir_entry * rpc_proc_register(struct net *,struct rpc_stat *);
void rpc_proc_unregister(struct net *,const char *);
void rpc_proc_zero(const struct rpc_program *);
@@ -69,7 +53,14 @@ void svc_proc_unregister(struct net *, const char *);
void svc_seq_show(struct seq_file *,
const struct svc_stat *);
#else
+static inline int rpc_proc_init(struct net *net)
+{
+ return 0;
+}
+static inline void rpc_proc_exit(struct net *net)
+{
+}
static inline struct proc_dir_entry *rpc_proc_register(struct net *net, struct rpc_stat *s) { return NULL; }
static inline void rpc_proc_unregister(struct net *net, const char *p) {}
static inline void rpc_proc_zero(const struct rpc_program *p) {}
--
2.34.1
On Thu, 10 Aug 2023, Yue Haibing wrote:
> These declarations are never implemented since the beginning of git history.
> Remove these, then merge the two #ifdef block for simplification.
For the historically minded, this was added in 2.1.79
https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/diff/net/sunrpc/stats.c?id=ae04feb38f319f0d389ea9e41d10986dba22b46d
and removed in 2.3.27.
https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/diff/net/sunrpc/stats.c?id=53022f15f8c0381a9b55bbe2893a5f9f6abda6f3
Reviewed-by: NeilBrown <[email protected]>
Thanks,
NeilBRown
>
> Signed-off-by: Yue Haibing <[email protected]>
> ---
> include/linux/sunrpc/stats.h | 23 +++++++----------------
> 1 file changed, 7 insertions(+), 16 deletions(-)
>
> diff --git a/include/linux/sunrpc/stats.h b/include/linux/sunrpc/stats.h
> index d94d4f410507..3ce1550d1beb 100644
> --- a/include/linux/sunrpc/stats.h
> +++ b/include/linux/sunrpc/stats.h
> @@ -43,22 +43,6 @@ struct net;
> #ifdef CONFIG_PROC_FS
> int rpc_proc_init(struct net *);
> void rpc_proc_exit(struct net *);
> -#else
> -static inline int rpc_proc_init(struct net *net)
> -{
> - return 0;
> -}
> -
> -static inline void rpc_proc_exit(struct net *net)
> -{
> -}
> -#endif
> -
> -#ifdef MODULE
> -void rpc_modcount(struct inode *, int);
> -#endif
> -
> -#ifdef CONFIG_PROC_FS
> struct proc_dir_entry * rpc_proc_register(struct net *,struct rpc_stat *);
> void rpc_proc_unregister(struct net *,const char *);
> void rpc_proc_zero(const struct rpc_program *);
> @@ -69,7 +53,14 @@ void svc_proc_unregister(struct net *, const char *);
> void svc_seq_show(struct seq_file *,
> const struct svc_stat *);
> #else
> +static inline int rpc_proc_init(struct net *net)
> +{
> + return 0;
> +}
>
> +static inline void rpc_proc_exit(struct net *net)
> +{
> +}
> static inline struct proc_dir_entry *rpc_proc_register(struct net *net, struct rpc_stat *s) { return NULL; }
> static inline void rpc_proc_unregister(struct net *net, const char *p) {}
> static inline void rpc_proc_zero(const struct rpc_program *p) {}
> --
> 2.34.1
>
>
On Wed, Aug 23, 2023 at 4:55 PM Chuck Lever <[email protected]> wrote:
>
> On Thu, Aug 10, 2023 at 07:36:44AM +1000, NeilBrown wrote:
> > On Thu, 10 Aug 2023, Yue Haibing wrote:
> > > These declarations are never implemented since the beginning of git history.
> > > Remove these, then merge the two #ifdef block for simplification.
> >
> > For the historically minded, this was added in 2.1.79
> > https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/diff/net/sunrpc/stats.c?id=ae04feb38f319f0d389ea9e41d10986dba22b46d
> >
> > and removed in 2.3.27.
> > https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/diff/net/sunrpc/stats.c?id=53022f15f8c0381a9b55bbe2893a5f9f6abda6f3
> >
> > Reviewed-by: NeilBrown <[email protected]>
>
> Thanks, Neil. It isn't yet clear to me which tree this should go
> through: nfsd or NFS client. I can take it just to get things
> moving...
>
I'm fine with you taking this patch!
Anna
>
> > Thanks,
> > NeilBrown
> >
> > >
> > > Signed-off-by: Yue Haibing <[email protected]>
> > > ---
> > > include/linux/sunrpc/stats.h | 23 +++++++----------------
> > > 1 file changed, 7 insertions(+), 16 deletions(-)
> > >
> > > diff --git a/include/linux/sunrpc/stats.h b/include/linux/sunrpc/stats.h
> > > index d94d4f410507..3ce1550d1beb 100644
> > > --- a/include/linux/sunrpc/stats.h
> > > +++ b/include/linux/sunrpc/stats.h
> > > @@ -43,22 +43,6 @@ struct net;
> > > #ifdef CONFIG_PROC_FS
> > > int rpc_proc_init(struct net *);
> > > void rpc_proc_exit(struct net *);
> > > -#else
> > > -static inline int rpc_proc_init(struct net *net)
> > > -{
> > > - return 0;
> > > -}
> > > -
> > > -static inline void rpc_proc_exit(struct net *net)
> > > -{
> > > -}
> > > -#endif
> > > -
> > > -#ifdef MODULE
> > > -void rpc_modcount(struct inode *, int);
> > > -#endif
> > > -
> > > -#ifdef CONFIG_PROC_FS
> > > struct proc_dir_entry * rpc_proc_register(struct net *,struct rpc_stat *);
> > > void rpc_proc_unregister(struct net *,const char *);
> > > void rpc_proc_zero(const struct rpc_program *);
> > > @@ -69,7 +53,14 @@ void svc_proc_unregister(struct net *, const char *);
> > > void svc_seq_show(struct seq_file *,
> > > const struct svc_stat *);
> > > #else
> > > +static inline int rpc_proc_init(struct net *net)
> > > +{
> > > + return 0;
> > > +}
> > >
> > > +static inline void rpc_proc_exit(struct net *net)
> > > +{
> > > +}
> > > static inline struct proc_dir_entry *rpc_proc_register(struct net *net, struct rpc_stat *s) { return NULL; }
> > > static inline void rpc_proc_unregister(struct net *net, const char *p) {}
> > > static inline void rpc_proc_zero(const struct rpc_program *p) {}
> > > --
> > > 2.34.1
> > >
> > >
> >
>
> --
> Chuck Lever