All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] virtiofs: Remove set but not used variable 'fc'
@ 2019-10-23  2:02 zhengbin
  2019-10-23  9:33 ` Miklos Szeredi
  2019-10-23 14:33   ` Stefan Hajnoczi
  0 siblings, 2 replies; 4+ messages in thread
From: zhengbin @ 2019-10-23  2:02 UTC (permalink / raw)
  To: vgoyal, stefanha, mszeredi, virtualization, linux-fsdevel; +Cc: zhengbin13

Fixes gcc '-Wunused-but-set-variable' warning:

fs/fuse/virtio_fs.c: In function virtio_fs_wake_pending_and_unlock:
fs/fuse/virtio_fs.c:983:20: warning: variable fc set but not used [-Wunused-but-set-variable]

It is not used since commit 7ee1e2e631db ("virtiofs:
No need to check fpq->connected state")

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
 fs/fuse/virtio_fs.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/fuse/virtio_fs.c b/fs/fuse/virtio_fs.c
index 2de8fc0..a5c8604 100644
--- a/fs/fuse/virtio_fs.c
+++ b/fs/fuse/virtio_fs.c
@@ -980,7 +980,6 @@ __releases(fiq->lock)
 {
 	unsigned int queue_id = VQ_REQUEST; /* TODO multiqueue */
 	struct virtio_fs *fs;
-	struct fuse_conn *fc;
 	struct fuse_req *req;
 	struct virtio_fs_vq *fsvq;
 	int ret;
@@ -993,7 +992,6 @@ __releases(fiq->lock)
 	spin_unlock(&fiq->lock);

 	fs = fiq->priv;
-	fc = fs->vqs[queue_id].fud->fc;

 	pr_debug("%s: opcode %u unique %#llx nodeid %#llx in.len %u out.len %u\n",
 		  __func__, req->in.h.opcode, req->in.h.unique,
--
2.7.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] virtiofs: Remove set but not used variable 'fc'
  2019-10-23  2:02 [PATCH] virtiofs: Remove set but not used variable 'fc' zhengbin
@ 2019-10-23  9:33 ` Miklos Szeredi
  2019-10-23 14:33   ` Stefan Hajnoczi
  1 sibling, 0 replies; 4+ messages in thread
From: Miklos Szeredi @ 2019-10-23  9:33 UTC (permalink / raw)
  To: zhengbin
  Cc: Vivek Goyal, Stefan Hajnoczi, Miklos Szeredi, virtualization,
	linux-fsdevel

On Wed, Oct 23, 2019 at 3:56 AM zhengbin <zhengbin13@huawei.com> wrote:
>
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> fs/fuse/virtio_fs.c: In function virtio_fs_wake_pending_and_unlock:
> fs/fuse/virtio_fs.c:983:20: warning: variable fc set but not used [-Wunused-but-set-variable]
>
> It is not used since commit 7ee1e2e631db ("virtiofs:
> No need to check fpq->connected state")

Thanks, applied.

Miklos

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] virtiofs: Remove set but not used variable 'fc'
  2019-10-23  2:02 [PATCH] virtiofs: Remove set but not used variable 'fc' zhengbin
@ 2019-10-23 14:33   ` Stefan Hajnoczi
  2019-10-23 14:33   ` Stefan Hajnoczi
  1 sibling, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2019-10-23 14:33 UTC (permalink / raw)
  To: zhengbin; +Cc: vgoyal, mszeredi, virtualization, linux-fsdevel

[-- Attachment #1: Type: text/plain, Size: 803 bytes --]

On Wed, Oct 23, 2019 at 10:02:49AM +0800, zhengbin wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> fs/fuse/virtio_fs.c: In function virtio_fs_wake_pending_and_unlock:
> fs/fuse/virtio_fs.c:983:20: warning: variable fc set but not used [-Wunused-but-set-variable]
> 
> It is not used since commit 7ee1e2e631db ("virtiofs:
> No need to check fpq->connected state")
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: zhengbin <zhengbin13@huawei.com>
> ---
>  fs/fuse/virtio_fs.c | 2 --
>  1 file changed, 2 deletions(-)

Only affects the linux-next tree, not virtio-fs-dev or linux.git/master.
Same as "[PATCH -next] virtiofs: remove unused variable 'fc'"
(<20191023062130.23068-1-yuehaibing@huawei.com>).

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] virtiofs: Remove set but not used variable 'fc'
@ 2019-10-23 14:33   ` Stefan Hajnoczi
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2019-10-23 14:33 UTC (permalink / raw)
  To: zhengbin; +Cc: linux-fsdevel, mszeredi, vgoyal, virtualization


[-- Attachment #1.1: Type: text/plain, Size: 803 bytes --]

On Wed, Oct 23, 2019 at 10:02:49AM +0800, zhengbin wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> fs/fuse/virtio_fs.c: In function virtio_fs_wake_pending_and_unlock:
> fs/fuse/virtio_fs.c:983:20: warning: variable fc set but not used [-Wunused-but-set-variable]
> 
> It is not used since commit 7ee1e2e631db ("virtiofs:
> No need to check fpq->connected state")
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: zhengbin <zhengbin13@huawei.com>
> ---
>  fs/fuse/virtio_fs.c | 2 --
>  1 file changed, 2 deletions(-)

Only affects the linux-next tree, not virtio-fs-dev or linux.git/master.
Same as "[PATCH -next] virtiofs: remove unused variable 'fc'"
(<20191023062130.23068-1-yuehaibing@huawei.com>).

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 183 bytes --]

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-10-23 14:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-23  2:02 [PATCH] virtiofs: Remove set but not used variable 'fc' zhengbin
2019-10-23  9:33 ` Miklos Szeredi
2019-10-23 14:33 ` Stefan Hajnoczi
2019-10-23 14:33   ` Stefan Hajnoczi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.