* [PATCH] dmaengine: idxd: remove set but unused 'rc'
@ 2020-02-25 8:14 Vinod Koul
2020-02-25 16:14 ` Dave Jiang
0 siblings, 1 reply; 3+ messages in thread
From: Vinod Koul @ 2020-02-25 8:14 UTC (permalink / raw)
To: dmaengine, Dave Jiang; +Cc: Vinod Koul
The driver assigns result of check_vma() to rc and never checks the
result, so remove the assignment
drivers/dma/idxd/cdev.c: In function ‘idxd_cdev_mmap’:
drivers/dma/idxd/cdev.c:136:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
136 | int rc;
| ^~
Signed-off-by: Vinod Koul <vkoul@kernel.org>
---
Dave, if you want the result of the check_vma() to be checked, feel free to
send the patch for that
drivers/dma/idxd/cdev.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/dma/idxd/cdev.c b/drivers/dma/idxd/cdev.c
index 8dfdbe37e381..82b19eed6561 100644
--- a/drivers/dma/idxd/cdev.c
+++ b/drivers/dma/idxd/cdev.c
@@ -133,10 +133,9 @@ static int idxd_cdev_mmap(struct file *filp, struct vm_area_struct *vma)
struct pci_dev *pdev = idxd->pdev;
phys_addr_t base = pci_resource_start(pdev, IDXD_WQ_BAR);
unsigned long pfn;
- int rc;
dev_dbg(&pdev->dev, "%s called\n", __func__);
- rc = check_vma(wq, vma, __func__);
+ check_vma(wq, vma, __func__);
vma->vm_flags |= VM_DONTCOPY;
pfn = (base + idxd_get_wq_portal_full_offset(wq->id,
--
2.24.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] dmaengine: idxd: remove set but unused 'rc'
2020-02-25 8:14 [PATCH] dmaengine: idxd: remove set but unused 'rc' Vinod Koul
@ 2020-02-25 16:14 ` Dave Jiang
2020-02-28 6:19 ` Vinod Koul
0 siblings, 1 reply; 3+ messages in thread
From: Dave Jiang @ 2020-02-25 16:14 UTC (permalink / raw)
To: Vinod Koul, dmaengine
On 2/25/20 1:14 AM, Vinod Koul wrote:
> The driver assigns result of check_vma() to rc and never checks the
> result, so remove the assignment
>
> drivers/dma/idxd/cdev.c: In function ‘idxd_cdev_mmap’:
> drivers/dma/idxd/cdev.c:136:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
> 136 | int rc;
> | ^~
>
> Signed-off-by: Vinod Koul <vkoul@kernel.org>
> ---
>
> Dave, if you want the result of the check_vma() to be checked, feel free to
> send the patch for that
Yes I will send a fix. Mistake from several code merges. Oops.
>
> drivers/dma/idxd/cdev.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/dma/idxd/cdev.c b/drivers/dma/idxd/cdev.c
> index 8dfdbe37e381..82b19eed6561 100644
> --- a/drivers/dma/idxd/cdev.c
> +++ b/drivers/dma/idxd/cdev.c
> @@ -133,10 +133,9 @@ static int idxd_cdev_mmap(struct file *filp, struct vm_area_struct *vma)
> struct pci_dev *pdev = idxd->pdev;
> phys_addr_t base = pci_resource_start(pdev, IDXD_WQ_BAR);
> unsigned long pfn;
> - int rc;
>
> dev_dbg(&pdev->dev, "%s called\n", __func__);
> - rc = check_vma(wq, vma, __func__);
> + check_vma(wq, vma, __func__);
>
> vma->vm_flags |= VM_DONTCOPY;
> pfn = (base + idxd_get_wq_portal_full_offset(wq->id,
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dmaengine: idxd: remove set but unused 'rc'
2020-02-25 16:14 ` Dave Jiang
@ 2020-02-28 6:19 ` Vinod Koul
0 siblings, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2020-02-28 6:19 UTC (permalink / raw)
To: Dave Jiang; +Cc: dmaengine
On 25-02-20, 09:14, Dave Jiang wrote:
>
>
> On 2/25/20 1:14 AM, Vinod Koul wrote:
> > The driver assigns result of check_vma() to rc and never checks the
> > result, so remove the assignment
> >
> > drivers/dma/idxd/cdev.c: In function ‘idxd_cdev_mmap’:
> > drivers/dma/idxd/cdev.c:136:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
> > 136 | int rc;
> > | ^~
> >
> > Signed-off-by: Vinod Koul <vkoul@kernel.org>
> > ---
> >
> > Dave, if you want the result of the check_vma() to be checked, feel free to
> > send the patch for that
>
> Yes I will send a fix. Mistake from several code merges. Oops.
Ok, no issues
--
~Vinod
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-02-28 6:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-25 8:14 [PATCH] dmaengine: idxd: remove set but unused 'rc' Vinod Koul
2020-02-25 16:14 ` Dave Jiang
2020-02-28 6:19 ` Vinod Koul
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).