diff mbox series

[-next] dmaengine: idxd: remove set but not used variable 'idxd_cdev'

Message ID 20200210151855.55044-1-yuehaibing@huawei.com (mailing list archive)
State Accepted
Headers show
Series [-next] dmaengine: idxd: remove set but not used variable 'idxd_cdev' | expand

Commit Message

Yue Haibing Feb. 10, 2020, 3:18 p.m. UTC
drivers/dma/idxd/cdev.c: In function idxd_cdev_open:
drivers/dma/idxd/cdev.c:77:20: warning:
 variable idxd_cdev set but not used [-Wunused-but-set-variable]

commit 42d279f9137a ("dmaengine: idxd: add char driver to
expose submission portal to userland") involed this.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/dma/idxd/cdev.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Dave Jiang Feb. 10, 2020, 4:35 p.m. UTC | #1
On 2/10/20 8:18 AM, YueHaibing wrote:
> drivers/dma/idxd/cdev.c: In function idxd_cdev_open:
> drivers/dma/idxd/cdev.c:77:20: warning:
>   variable idxd_cdev set but not used [-Wunused-but-set-variable]
> 
> commit 42d279f9137a ("dmaengine: idxd: add char driver to
> expose submission portal to userland") involed this.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Acked-by: Dave Jiang <dave.jiang@intel.com>

> ---
>   drivers/dma/idxd/cdev.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/dma/idxd/cdev.c b/drivers/dma/idxd/cdev.c
> index 1d73478..8dfdbe3 100644
> --- a/drivers/dma/idxd/cdev.c
> +++ b/drivers/dma/idxd/cdev.c
> @@ -74,12 +74,10 @@ static int idxd_cdev_open(struct inode *inode, struct file *filp)
>   	struct idxd_device *idxd;
>   	struct idxd_wq *wq;
>   	struct device *dev;
> -	struct idxd_cdev *idxd_cdev;
>   
>   	wq = inode_wq(inode);
>   	idxd = wq->idxd;
>   	dev = &idxd->pdev->dev;
> -	idxd_cdev = &wq->idxd_cdev;
>   
>   	dev_dbg(dev, "%s called\n", __func__);
>   
>
Vinod Koul Feb. 13, 2020, 2:34 p.m. UTC | #2
On 10-02-20, 23:18, YueHaibing wrote:
> drivers/dma/idxd/cdev.c: In function idxd_cdev_open:
> drivers/dma/idxd/cdev.c:77:20: warning:
>  variable idxd_cdev set but not used [-Wunused-but-set-variable]

Applied, thanks
diff mbox series

Patch

diff --git a/drivers/dma/idxd/cdev.c b/drivers/dma/idxd/cdev.c
index 1d73478..8dfdbe3 100644
--- a/drivers/dma/idxd/cdev.c
+++ b/drivers/dma/idxd/cdev.c
@@ -74,12 +74,10 @@  static int idxd_cdev_open(struct inode *inode, struct file *filp)
 	struct idxd_device *idxd;
 	struct idxd_wq *wq;
 	struct device *dev;
-	struct idxd_cdev *idxd_cdev;
 
 	wq = inode_wq(inode);
 	idxd = wq->idxd;
 	dev = &idxd->pdev->dev;
-	idxd_cdev = &wq->idxd_cdev;
 
 	dev_dbg(dev, "%s called\n", __func__);