[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ca38feb0347cc38fd2fe3753628f7644a91aaa7a.camel@kernel.org>
Date: Thu, 11 Dec 2025 08:10:25 +0900
From: Jeff Layton <jlayton@...nel.org>
To: Pycode <pycode42@...il.com>, Trond Myklebust <trondmy@...nel.org>, Anna
Schumaker <anna@...nel.org>, linux-nfs@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Removed unused variable
A more descriptive title is preferred: "Remove unused variable from
nfs4_ff_alloc_deviceid_node()"
On Wed, 2025-12-10 at 21:59 +0100, Pycode wrote:
> Signed-off-by: Pycode <pycode42@...il.com>
>
> Removed the unused variable ret in
> fs/nfs/flexfilelayout/flexfilelayoutdev.c
>
> (Disclaimer this is my first patch, be sorry if I have done anything
> wrong!)
> ---
> fs/nfs/flexfilelayout/flexfilelayoutdev.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/fs/nfs/flexfilelayout/flexfilelayoutdev.c b/fs/nfs/flexfilelayout/flexfilelayoutdev.c
> index c55ea8fa3bfa..9cd04e85d52f 100644
> --- a/fs/nfs/flexfilelayout/flexfilelayoutdev.c
> +++ b/fs/nfs/flexfilelayout/flexfilelayoutdev.c
> @@ -53,7 +53,7 @@ nfs4_ff_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
> u32 mp_count;
> u32 version_count;
> __be32 *p;
> - int i, ret = -ENOMEM;
> + int i = -ENOMEM;
>
No need to initialize this.
> /* set up xdr stream */
> scratch = folio_alloc(gfp_flags, 0);
> @@ -88,7 +88,6 @@ nfs4_ff_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
> if (list_empty(&dsaddrs)) {
> dprintk("%s: no suitable DS addresses found\n",
> __func__);
> - ret = -ENOMEDIUM;
> goto out_err_drain_dsaddrs;
> }
>
> @@ -134,7 +133,6 @@ nfs4_ff_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
> dprintk("%s: [%d] unsupported ds version %d-%d\n", __func__,
> i, ds_versions[i].version,
> ds_versions[i].minor_version);
> - ret = -EPROTONOSUPPORT;
> goto out_err_drain_dsaddrs;
> }
>
What about the dprintk() at the bottom of this function? Does this
actually build?
--
Jeff Layton <jlayton@...nel.org>
Powered by blists - more mailing lists