linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] sample/mdev/mbochs: remove set but not used variable 'mdev_state'
@ 2019-05-25 13:53 YueHaibing
  2019-07-02 18:02 ` Alex Williamson
  0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2019-05-25 13:53 UTC (permalink / raw)
  To: kwankhede, alex.williamson; +Cc: linux-kernel, kvm, YueHaibing

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

samples/vfio-mdev/mbochs.c: In function mbochs_ioctl:
samples/vfio-mdev/mbochs.c:1188:21: warning: variable mdev_state set but not used [-Wunused-but-set-variable]

It's not used any more since commit 104c7405a64d ("vfio:
add edid support to mbochs sample driver")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 samples/vfio-mdev/mbochs.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/samples/vfio-mdev/mbochs.c b/samples/vfio-mdev/mbochs.c
index b038aa9f5a70..ac5c8c17b1ff 100644
--- a/samples/vfio-mdev/mbochs.c
+++ b/samples/vfio-mdev/mbochs.c
@@ -1185,9 +1185,6 @@ static long mbochs_ioctl(struct mdev_device *mdev, unsigned int cmd,
 {
 	int ret = 0;
 	unsigned long minsz, outsz;
-	struct mdev_state *mdev_state;
-
-	mdev_state = mdev_get_drvdata(mdev);
 
 	switch (cmd) {
 	case VFIO_DEVICE_GET_INFO:
-- 
2.17.1



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

* Re: [PATCH -next] sample/mdev/mbochs: remove set but not used variable 'mdev_state'
  2019-05-25 13:53 [PATCH -next] sample/mdev/mbochs: remove set but not used variable 'mdev_state' YueHaibing
@ 2019-07-02 18:02 ` Alex Williamson
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Williamson @ 2019-07-02 18:02 UTC (permalink / raw)
  To: YueHaibing; +Cc: kwankhede, linux-kernel, kvm

On Sat, 25 May 2019 21:53:49 +0800
YueHaibing <yuehaibing@huawei.com> wrote:

> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> samples/vfio-mdev/mbochs.c: In function mbochs_ioctl:
> samples/vfio-mdev/mbochs.c:1188:21: warning: variable mdev_state set but not used [-Wunused-but-set-variable]
> 
> It's not used any more since commit 104c7405a64d ("vfio:
> add edid support to mbochs sample driver")
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  samples/vfio-mdev/mbochs.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/samples/vfio-mdev/mbochs.c b/samples/vfio-mdev/mbochs.c
> index b038aa9f5a70..ac5c8c17b1ff 100644
> --- a/samples/vfio-mdev/mbochs.c
> +++ b/samples/vfio-mdev/mbochs.c
> @@ -1185,9 +1185,6 @@ static long mbochs_ioctl(struct mdev_device *mdev, unsigned int cmd,
>  {
>  	int ret = 0;
>  	unsigned long minsz, outsz;
> -	struct mdev_state *mdev_state;
> -
> -	mdev_state = mdev_get_drvdata(mdev);
>  
>  	switch (cmd) {
>  	case VFIO_DEVICE_GET_INFO:

Applied to vfio next branch for 5.3.  Thanks!

Alex

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

end of thread, other threads:[~2019-07-02 18:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-25 13:53 [PATCH -next] sample/mdev/mbochs: remove set but not used variable 'mdev_state' YueHaibing
2019-07-02 18:02 ` Alex Williamson

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).