linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pycode <pycode42@gmail.com>
To: Trond Myklebust <trondmy@kernel.org>,
	Anna Schumaker <anna@kernel.org>,
	linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] Removed unused variable
Date: Wed, 10 Dec 2025 21:59:53 +0100	[thread overview]
Message-ID: <aTnfSQJ4QsfwTSf0@raspberrypi> (raw)

Signed-off-by: Pycode <pycode42@gmail.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;
 
 	/* 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;
 		}
 
-- 
2.47.2


             reply	other threads:[~2025-12-10 20:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-10 20:59 Pycode [this message]
2025-12-10 23:10 ` [PATCH] Removed unused variable Jeff Layton
2025-12-11  5:57   ` Pycode
2025-12-11  6:54     ` Kuan-Wei Chiu
2025-12-11  7:31       ` Pycode
2025-12-11  9:04         ` Kuan-Wei Chiu
2025-12-11 10:17 ` kernel test robot
2025-12-11 12:27 ` kernel test robot
2025-12-11 12:27 ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aTnfSQJ4QsfwTSf0@raspberrypi \
    --to=pycode42@gmail.com \
    --cc=anna@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trondmy@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).