On 12/9/24 8:02 PM, linux@xxxxxxxxxxx wrote: > From: "Dr. David Alan Gilbert" <linux@xxxxxxxxxxx> > > xprt_iter_get_xprt() was added by > commit 80b14d5e61ca ("SUNRPC: Add a structure to track multiple > transports") but is unused. > > Remove it. > > Signed-off-by: Dr. David Alan Gilbert <linux@xxxxxxxxxxx> Acked-by: Anna Schumaker <anna.schumaker@xxxxxxxxxx> > --- > include/linux/sunrpc/xprtmultipath.h | 1 - > net/sunrpc/xprtmultipath.c | 17 ----------------- > 2 files changed, 18 deletions(-) > > diff --git a/include/linux/sunrpc/xprtmultipath.h b/include/linux/sunrpc/xprtmultipath.h > index c0514c684b2c..e411368cdacf 100644 > --- a/include/linux/sunrpc/xprtmultipath.h > +++ b/include/linux/sunrpc/xprtmultipath.h > @@ -75,7 +75,6 @@ extern struct rpc_xprt_switch *xprt_iter_xchg_switch( > struct rpc_xprt_switch *newswitch); > > extern struct rpc_xprt *xprt_iter_xprt(struct rpc_xprt_iter *xpi); > -extern struct rpc_xprt *xprt_iter_get_xprt(struct rpc_xprt_iter *xpi); > extern struct rpc_xprt *xprt_iter_get_next(struct rpc_xprt_iter *xpi); > > extern bool rpc_xprt_switch_has_addr(struct rpc_xprt_switch *xps, > diff --git a/net/sunrpc/xprtmultipath.c b/net/sunrpc/xprtmultipath.c > index 720d3ba742ec..7e98d4dd9f10 100644 > --- a/net/sunrpc/xprtmultipath.c > +++ b/net/sunrpc/xprtmultipath.c > @@ -602,23 +602,6 @@ struct rpc_xprt *xprt_iter_get_helper(struct rpc_xprt_iter *xpi, > return ret; > } > > -/** > - * xprt_iter_get_xprt - Returns the rpc_xprt pointed to by the cursor > - * @xpi: pointer to rpc_xprt_iter > - * > - * Returns a reference to the struct rpc_xprt that is currently > - * pointed to by the cursor. > - */ > -struct rpc_xprt *xprt_iter_get_xprt(struct rpc_xprt_iter *xpi) > -{ > - struct rpc_xprt *xprt; > - > - rcu_read_lock(); > - xprt = xprt_iter_get_helper(xpi, xprt_iter_ops(xpi)->xpi_xprt); > - rcu_read_unlock(); > - return xprt; > -} > - > /** > * xprt_iter_get_next - Returns the next rpc_xprt following the cursor > * @xpi: pointer to rpc_xprt_iter