[PATCH -next] afs: Remove unused variable in afs_req_issue_op()

Wei Yongjun weiyongjun1 at huawei.com
Wed Mar 3 06:40:28 GMT 2021


GCC reports the following warning with W=1:

fs/afs/file.c:291:6: warning:
 unused variable 'ret' [-Wunused-variable]
  291 |  int ret;
      |      ^~~

After commit 799fbdf96cd51, this variable is not used in function
afs_req_issue_op(), so this commit remove it to fix the warning.

Fixes: 799fbdf96cd51 ("afs: Use new fscache read helper API")
Reported-by: Hulk Robot <hulkci at huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1 at huawei.com>
---
 fs/afs/file.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/afs/file.c b/fs/afs/file.c
index af162d7dab5b..cf2b664a68a5 100644
--- a/fs/afs/file.c
+++ b/fs/afs/file.c
@@ -288,7 +288,6 @@ static void afs_req_issue_op(struct netfs_read_subrequest *subreq)
 {
 	struct afs_vnode *vnode = AFS_FS_I(subreq->rreq->inode);
 	struct afs_read *fsreq;
-	int ret;
 
 	fsreq = afs_alloc_read(GFP_NOFS);
 	if (!fsreq)




More information about the linux-afs mailing list